Module: StraightenWorms

StraightenWorms straightens untangled worms.
StraightenWorms uses the objects produced by UntangleWorms to create images and objects of straight worms from the angles and control points as computed by UntangleWorms. The resulting images can then be uniformly analyzed to find features that correlate with position in an ideal representation of the worm, such as the head or gut.

StraightenWorms works by calculating a transform on the image that translates points in the image to points on the ideal worm. UntangleWorms idealizes a worm as a series of control points that define the worm's shape and length. The training set contains measurements of the width of an ideal worm at each control point. Together, these can be used to reconstruct the worm's shape and correlate between the worm's location and points on the body of an ideal worm.

StraightenWorms produces objects representing the straight worms and images representing the intensity values of a source image mapped onto the straight worms. The objects and images can then be used to compute measurements using any of the object measurement modules, for instance, MeasureTexture.

The module can be configured to make intensity measurements on parts of the worm, dividing the worm up into pieces of equal width and/or height. Measurements are made longitudally in stripes from head to tail and transversely in segments across the width of the worm. Longitudinal stripes are numbered from left to right and transverse segments are numbered from top to bottom. The module will divide the worm into a checkerboard of sections if configured to measure more than one longitudinal stripe and transverse segment. These are numbered by longitudinal stripe number, then transverse segment number. For instance, "Worm_MeanIntensity_GFP_L2of3_T1of4", is a measurement of the mean GFP intensity of the center stripe (second of 3 stripes) of the topmost band (first of four bands). Measurements of longitudinal stripes are designated as "T1of1" indicating that the whole worm is one transverse segment. Likewise measurements of transverse segments are designated as "L1of1" indicating that there is only one longitudinal stripe. Both mean intensity and standard deviation of intensity are measured per worm sub-area.

While StraightenWorms can straighten a color image, the module needs a grayscale image to make its intensity measurements. For a color image, the red, green and blue channels are averaged to yield a grayscale image. The intensity measurements are then made on that grayscale image.

Available measurements

Object measurements:

References

Settings:

Select the input untangled worm objects

This is the name of the objects produced by the UntangleWorms module. StraightenWorms can use either the overlapping or non-overlapping objects as input. It will use the control point measurements associated with the objects to reconstruct the straight worms. You can also use objects saved from a previous run and loaded via the Input modules, objects edited using EditObjectsManually or objects from one of the Identify modulues. StraightenWorms will recalculate the control points for these images.

Name the output straightened worm objects

This is the name that will be given to the straightened worm objects. These objects can then be used in a subsequent measurement module.

Worm width

This setting determines the width of the image of each worm. The width should be set to at least the maximum width of any untangled worm, but can be set to be larger to include the worm's background in the straightened image.

Training set file location

Select the folder containing the training set to be loaded. You can choose among the following options which are common to all file input/output modules:

Elsewhere and the two sub-folder options all require you to enter an additional path name. You can use an absolute path (such as "C:\imagedir\image.tif" on a PC) or a relative path to specify the file location relative to a directory):

An additional option is the following:

Training set file name

This is the name of the training set file.

Measure intensity distribution?

Select Yes to divide a worm into sections and measure the intensities of each section in each of the straightened images. These measurements can help classify phenotypes if the staining pattern across the segments differs between phenotypes.

Number of transverse segments

(Only used if intensities are measured)
This setting controls the number of segments measured, dividing the worm longitudally into transverse segments starting at the head and ending at the tail. These measurements might be used to identify a phenotype in which a stain is localized longitudally, for instance, in the head. Set the number of vertical segments to 1 to only measure intensity in the horizontal direction.

Number of longitudinal stripes

(Only used if intensities are measured)
This setting controls the number of stripes measured, dividing the worm transversely into areas that run longitudally. These measurements might be used to identify a phenotype in which a stain is localized transversely, for instance in the gut of the worm. Set the number of horizontal stripes to 1 to only measure intensity in the vertical direction.

Align worms?

(Only used if intensities are measured)
StraightenWorms can align worms so that the brightest half of the worm (the half with the highest mean intensity) is at the top of the image or at the bottom of the image. This can be used to align all worms similarly if some feature, such as the larynx, is stained and is always at the same end of the worm. Choose Top brightest if the brightest part of the worm should be at the top of the image, Bottom brightest if the brightest part of the worm should be at the bottom or Do not align if the worm should not be aligned. Choose Flip manually to bring up an editor for every cycle that allows you to choose the orientation of each worm.

Alignment image

(Only used if aligning worms)
This is the image whose intensity will be used to align the worms. You must use one of the straightened images below.

Select an input image to straighten

This is the name of an image that will be straightened similarly to the worm. The straightened image and objects can then be used in subsequent modules such as MeasureObjectIntensity.

Name the output straightened image

This is the name that will be given to the image of the straightened worms.