Core Concept

Coded Image

The labeled data structure behind every detected object

View
Definition
In a coded image, pixel value 47 means "this pixel belongs to object 47." Detection engines produce this map. Every pixel of an event carries the event's unique ID, so touching events stay separate because their IDs differ. Where a fluorescence image records brightness, a coded image records identity, and the measurement engines use those IDs to determine which pixels belong to which cell.
Supporting
Guided workflow - nucl and cell measurements
Video · Supporting
Pre processing - Import - Coded Image
Video · Supporting
Identity map
Every event gets a unique ID
Measurement anchor
Coded says where, Shades says how bright
Shared across layers
Import events instead of detecting twice
Local labels, global objects
Up to 65,535 labels per field

How It Works

Every detection method ends in the same place. Whether objects come from thresholding, from NucleiLoading... detection or from deep learningLoading..., StrataQuest stores the result as a labeled image, which it calls a coded image. All pixels belonging to an event have the same unique ID, so two touching nuclei remain two objects with their own outlines.

In StrataQuest a coded image is a 24-bit color image that can hold up to 65,535 labels. Labels are assigned one field of viewLoading... at a time (local labels), so the limit applies per field. StitchingLoading... then matches labels across field borders into global labels, which are kept in 32-bit images and the project file, so a sample can hold far more objects than one field.

A maskLoading... can become a coded image too. The LabelLoading... operation in the Basic Operations Module treats each connected set of non-zero pixels as one marker and gives it its own value, using 4-connected neighbors by default. Going the other way, the Coded Image engine's Mask from Coded result turns events into a plain mask, and the unique IDs and individual contours are lost.

The engine named Coded Image. Events are visible only in the layer that made them. The Coded Image engine, under Add > Import in a layer's Pre-Processing section, brings a set of events in from another layer, so layersLoading... share events instead of detecting them twice. Its Gates option imports only the subset selected by gates or cutoffsLoading... on a diagram, and events imported that way carry no stitch information.

Source: StrataQuest 8.1 User Manual §11.1.1 (pp. 150–151), §12.3 (pp. 170–171); Engines Reference ch. 9 (pp. 379–381), ch. 6.6 (p. 195), ch. 21 (p. 431), ch. 41 (p. 538).

Simplified

Detection determines which pixels belong to objects. The coded image then gives every object its own number, written into each of its pixels. Nucleus 1's pixels hold 1, nucleus 2's hold 2, and so on, so touching nuclei stay separate.

Science Behind It

Labeling in general. In image processing, turning a mask into numbered objects is called connected component labeling, and background is conventionally 0. Two foreground pixels belong to the same object if a path of foreground pixels joins them. The classic two-pass algorithm hands out provisional labels on a first scan, notes which labels touch, and resolves them on a second, in time proportional to the number of pixels. That is the textbook picture; the StrataQuest manuals don't describe how their engines label internally.

The connectivity question. Take two foreground pixels that touch only at a corner. Under 4-connectivity, where only up, down, left and right count, they are separate objects; under 8-connectivity, which counts diagonals too, they are one. In general, 4-connectivity can break a thin diagonal line into pieces, and 8-connectivity can merge two objects that meet at a single corner. StrataQuest's Label operation offers both and defaults to 4-connected, while the references don't say which rule detection engines such as Nuclei use.

Why the limit per field is enough. 65,535 is the largest number 16 bits can hold, and a single field of view typically holds far fewer cells than that. The sample-wide count lives in the global labels, not in any one image. The User Manual doesn't say how a label is packed into the 24-bit color pixel. When you show a coded image as Contours, Labelled Display draws each event in its own color, which is a view of the IDs rather than the IDs themselves.

From topology to biology. The fluorescence image shows what the tissue looks like; the coded image says what it contains, object by object. Put a photograph of a concert crowd beside the seating chart. The chart shows no faces, but it is what lets you say who sat where, and every measurement hangs on it.

Simplified

Grouping touching pixels into numbered objects is called labeling. The one judgment call is whether pixels touching only at a corner count as touching. StrataQuest's Label operation lets you choose and treats them as separate unless you say otherwise. Each field of view holds up to 65,535 labels, and stitching joins objects across fields.

Practical Example

Suppose Nuclei detection runs on the DAPI channel of a whole tissue section.

  • Each field of view's coded image numbers its own nuclei.
  • Stitching joins nuclei that cross field borders and gives the section, say, 12,000 global objects. The stitching information lives in the project file, not in the coded images.
  • Standard MeasurementsLoading... (global) reads the coded image for area, shape and Centroid X and Y, and one grayscale Shades image for intensity. To measure every channel, add one Standard Measurements engine per channel.
  • Diagrams and cutoffs classify the nuclei from those measurements, and Phenotype InteractionsLoading... counts, for each cell of a primary phenotype, the cells of a secondary phenotype within a distance interval.
  • To study only the Ki-67-positive cells, the Coded Image engine imports that gated subset into a new layer, where the Existing Coded engine sets them as the layer's detected events so they can be measured without detecting again.

Each cell keeps one identity, its ID in the coded image, from detection to the last spatial statistic.

Simplified

Detect 12,000 nuclei across a section, and each field's coded image labels the nuclei inside it, while stitching keeps one identity for a nucleus that crosses a field border. Measuring biomarkers, classifying cells and studying who sits near whom all rely on that numbering.

Connected Terms

Share This Term
Term Connections