Module: IdentifySecondaryObjects

Identify Secondary Objects identifies objects (e.g., cell edges) using objects identified by another module (e.g., nuclei) as a starting point.

What is a secondary object?

In CellProfiler, we use the term object as a generic term to refer to an identifed feature in an image, usually a cellular subcompartment of some kind (for example, nuclei, cells, colonies, worms). We define an object as secondary when it can be found in an image by using another cellular feature as a reference for guiding detection.

For densely-packed cells (such as those in a confluent monolayer), determining the cell borders using a cell body stain can be quite difficult since they often have irregular intensity patterns and are lower-contrast with more diffuse staining. In addition, cells often touch their neighbors making it harder to delineate the cell borders. It is often easier to identify an organelle which is well separated spatially (such as the nucleus) as an object first and then use that object to guide the detection of the cell borders. See the IdentifyPrimaryObjects module for details on how to identify a primary object.

In order to identify the edges of secondary objects, this module performs two tasks:

  1. Finds the dividing lines between secondary objects which touch each other.
  2. Finds the dividing lines between the secondary objects and the background of the image. In most cases, this is done by thresholding the image stained for the secondary objects.

What do I need as input?

This module identifies secondary objects based on two types of input:
  1. An object (e.g., nuclei) identified from a prior module. These are typically produced by an IdentifyPrimaryObjects module, but any object produced by another module may be selected for this purpose.
  2. An image highlighting the image features defining the cell edges. This is typically a fluorescent stain for the cell body, membrane or cytoskeleton (e.g., phalloidin staining for actin). However, any image which produces these features can be used for this purpose. For example, an image processing module might be used to transform a brightfield image into one which captures the characteristics of a cell body flourescent stain.

What do the settings mean?

See below for help on the individual settings. The following icons are used to call attention to key items:

What do I get as output?

A set of secondary objects are produced by this module, which can be used in downstream modules for measurement purposes or other operations. Because each primary object is used as the starting point for producing a corresponding secondary object, keep in mind the following points: See the section "Available measurements" below for the measurements that are produced by this module.

Once the module has finished processing, the module display window will show the following panels:

Available measurements

Image measurements:

Object measurements:

Technical notes

The Propagation algorithm is the default approach for secondary object creation, creating each primary object as a "seed" guided by the input image and limited to the foreground region as determined by the chosen thresholding method. λ is a regularization parameter; see the help for the setting for more details. Propagation of secondary object labels is by the shortest path to an adjacent primary object from the starting ("seeding") primary object. The seed-to-pixel distances are calculated as the sum of absolute differences in a 3x3 (8-connected) image neighborhood, combined with λ via sqrt(differences2 + λ2).

See also the other Identify modules.

Settings:

Select the input objects

What did you call the objects you want to use as "seeds" to identify a secondary object around each one? By definition, each primary object must be associated with exactly one secondary object and completely contained within it.

Name the objects to be identified

Enter the name that you want to call the objects identified by this module.

Select the method to identify the secondary objects

There are several methods available to find the dividing lines between secondary objects which touch each other:

  • Propagation: This method will find dividing lines between clumped objects where the image stained for secondary objects shows a change in staining (i.e., either a dimmer or a brighter line). Smoother lines work better, but unlike the Watershed method, small gaps are tolerated. This method is considered an improvement on the traditional Watershed method. The dividing lines between objects are determined by a combination of the distance to the nearest primary object and intensity gradients. This algorithm uses local image similarity to guide the location of boundaries between cells. Boundaries are preferentially placed where the image's local appearance changes perpendicularly to the boundary (Jones et al, 2005).
  • Watershed - Gradient: This method uses the watershed algorithm (Vincent and Soille, 1991) to assign pixels to the primary objects which act as seeds for the watershed. In this variant, the watershed algorithm operates on the Sobel transformed image which computes an intensity gradient. This method works best when the image intensity drops off or increases rapidly near the boundary between cells.
  • Watershed - Image: This method is similar to the above, but it uses the inverted intensity of the image for the watershed. The areas of lowest intensity will form the boundaries between cells. This method works best when there is a saddle of relatively low intensity at the cell-cell boundary.
  • Distance: In this method, the edges of the primary objects are expanded a specified distance to create the secondary objects. For example, if nuclei are labeled but there is no stain to help locate cell edges, the nuclei can simply be expanded in order to estimate the cell's location. This is often called the "doughnut" or "annulus" or "ring" approach for identifying the cytoplasm. There are two methods that can be used:
    • Distance - N: In this method, the image of the secondary staining is not used at all; the expanded objects are the final secondary objects.
    • Distance - B: Thresholding of the secondary staining image is used to eliminate background regions from the secondary objects. This allows the extent of the secondary objects to be limited to a certain distance away from the edge of the primary objects without including regions of background.
References

Select the input image

The selected image will be used to find the edges of the secondary objects. For Distance - N this will not affect object identification, only the final display.

Threshold strategy

The thresholding strategy determines the type of input that is used to calculate the threshold. The image thresholds can be based on: These options allow you to calculate a threshold based on the whole image or based on image sub-regions such as user-defined masks or objects supplied by a prior module.
The choices for the threshold strategy are:

Regularization factor

(Used only if Propagation method is selected)
The regularization factor λ can be anywhere in the range 0 to infinity. This method takes two factors into account when deciding where to draw the dividing line between two touching secondary objects: the distance to the nearest primary object, and the intensity of the secondary object image. The regularization factor controls the balance between these two considerations:

Fill holes in identified objects?

Select Yes to fill any holes inside objects.

Discard secondary objects touching the border of the image?

Select Yes to discard secondary objects which touch the image border. Select No to retain objects regardless of whether they touch the image edge or not.

The objects are discarded with respect to downstream measurement modules, but they are retained in memory as "unedited objects"; this allows them to be considered in downstream modules that modify the segmentation.

Discard the associated primary objects?

(Used only if discarding secondary objects touching the image border)
It might be appropriate to discard the primary object for any secondary object that touches the edge of the image.

Select Yes to create a new set of objects that are identical to the original primary objects set, minus the objects for which the associated secondary object touches the image edge.

Name the new primary objects

(Used only if associated primary objects are discarded)
You can name the primary objects that remain after the discarding step. These objects will all have secondary objects that do not touch the edge of the image. Note that any primary object whose secondary object touches the edge will be retained in memory as an "unedited object"; this allows them to be considered in downstream modules that modify the segmentation.

Retain outlines of the new primary objects?

(Used only if associated primary objects are discarded)
Select Yes to retain the outlines of the new objects for later use in the pipeline. For example, a common use is for quality control purposes by overlaying them on your image of choice using the OverlayOutlines module and then saving the overlay image with the SaveImages module.

Name the new primary object outlines

(Used only if associated primary objects are discarded and saving outlines of new primary objects)
Enter a name for the outlines of the identified objects. The outlined image can be selected in downstream modules by selecting them from any drop-down image list.

Retain outlines of the identified secondary objects?

Select Yes to retain the outlines of the new objects for later use in the pipeline. For example, a common use is for quality control purposes by overlaying them on your image of choice using the OverlayOutlines module and then saving the overlay image with the SaveImages module.

Name the outline image

(Used only if the outline image is to be retained for later use in the pipeline)
Enter a name for the outlines of the identified objects. The outlined image can be selected in downstream modules by selecting them from any drop-down image list.