StrataQuest Home › StrataQuest Glossary › Nuclei Detection
Core Engine

Nuclei Detection

Finding each nucleus in a fluorescence-like image

View
Definition
Before you can measure a cell, you need to know where it is. The Nuclei engine answers that by finding each nucleus in a grayscale image where nuclei are the bright structures on a dark background. It gives every nucleus its own ID in a coded imageLoading..., so touching nuclei stay separate events. The measurement, classification and spatial steps downstream all start from that map.
TQ to SQ workflow
Video · Primary
Guided workflow - nucl and cell measurements
Video · Primary
H&EDSPTCH
Video · Primary
Pre processing - Basic - Virtual Channel
Video · Primary
User Interface - Raw Data
Video · Primary
Supporting
Detection - Nuclei Segmentation Classic
Video · Supporting
User Interface - Object Inspector
Video · Supporting
Diagrams - How to create Histograms and Scattergrams
Video · Supporting
Pre processing - Import - Coded Image
Video · Supporting
Measurements Mask - Cellular
Video · Supporting
Pre processing - Advanced - Phenotype Interaction
Video · Supporting
Everything downstream depends on it
Every cell measurement starts here
Automatic Background Threshold
Otsu's method, within a range you set
Touching nuclei stay separate
One ID per event, plus merging rules
Coded Image Output
Unique ID per nucleus

How It Works

The Nuclei engine sits in a layer's Detection section (Add > Detection > Nuclei). Give it one grayscale image in which nuclei are the bright structures on a dark background, such as a DAPI channel. That is the only kind of image it works with. On a brightfield slide, the "Add IHC 2/3" quick action adds a Color SeparationLoading... and runs Nuclei on its first marker.

