Skip to content

Classify Objects

The Classify Objects command evaluates every object against a set of shape criteria and, optionally, intensity criteria and an intersection criterion. Each object either matches (passes every enabled criterion) or does not, and the selected match handling mode decides what happens to the object’s class labels in each case - add a class, strip a class, or reclassify entirely.

This is where raw segmentation output (“every connected group of bright pixels”) turns into biological meaning (“this is a nucleus, this is an EV - that speck isn’t”) - the criteria exist because segmentation almost always over-detects, picking up noise, debris, and imaging artifacts alongside genuine objects. Because match handling is itself configurable, the same command also covers narrowing an already-named population and reclassifying objects based on what they overlap.

Objects are measured against shape/intersection criteria; the match handling mode decides what happens to matching and non-matching objects

ParameterDescription
Input ClassesRestrict evaluation to objects that already carry at least one of these classes. Leave empty to select the objects by their Origin Segmentation only
Origin Segmentation(advanced) Restrict evaluation to objects that came from one of these segmentation classes (the class a Threshold, pixel classifier or AI model assigned). Leave empty to select the objects by their Input Classes only

With both set, an object must match both. Origin Segmentation alone also selects objects that have no class left - the way to bring back objects an earlier step removed. With neither set, the step does nothing: no object is classified, and the editor warns that the step classifies nothing. (Earlier versions evaluated every object then, which also gave removed objects a class again.)

Objects created by Extract Objects carry their segmentation class as an object class from the start, so a fresh, unfiltered population can be selected here the same way as an already-named class from an earlier Classify Objects step. Listing several classes widens the selection (a logical OR): an object that carries any one of them is evaluated. See Object Classes for how that numbering works.

An object matches only if it satisfies every criterion below - and every intensity and intersection criterion - they combine as a logical AND, not a choice of one.

All shape-based criteria accept the field’s maximum representable value as “no limit” for the upper bound and 0 for “no lower limit” - there is no dedicated “disabled” sentinel, so leaving a bound at its default effectively disables it.

CriterionDescription
Min Size / Max SizeObject area, in the chosen Size unit
Min circularity / Max circularityRange 0.0-1.0; 1.0 = perfect circle
Min solidity / Max solidityRatio of area to convex hull area (0-1)
Min aspect ratio / Max aspect ratioFitted-ellipse major/minor axis ratio
Min eccentricity / Max eccentricityElongation from fitted ellipse (0 = circle, 1 = line segment)
Min Feret / Max FeretRange for the object’s Max Feret diameter (longest distance between two pixel centres), in the chosen Size unit
Allow edge touchingIf disabled, objects that touch the image border fail the match

Shape criteria that depend on physical size (Min Size / Max Size, Feret) use a single Size unit shared by both:

  • Pixels (px) - absolute pixel count
  • Nanometres (nm) - converted using the pixel size from image metadata

Intensity Filters is a list of intensity criteria, e.g. “average intensity in channel 1 brighter than 1200”. Click + to add an entry; each entry has:

FieldDescription
ChannelImage channel whose intensity is compared
MetricAverage, Sum, Minimum or Maximum of the object’s pixel intensities in that channel
ComparisonBrighter than or Darker than the threshold. Both are strict: an object exactly at the threshold matches neither
ThresholdThe intensity to compare with, in Unit
Unit(advanced) bit - gray value 0-255 / 0-65535, as in ImageJ/Fiji (default); % - 0-100 of the bit range; rel - 0-1.0

Like the shape criteria, every intensity filter must match (logical AND). Combine a Brighter than and a Darker than filter on the same channel and metric to select an intensity range. An empty list means no intensity criterion.

The intensities are the intensity metrics measured on the raw image channel when the objects were extracted - the same values as in the results table. Sum is the summed intensity of all object pixels, so its threshold scales with the object’s area. An object without a measurement for the chosen channel (the image has no such channel) never matches.

An optional, additional criterion evaluated alongside the shape and intensity criteria above - an object must satisfy this too, not instead.

CriterionDescription
Intersecting WithAn object class to test overlap against. When set, the object only matches if it also overlaps at least one object of this class by at least Min Intersection Size
Min Intersection SizeMinimum overlap area, in the chosen Size unit. Has no effect while Intersecting With is unset

Unlike the shape criteria, this one is disabled entirely by leaving Intersecting With unset (no sentinel value needed) rather than by relaxing a threshold. It corresponds to the Intersection metric - counting how many objects from another class overlap a given object - used here as a pass/fail gate rather than just a recorded value.

Every object is evaluated once against the shape, intensity and intersection criteria above to get a single match / no match result. Match Handling then decides what that result does to the object’s classes:

Mode (GUI label)On matchOn non-match
Add class on matchAdd Output Tag to the object’s existing classesNo change
Add class on mismatchNo changeAdd Output Tag to the object’s existing classes
Remove output class on matchRemove Output Tag from the objectNo change
Remove output class on mismatchNo changeRemove Output Tag from the object
Remove objects matching criteriaClear all classes from the objectNo change
Keep objects matching criteria (default)No changeClear all classes from the object
Reclassify on matchClear all classes, then add Output TagNo change
Reclassify on mismatchNo changeClear all classes, then add Output Tag

With no criterion set - every range at its default, edge touching allowed, no intensity filter, Intersecting With unset - every object matches. The removing modes are the exception: Remove objects matching criteria, Remove output class on match and Remove class on match then remove nothing, without a warning. That way a module can switch an optional removal off by leaving its criteria open. Every other mode treats all objects as matching (e.g. Reclassify on match renames them all).

  • First-time classification (segmentation class → a real named class) and reclassifying by overlap (moving objects into another class based on what they intersect) are both worked through in the examples below.
  • Narrowing an already-named population with a stricter filter, without renaming it: leave Output Tag unset and use the default Keep objects matching criteria - objects that fail the new criteria are dropped; objects that pass keep their existing class untouched.
  • Tagging without removing anything else: use Add class on match to layer an additional class onto objects that already carry others, e.g. flagging objects that also satisfy a secondary criterion.
Input Classes: the segmentation class Extract Objects gave the spots
Min Size: 3 px²
Min circularity: 0.1
Allow edge touching: true
Match Handling: Reclassify on match
Output Tag: ch1@spot

Objects larger than 3 px² with any circularity are reclassified as ch1@spot; everything else keeps only its segmentation class and is dropped from all named-class results.

Input Classes: dapi@cell
Intensity Filters:
Channel 2 · Average · Brighter than · 1200 bit
Match Handling: Add class on match
Output Tag: cy5@positive

Every dapi@cell object whose average intensity in channel 2 is above 1200 additionally gets the class cy5@positive; all cells keep their dapi@cell class.

Input Classes: ch1@spot
Intersecting With: tetraspeck@spot
Min Intersection Size: 1 px²
Match Handling: Reclassify on match
Output Tag: tetraspeck@spot

Any ch1@spot object that overlaps a tetraspeck@spot calibration bead is moved into the tetraspeck@spot class, removing it from the spot count - the pattern used in Spot Count to exclude bead artefacts.