Quiz: stain separation

Short questions to test your understanding. Try each on paper first, then open the answer. Optical density \mathrm{OD}_c = -\log_{10}(I_c/I_{0,c}); with the unit stain vectors as the columns of S, \mathbf{od} = S\mathbf C and \mathbf C = S^{-1}\mathbf{od}.


Q1. Why can’t we unmix brightfield stains directly on the RGB intensities, as we did with fluorescence?

What happens to the transmitted light when a second stain lies on top of the first?

Fluorescence adds light; absorbing stains each transmit a fraction, so two stains multiply the transmitted intensity. A product is not a linear mixture. The logarithm (optical density) turns the product into a sum, and the linear model holds in OD.


Q2. A background pixel has I = I_0. What is its optical density, and its stain concentrations?

\log 1 = 0.

\mathrm{OD} = -\log_{10}(1) = 0 in every channel, so all concentrations are 0. Unstained glass is the origin of the OD space; that is why I_0 (the white reference) must be right.


Q3. Only the direction of a stain vector matters, not its length. Why?

What happens to C_k if you double the length of column k?

\mathbf{od} = \sum_k C_k\mathbf s_k: doubling \mathbf s_k and halving C_k gives the same OD. The concentration is only defined up to that scale, so the vectors are taken as unit vectors and C_k is measured in “OD units along the stain’s direction”.


Q4. With H&E only, why add a third column, and what does its concentration map show?

How many channels, how many stains? What is perpendicular to both stains?

Three channels and two stains: to invert a 3 \times 3 matrix we need a third column. The cross product of the two stain vectors is perpendicular to both; its map, the residual, is the part of each pixel’s OD that the two stains cannot explain. Near zero everywhere means the stain vectors fit; structure in it means wrong vectors, a third stain or pigment.


Q5. You deconvolve with the published eosin vector, and the hematoxylin map shows a faint copy of the cytoplasm. What is happening, and what would you do?

Compare with bleed-through in the first unit.

Crosstalk: this slide’s eosin differs from the published vector, so part of the eosin OD is attributed to hematoxylin (exactly the bleed-through of a wrong spillover matrix). Estimate the vectors from the image (Macenko), or from single-stained control slides, and check that the residual map drops to noise.


Q6. Very dark nuclei have I = 0 in the red channel. What happens to their optical density, and to the separation?

-\log_{10}(0).

-\log_{10}(0) is infinite: the pixel must be clipped (for example at I = 1, OD = \log_{10} 255 = 2.41 for I_0 = 255). The true OD may be higher, and one channel is clipped while the others are not, so the pixel’s OD direction is wrong: the concentrations of saturated pixels are unreliable. Use a shorter exposure or a brighter lamp.


Q7. Why is an amount read from the DAB map not a measure of how much protein is present?

How is DAB produced?

DAB is deposited by an enzyme reaction: the amount depends on incubation time and saturates, and DAB scatters as well as absorbs, so Beer–Lambert holds only roughly. The map is a relative signal: fine for “positive or negative” and for comparisons within one batch, not for absolute amounts.


Q8. (math) Show that the OD of a pixel with two stains is the sum of the ODs each would have alone.

Write I_c = I_{0,c}\,10^{-s_{c1}C_1}\,10^{-s_{c2}C_2}.

\mathrm{OD}_c = -\log_{10}(I_c/I_{0,c}) = -\log_{10}(10^{-s_{c1}C_1}) - \log_{10}(10^{-s_{c2}C_2}) = s_{c1}C_1 + s_{c2}C_2: the logarithm of a product is the sum of the logarithms.