The Engines Reference describes what goes in and what comes out, not the segmentation algorithm in between. Nuclei size is a hint, with no unit, that tells the algorithm to detect smaller or larger nuclei. A background threshold, automatic (Otsu's method) or manual, separates nuclear signal from background. The result is a set of events in a coded image, one unique ID per nucleus.

After segmentation, three kinds of correction are available. Remove small-sized objects and Remove weakly stained objects sort all events by area or by mean intensity and drop the stated percentage from the bottom. Remove Labels drops events outside fixed area and intensity limits, and Use Merging Rules joins touching events whose combination meets every condition. Post Processing Order determines whether removing or merging comes first.

With Use Border Input on, the engine adds a border of pixels from neighboring fields of viewLoading..., to preserve the continuity of information across tile edges. Border option sets what fills the border where there is no neighbor.

Simplified

Give the engine an image where nuclei glow on a dark background. It finds each nucleus and gives it its own number, so touching nuclei stay separate. Then you can tidy the result: drop the smallest or faintest objects, drop objects outside size or brightness limits, or join pieces of one nucleus that came out split.

Science Behind It

Photons set the floor. In fluorescence imaging generally, each pixel value is built from counted photons, and photon counts carry Poisson noise. Detect 100 photons and the noise is about √100 = 10, a 10% uncertainty. In a dim nucleus that graininess can look like texture, so variation you see in a faint nucleus may be counting noise rather than biology. A common rule of thumb in imaging, the Rose criterion, puts reliable detection at a contrast about five times the noise.

What Otsu's method does. Suppose you try every possible threshold. Each one splits the pixels into "background" and "nucleus," and you measure how spread out each group is. Otsu's method picks the threshold that makes the two groups most uniform inside, which is the same as pushing their means farthest apart. The Engines Reference states this, and adds a limitation: with uneven illumination the histogram can hold more than two classes.

Narrowing the range is the engine's answer to that limitation. Lower must sit above the background values and below the dimmest nuclei you want detected. Upper must sit above the average nucleus mean intensity, and lowering it forces a lower threshold.

Splitting touching nuclei, in general. Image processing has several standard ways to separate touching nuclei. The watershedLoading... family floods an intensity or distance landscape from one seed per object, other methods detect blobs at a chosen scale, and newer ones learn the task from examples. The Engines Reference doesn't say which approach the Nuclei engine uses, so read these as background, not as a description of the engine. StrataQuest does offer Watershed (global) as a separate engine, for when you want to supply the seeds yourself.

Percentages versus limits. The two removal styles answer different questions. A percentage always removes the bottom fraction of the events found, whatever their values, so it follows the population in front of it. Fixed limits remove events by value, so the same rule applies to every sample, which is easier to defend when you compare samples.

Simplified

A fluorescence image is built from counted photons, so dim nuclei look grainy for statistical reasons, not biological ones. Otsu's method picks the brightness cutoff that splits pixels into two groups as cleanly as possible. How the engine then separates touching nuclei isn't described in the documentation.

Parameters & Settings

ParameterDescription
InputThe input image: grayscale, with nuclei as the bright structures on a dark background (fluorescence-like).
Nuclei sizeThe average size of the nuclei in the source image. A hint for the algorithm to detect smaller or larger nuclei, with no measurement unit.
Remove small-sized objectsThe percentage of the smallest events to remove. After segmentation, all events are sorted by area (ascending) and the smallest are removed.
Remove weakly stained objectsThe percentage of the dimmest events to remove, after sorting all events by mean intensity (ascending).
Automatic Background ThresholdEnables or disables automatic computation of the background threshold. Automatic uses Otsu's method, within the intensity range set by Lower (above the background, below the dimmest nuclei to detect) and Upper (above the average nucleus mean intensity). Manual uses a value you enter.
Post Processing OrderRemove events followed by Merge events, or Merge events followed by Remove events.
Remove LabelsEnables removal criteria: Smaller Than and Larger Than (area limits), Weaker Than and Stronger Than (mean intensity limits). Events outside the limits are removed.
Use Merging RulesAll touching events are candidates for merging; a combination is merged only if it meets every condition: Max Involved Area, Max Combined Area, Max Involved Compactness, Group Max (most events in one combination) and Min Resulting Compactness.
Use Border InputUses pixels from neighboring FOVs as a border. Border size sets its width; Border option sets the artificial border where there is no neighbor: Copy last pixels, Fill with black (0), Fill with white (255) or Wrap border.

The reference gives no default values for this engine. A workable start is to leave both percentage removals at 0, so you can see everything the engine found, and add removal or merging only once you know what the debris and the split nuclei look like.

Source: StrataQuest 8.1 Engines Reference, ch. 26 (pp. 449–454); User Manual §11.1.1 (p. 154).

Simplified

The settings you'll touch most: Nuclei size (larger for big nuclei, smaller for small ones), the automatic background threshold with its Lower and Upper limits, and the removal settings for debris. Use Border Input lets nuclei at tile edges draw on their neighbors' pixels.

Practical Example

Suppose you have a multiplex immunofluorescence scan of colorectal cancer with a DAPI channel.

  1. In the layer's Detection section, add Nuclei and set Input to the DAPI channel. On a fluorescence sample, the quick action "Add Single cell analysis on" does this and adds Standard Measurements.
  2. Set Nuclei size by looking at the result overlay. Because it tells the algorithm whether to detect larger or smaller nuclei, try raising it if large nuclei come out in pieces, and lowering it if small neighbors are joined.
  3. Leave Automatic Background Threshold on. If dim nuclei go missing, check that Lower sits below them.
  4. Turn on Use Merging Rules with a Max Combined Area near your largest real nucleus, so fragments can rejoin but separate nuclei can't fuse into something larger.
  5. If you also need the zone around each nucleus, add Grow (global)Loading... or Cellular in Measurements Masks.

Each nucleus then anchors its measurements. Standard Measurements reads the coded image for shape, and one grayscale channel per engine for intensity.

Simplified

Point the engine at the DAPI channel, match Nuclei size to your cells, and keep the automatic threshold. Every nucleus found gets its own ID, and from there you can measure how much of each marker every cell carries.

Connected Terms

Share This Term
Term Connections