Skip to content

Object Classes

Every object carries zero or more classes - the labels every object-processing command, filter, and the results table use to select, count, and export object populations. Classes start life as a plain number assigned during segmentation and only become a name like dapi@nucleus once Classify Objects says so. This two-tier system explains why several commands distinguish a “segmentation class” from an “object class,” and why Classify Objects is the one command that can move an object between them.

TypeUsed byValues
Segmentation classThreshold, Extract ObjectsA plain number, one per Threshold entry
Object classEvery object-processing command, the results tableUnset, or a number - the same one a segmentation class carries, once extracted

These aren’t arbitrary - an object class and a segmentation class with the same number are the same underlying ID, just read by two different pipeline stages. Extract Objects converts one into the other by wrapping the number, not through any lookup table.

A class only has a human name and colour once it’s defined in the Classification tab - that entry (name, colour, notes) is a label attached to one specific object-class number. If a Threshold entry’s segmentation class number happens to match a class you’ve already named, objects created from it show that name immediately; if not, they show as a plain two-digit number (e.g. 01) until Classify Objects assigns them a real class.

This is why defining classes in the Classification tab before wiring up pipelines makes the rest of the workflow read naturally - the numbers are already meaningful the moment objects appear.

  1. Threshold - each threshold entry is given a segmentation class number, and pixels matching that entry’s intensity range are tagged with it in the binary output.
  2. Connected Components / Watershed - label individual instances within the thresholded regions. They don’t touch classes at all; they only add per-pixel instance IDs on top of the segmentation classes Threshold already assigned.
  3. Extract Objects - creates one object per instance, and gives it an object class equal to its segmentation class number. From this point on, every downstream command works with object classes only.
  4. Classify Objects - the only command that changes an object’s classes after extraction. Its shape and intersection criteria decide whether an object matches, and its Match Handling mode decides what that does to the object’s classes - add a class, strip one, or reclassify (clear everything and assign a new, named class). Reclassifying on match is how a segmentation class becomes a real named class such as dapi@nucleus for the first time.
  5. Everything after - Object Math, Colocalize Objects, Voronoi, Object Transform, Distance Transform, Save Image - all select their input objects purely by object class name, with no awareness of segmentation classes at all.

The classes defined in the Classes panel are project classes. A module can also have its own classes for intermediate results: each use of the module gets its own copy, they never show up in the class list, and their objects are deleted when the module has run - see Internal classes. An object never carries a project class and a group class at the same time.

Every project class has a Results setting in its class settings:

  • Objects (default) - every object of the class is stored with its measurements.
  • Intermediate - the class is only for later steps of the pipeline, e.g. the seeds of Grow Regions. Nothing of it is written to the results: an object that has only intermediate classes is not stored, one that also has a stored class is stored without it, and parent and colocalization partner entries to an object not stored are left out. The pipeline and the viewer see the class as usual; the Classes panel marks it not stored.

An object without any project class - Unset, or with all its classes removed - is not stored either: no object row, no measurements, and no parent or partner entries pointing to it. A class an object needs in the results must therefore be a project class set to Objects.

Because dataset steps such as the trackers read the stored results, they find no objects of an intermediate class - the step gets a warning, fixed by Store class N.

Object classes are stored as a set, not a single value - an object can carry several classes at once (for example, tagged by one Classify Objects step and again by another, without either removing the first). This is what makes Add class on match in Classify Objects useful: it layers a class on top of whatever the object already carries, rather than replacing it.

This also affects Input Classes in Classify Objects and the AI Object Classifier: an object is selected if it carries at least one of the classes listed there - so listing more than one class widens the input population (a logical OR). Leaving it empty selects every object regardless of class.

A couple of segmentation class numbers and one object class value are reserved rather than user-assigned:

ValueMeaning
Segmentation class 0Background - pixels no threshold entry matched
Segmentation class 0xFFFFFFFFManual - reserved for objects coming from manual annotation rather than a pipeline
Object class UnsetNo class at all - the state every object starts in before extraction assigns one, and the state Reclassify/Remove all classes modes put non-matching or matching objects back into. Unset objects are not stored in the results - see below