Filter objects

DEPRECATED: Please use individual filter modules instead (e.

Description

DEPRECATED: Please use individual filter modules instead (e.g. "Based on measurement").

Filter an object collection based on a variety of properties. Objects that satisfy the relevant condition can be removed from the input collection, moved to another collection (and removed from the input collection) or simply counted (but retained in the input collection).

Parameters

ParameterDescription
Input objectsObjects to be filtered.
Filter modeControls what happens to objects which don't pass the filter:
  • "Do nothing" Retains all input objects, irrespective of whether they passed or failed the filter. This is useful when also storing the filter results as metadata values (i.e. just counting the number of objects which pass the filter).
  • "Move filtered objects to new class" Objects failing the filter are moved to a new object class. The name of the class is determined by the "Output (filtered) objects" parameter. All existing measurements and relationships are carried forward into the new object collection.
  • "Remove filtered objects" (default) Removes objects failing the filter. Once removed, these objects are unavailable for further use by modules and won't be included in exported results.
Output (filtered) objectsNew object collection containing input objects which did not pass the filter. These objects are only stored if "Filter mode" is set to "Move filtered objects to new class".
Method for filteringControls the type of filter being used:
  • "Exclude objects on image edge (2D)" Remove any objects based on contact with the image edge. Contact is considered as a case where an object pixel is in the outer-most row, column or slice of an image (e.g. x = 0 or y = max_value). Can optionally also consider top and bottom of 3D stack (Z-position).
  • "Remove objects with missing measurements" Remove any objects without a specific measurement value (i.e. values with NaN values).
  • "Remove objects without parent" Remove any objects without an assigned parent from a specific object collection.
  • "Remove objects with a parent" Remove any objects with an assigned parent from a specific object collection.
  • "Remove objects with fewer children than:" Remove any objects with fewer children from a specific object collection than a threshold value.
  • "Remove objects with more children than:" Remove any objects with more children from a specific object collection than a threshold value.
  • "Remove objects with measurements < than:" Remove any objects with a smaller measurement value a specific threshold.
  • "Remove objects with measurements > than:" Remove any objects with a larger measurement value a specific threshold.
  • "Specific object IDs (runtime)" Remove objects by their specific ID numbers. This is a manual option, whereby an image is displayed to the user (pre-prepared to show object ID numbers) along with a dialog box allowing the user to write a comma-separated list of objects to remove.
Include Z-positionWhen selected, object pixels which make contact with the lower (z = 0) and upper (z = max_value) slices of the image stack will lead to removal of that object. If not selected, pixels along this edge will be ignored (i.e. contact won't lead to object removal). If enabled for single slice stacks all objects will removed.
Measurement to filter onObjects will be filtered against their value of this measurement. Objects missing this measurement are not removed; however, they can be removed by using the module "With / without measurement".
Parent objectParent object to filter by. The presence or absence of this relationship will determine which of the input objects are counted, removed or moved (depending on the "Filter mode" parameter).
Child objectsObjects will be filtered against the number of children they have from this object collection.
Reference modeType of reference value used to compare objects to:
  • "Fixed value" Objects will be compared to a single, fixed value specified using the "Reference value" parameter.
  • "Image measurement" Objects will be compared to a measurement associated with an image in the workspace. The image and associated measurement are specified by the "Reference value image" and "Reference image measurement" parameters. In this mode, all objects will still be compared to the same value; however, this value can vary between input files.
  • "Parent object measurement" Objects will be compared to a measurement associated with a parent object. The parent object and measurement are specified by the "Reference value parent object" and "Reference object measurement" parameters. In this mode all objects can (but won't necessarily) be compared to different values.
Reference valueWhen "Reference mode" is set to "Fixed value", all objects will be compared to this fixed value.
Reference value imageWhen "Reference mode" is set to "Image measurement", all objects will be compared to a measurement associated with this image.
Reference image measurementWhen "Reference mode" is set to "Image measurement", all objects will be compared to this measurement, which itself is associated with the image specified by "Reference value image".
Reference value parent objectWhen "Reference mode" is set to "Parent object measurement", all objects will be compared to a measurement associated with their parent object from this collection.
Reference object measurementWhen "Reference mode" is set to "Parent object measurement", all objects will be compared to this measurement, which itself is associated with the parent object specified by "Reference value parent object".
Reference value multiplierIrrespective of how the reference value was determined, it can be systematically adjusted prior to use for comparison using this multiplier. For example, an image measurement reference value of 32 with a "Reference value multiplier" of "0.5" will see all objects compared against a value of 16. This is useful when comparing to dynamic values coming from image and parent object measurements.
Show imageWhen selected, a specific image will be displayed when this module executes. This can be used to display a pre-prepared, object ID-labelled image to the user, thus acting as a reference for which object IDs to remove. The image to be displayed is set using the "Image to display" parameter.
Image to displayImage to display when the module executes. For example, this could be a pre-prepared image with object IDs inserted as text overlays using the "Add labels" module.