Module: FilterObjects

Filter Objects eliminates objects based on their measurements (e.g., area, shape, texture, intensity).
This module removes selected objects based on measurements produced by another module (e.g., MeasureObjectSizeShape, MeasureObjectIntensity, MeasureTexture, etc). All objects that do not satisfy the specified parameters will be discarded.

This module also may remove objects touching the image border or edges of a mask. This is useful if you would like to unify images via ReassignObjectNumbers before deciding to discard these objects.

Please note that the objects that pass the filtering step comprise a new object set, and hence do not inherit the measurements associated with the original objects. Any measurements on the new object set will need to be made post-filtering by the desired measurement modules.

Available measurements

Image measurements: Object measurements:

See also any of the MeasureObject modules, MeasureTexture, MeasureCorrelation, and CalculateRatios.

Settings:

Name the output objects

Enter a name for the collection of objects that are retained after applying the filter(s).

Select the object to filter

Select the set of objects that you want to filter. This setting also controls which measurement choices appear for filtering: you can only filter based on measurements made on the object you select. If you intend to use a measurement calculated by the CalculateMath module to to filter objects, select the first operand's object here, because CalculateMath measurements are stored with the first operand's object.

Select the filtering mode

You can choose from the following options:

Select the filtering method

(Used only if filtering using measurements)
There are five different ways to filter objects:

Assign overlapping child to

(Used only if filtering per object)
A child object can overlap two parent objects and can have the maximal/minimal measurement of all child objects in both parents. This option controls how an overlapping maximal/minimal child affects filtering of other children of its parents and to which parent the maximal child is assigned. The choices are:

Rules file location

(Used only when filtering using Rules)
Select the location of the rules file that will be used for filtering. 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):

Rules file name

(Used only when filtering using Rules)
The name of the rules file. This file should be a plain text file containing the complete set of rules.

Each line of this file should be a rule naming a measurement to be made on the object you selected, for instance:

IF (Nuclei_AreaShape_Area < 351.3, [0.79, -0.79], [-0.94, 0.94])


The above rule will score +0.79 for the positive category and -0.94 for the negative category for nuclei whose area is less than 351.3 pixels and will score the opposite for nuclei whose area is larger. The filter adds positive and negative and keeps only objects whose positive score is higher than the negative score.

Class number

(Used only when filtering using Rules)
Select which of the classes to keep when filtering. The CellProfiler Analyst classifier user interface lists the names of the classes in left-to-right order. FilterObjects uses the first class from CellProfiler Analyst if you choose "1", etc.

Please note the following:

Select the objects that contain the filtered objects

(Used only if a per-object filtering method is selected)
This setting selects the container (i.e., parent) objects for the Maximal per object and Minimal per object filtering choices.

Retain outlines of the identified 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)
(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.