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.
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.
βctrl+Lβ > type βestimate stain vectorsβ and click on Yes.
Click on under auto-detection, this will lead to a change in the stain vectors that is automatically saved for the corresponding image.
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.
To optimise all the stainson 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
Under Workflow > create script > you can create the code lines for the estimation of the staining vectors. Delete all the lines except the last setColorDeconvolutionStains{...}.
Save the created script as "EstimatingStainVectors_component" under File > Save.
Under Automate > Show script editor the script can always be reopened and needs to be run for example on the training image before detecting the cells.
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.