StrataQuest Home › StrataQuest Glossary › Label Management
BOM Group

Label Management

Split, fill, grow, shrink and renumber labeled objects

View
Definition
Seven of the eight Labels operations refine a coded imageLoading... that already exists; the eighth, LabelLoading..., makes one from a mask. Cut bottlenecks splits events at thin necks, Fill labels closes interior holes, and Grow labels and Shrink labels move boundaries, optionally inside a mask. The two Re-Label operations repair the numbering. Graph from labels draws lines between nearby events, as a mask.
Eight label operations
Cut, fill, graph, grow, label, re-label, shrink
Shape changes without re-detection
Cut, fill, grow and shrink edit labels
Label index maintenance
Repair missing and duplicate labels
A graph of near neighbors
Lines between events closer than a distance

Operations Reference

OperationSettingsDescription
Cut bottlenecksBottleneck -max length (px) (default -1); Bulge -min area (px) (default -1)Separates distinct structures detected as one event and joined by a thin area, like a bottleneck. The settings bound the length of the cut and the minimum area of each resulting event. It doesn't work for events spread across several fields of view.
Fill labelsFill labels on borderFills holes inside labeled objects. The setting turns filling on or off for holes that touch the image border.
Graph from labelsLine - max length (px) (default 0); Distance mode (centroids or contours); Line - thickness (px) (default 1)Draws a line between each two events closer than the maximum length. Distance mode sets whether distance is measured between centroids or between contours. The result is a mask image (8-bit, 1-channel).
Grow labelsMask; Grow distance (px) (default 0); Seeds ignore mask (default Yes)Each label takes over nearby unlabeled pixels, and each pixel goes to the closest label, up to the grow distance. Growth happens only in the white part of the mask.
LabelConnectivity (default 4-conn)Turns a black-and-white mask into a coded image: each connected set of non-zero pixels gets its own label.
Re-Label (missing)noneRe-labels an already labeled image so the labels are consecutive values.
Re-Label (missing, duplicates)noneCorrects missing labels and duplicate labels, meaning separate objects that share one ID.
Shrink labelsMask; Shrink distance (px) (default 0); Seeds ignore mask (default Yes)The inverse of Grow labels: event bodies get smaller by the shrink distance, only in the white part of the mask.

Every operation here except Label and Graph from labels takes a coded image and returns one; Graph from labels returns a mask. Seeds ignore mask matters when an event already reaches outside the mask. In the reference's Grow labels example, with it set to No everything outside the allowed area is deleted, and with Yes the full seed bodies are kept.

Source: StrataQuest 8.1 Engines Reference, ch. 6.6 (pp. 181–205).

Simplified

Cut bottlenecks separates objects joined by thin bridges. Fill labels fills internal holes. Grow labels and Shrink labels expand or contract boundaries. Re-Label repairs the numbering after objects are removed or merged, and Graph from labels draws lines between nearby objects.

When to Use Which

Splitting Joined Objects

Use Cut bottlenecks when two structures were detected as one event because a thin area joins them, which the reference calls under-segmentation. Its example is a pair of colon structures joined by a narrow neck. Bottleneck -max length (px) caps how long a cut may be, and Bulge -min area (px) rejects cuts that would leave a piece too small. When objects touch along a broad front rather than a neck, a cut-based split has nothing to find; that is the kind of case WatershedLoading... and the distance mapLoading... are usually used for.

Filling and Renumbering

Use Fill labels when labeled objects have interior holes from uneven staining or thresholding, so area covers the whole object. On a mask, before labeling, the matching operation is Fill holesLoading....

Run a Re-Label operation after anything that changes the label list. The reference names Remove labels as a source of missing labels, so Re-Label (missing) follows it. It names Fuse events as a source of duplicates, so Re-Label (missing, duplicates)Loading... follows Fuse eventsLoading.... Duplicates are the worse problem: in image analysis generally, two separate bodies with one ID are measured as one object.

Boundary Modification

Use Grow labels to expand events beyond their detected boundary, for example to approximate the territory around each nucleus. Because each pixel goes to the closest label, neighbors meet roughly halfway between them instead of overlapping. Add a mask to keep growth inside tissue. The Grow (global)Loading... engine does related work in a different place: it builds measurement masks in the layer's Measurements Masks section, with Grow, Shrink and Ring modes.

Use Shrink labels to focus measurements on the core of each object and leave out the edge pixels, where neighboring signal may mix in.

Spatial Analysis

Use Graph from labels to draw connections between events that lie within a chosen distance of each other. The reference's example connects nuclei closer than 15 pixels, and the yellow lines overlaid on the tissue show which cells are near which. The output is a mask: good to view, or to process further with other mask operations, but it doesn't list neighbors per cell by itself. In general terms, this is a distance-threshold graph; with Distance mode set to contours, two large cells can connect even when their centers are far apart.

Simplified

Use Cut bottlenecks to split joined objects and Fill labels to close internal holes. Run Re-Label after any operation that removes or merges objects. Use Grow labels or Shrink labels to move object boundaries, and Graph from labels to see which objects lie close together.

Connected Terms

Share This Term
Term Connections