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.
Input Selection
Section titled “Input Selection”| Parameter | Description |
|---|---|
| Input Classes | Restrict 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.
Shape Criteria
Section titled “Shape Criteria”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.
| Criterion | Description |
|---|---|
| Min Size / Max Size | Object area, in the chosen Size unit |
| Min circularity / Max circularity | Range 0.0-1.0; 1.0 = perfect circle |
| Min solidity / Max solidity | Ratio of area to convex hull area (0-1) |
| Min aspect ratio / Max aspect ratio | Fitted-ellipse major/minor axis ratio |
| Min eccentricity / Max eccentricity | Elongation from fitted ellipse (0 = circle, 1 = line segment) |
| Min Feret / Max Feret | Range for the object’s Max Feret diameter (longest distance between two pixel centres), in the chosen Size unit |
| Allow edge touching | If disabled, objects that touch the image border fail the match |
Size unit
Section titled “Size unit”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 Criteria
Section titled “Intensity Criteria”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:
| Field | Description |
|---|---|
| Channel | Image channel whose intensity is compared |
| Metric | Average, Sum, Minimum or Maximum of the object’s pixel intensities in that channel |
| Comparison | Brighter than or Darker than the threshold. Both are strict: an object exactly at the threshold matches neither |
| Threshold | The 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.
Intersection Criterion
Section titled “Intersection Criterion”An optional, additional criterion evaluated alongside the shape and intensity criteria above - an object must satisfy this too, not instead.
| Criterion | Description |
|---|---|
| Intersecting With | An 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 Size | Minimum 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.
Match Handling
Section titled “Match Handling”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 match | On non-match |
|---|---|---|
| Add class on match | Add Output Tag to the object’s existing classes | No change |
| Add class on mismatch | No change | Add Output Tag to the object’s existing classes |
| Remove output class on match | Remove Output Tag from the object | No change |
| Remove output class on mismatch | No change | Remove Output Tag from the object |
| Remove objects matching criteria | Clear all classes from the object | No change |
| Keep objects matching criteria (default) | No change | Clear all classes from the object |
| Reclassify on match | Clear all classes, then add Output Tag | No change |
| Reclassify on mismatch | No change | Clear 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).
Choosing a mode
Section titled “Choosing a mode”- 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.
Example: Spot detection
Section titled “Example: Spot detection”Input Classes: the segmentation class Extract Objects gave the spotsMin Size: 3 px²Min circularity: 0.1Allow edge touching: trueMatch Handling: Reclassify on matchOutput Tag: ch1@spotObjects 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.
Example: Marker-positive cells
Section titled “Example: Marker-positive cells”Input Classes: dapi@cellIntensity Filters: Channel 2 · Average · Brighter than · 1200 bitMatch Handling: Add class on matchOutput Tag: cy5@positiveEvery 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.
Example: Reclassify by overlap
Section titled “Example: Reclassify by overlap”Input Classes: ch1@spotIntersecting With: tetraspeck@spotMin Intersection Size: 1 px²Match Handling: Reclassify on matchOutput Tag: tetraspeck@spotAny 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.