StrataQuest Home › StrataQuest Glossary › Color Separation
Image Tool

Color Separation

Deconvolving chromogenic stains from brightfield images

View
Definition
Hematoxylin and DAB overlap in every pixel of an IHC image, so no single color channel holds just one of them. Color Separation pulls them apart. You give each marker a reference color, and the engine writes one grayscale image per marker. With Single Reference Shades, a pixel matching the reference reads at the Intensity value you set, and lighter or darker shades read lower or higher.
Pre processing - Basic - Virtual Channel
Video · Primary
Supporting
User Interface - Dimensions (8bit FL)
Video · Supporting
H&EDSPTCH
Video · Supporting
Two methods
Unmixing, or classification by color
You pick the colors
Color Picker, Color Palette or Autodetect
Beer-Lambert in the background
Absorbance adds; transmitted light multiplies
Brightfield quantification
Each marker becomes a grayscale image

How It Works

Color Separation sits in a layer's Pre-Processing section, under Add Operations (basic), and works only in brightfieldLoading... projects. Its Input Image is the Original Image by default, or another color image in the layer. You add one marker per stain with Add Marker, give each a reference color, and choose a Method.

Single Reference Shades performs an unmixing of each pixel's color against the markers' reference colors. Suppose you pick a blue shade for Hematoxylin and set its Intensity to 200. In the Hematoxylin output, a pixel with as much marker as the spot you picked reads 200, a lighter blue reads less and a darker blue more. If the spot you picked was itself a mix, enable Is mixture of, name the other marker and enter its Mixture Percent; Pure Color then shows the corrected reference.

Multiple Reference Shades is a classification instead. Each marker gets a set of shades, and the engine estimates, for every pixel, the probability that it belongs to each shade from the distance between the colors in the chosen Color Space. The closer the color, the brighter the output pixel. Each shade has its own Measure, Gain, Sigma, Gauss and Color Space settings.

Either way, the result is one grayscale imageLoading... per marker, plus a color image per marker if you tick Generate Color Outputs.

Source: StrataQuest 8.1 Engines Reference, ch. 10 (pp. 382–395), ch. 6.2 (pp. 98–99), ch. 6.11 (p. 311); User Manual §11.1 (p. 154).

Simplified

You show the engine what each stain looks like by picking its color. It then makes one black-and-white image per stain, bright where there is a lot of that stain. One method compares each pixel with a single reference color; the other sorts pixels by how close they are to several sample shades.

Science Behind It

Why absorbing stains are harder than fluorescence. In general, a fluorophore adds light and a stain removes it. Transmitted light falls off exponentially with the amount of stain (the Beer-Lambert lawLoading...), so two stains in one spot multiply their transmissions rather than add them. Taking the negative logarithm turns transmission into optical densityLoading..., where stain amounts add. That is the space in which textbook color deconvolution (Ruifrok and Johnston, 2001) separates stains with a matrix inverse.

What StrataQuest documents. The Engines Reference's formula for Single Reference Shades is an image missing from the text, so whether the engine works in optical density is not known from the documentation. StrataQuest does have Convert RGB to Optical Density (OD) in the Basic Operations Module, described as lossless and based on the Beer-Lambert law, so you can build an OD image yourself.

How many stains fit in RGB. In the textbook linear model, an RGB camera gives three numbers per pixel, so at most three stains can be solved for exactly. The Engines Reference states no such limit for Color Separation. Only Autodetect Colors is restricted, to two markers.

Color spaces for clustering. Multiple Reference Shades lets you pick the color spaceLoading... and the distance, Euclidian or Manhattan. RGB is not recommended, because lighter shades of different colors may group together. HSV/HSL group shades of different intensities, and LAB/LUV are recommended because they are closer to human perception. In general, LAB was designed so that equal distances look roughly equally different to the eye, which is why it suits color clustering.

Simplified

Stains darken the light passing through them, and two stains together darken it by multiplying, not adding. Converting to optical density makes the stains add again, which is the textbook way to split them. StrataQuest's manual doesn't say whether Color Separation does that internally, but it offers the conversion as a separate operation.

Practical Example

The Engines Reference example is an 8-bit RGB image of a Ki67 IHC stain on colon tissue, separated into Hematoxylin and Ki67.

  1. Add Color Separation, choose Single Reference Shades, and define two markers, Hematoxylin and Ki67.
  2. Press Autodetect Colors, or pick each reference with the Color Picker. Autodetect works on a 1000 × 1000 pixel area; if it assigns an unexpected color, change Outliers (%) to leave out extreme shades.
  3. Check each marker with View Gray Image before moving on.
  4. Use the Hematoxylin image for NucleiLoading... detection and the Ki67 image as the Shades input of Standard MeasurementsLoading.... The engine's Quick Action Add Nuclei Segmentation and measurements sets up that pair for the first marker.

Several Threshold and Compare examples in the Engines Reference start from these same two images, combined into one grayscale image and turned into a maskLoading... with a threshold.

Simplified

For a Ki67 stain, Color Separation gives a hematoxylin image, where every nucleus shows, and a Ki67 image, where only the stained ones do. Detect nuclei on the first and measure Ki67 on the second, and a brown color becomes a number per cell.

Connected Terms

Share This Term
Term Connections