Estimating Stain Vectors

The colour deconvolution method introduced by Ruifrok and Johnston is used by QuPath.

Once the projects are created, and the project_Classifiers is opned, the next step is to estimate the stain vectors.

The images in this tutorial are from a Windows laptop with version 0.4.4 of QuPath whereas we updated the rest to the newest QuPath version 0.5.1 which is needed for this tutorial.

If you are working with a Mac your interface might look different, although it is the same software.

If your analysis includes different tissue components estimate the staining vectors for each of them resulting in a specific final script for each.

Within this part of the step-by-step guide, we create an estimating staing vector script, specific for each tissue component.
  1. With an open scan as an example, shortcut “R” or click on (draw square) around a section with brown cells, blue cells, and a background.

  1. “ctrl+L” > type “estimate stain vectors” and click on Yes.

  1. Click on under auto-detection, this will lead to a change in the stain vectors that is automatically saved for the corresponding image.

  1. Select Ok, and set a name for stain vectors H-DAB estimated.

Should you experience any difficulties, please visit the original broad QuPath website tutorial.

  1. To optimise all the stains on the initial image, Click on and optimise all the stains.

    • choose hematoxylin and set it on auto, perform the same for DAB

Shortcuts for view of different colors

  • “1” Original stain

  • “2” Hematoxylin

  • “3” DAB

  • "4” Residual

  • “5” normalised optical density colors

Hematoxylin channel before auto optimisation
Hematoxylin channel after auto optimisation

In this video, Pete Bankhead the creator of QuPath shows the 2 different ways how to estimate the correct stain vectors for DAB and Hematoxylin. Note that the above instruction shows the second method, with a region containing immunopositive cells (brown) and immunonegative cells (blue) as well as a background. The other method sets the vectors individually, by setting them manually for the DAB and Hematoxylin. Both methods work and can be used.

Youtube tutorial for H-DAB analysis by Pete Bankhead who created QuPath.

License:

Ruifrok, Arnout & Johnston, Dennis. (2001). Ruifrok AC, Johnston DA. Quantification of histochemical staining by color deconvolution. Anal Quant Cytol Histol 23: 291-299. Analytical and quantitative cytology and histology / the International Academy of Cytology [and] American Society of Cytology. 23. 291-9.

Last updated