QuPath H-DAB Project
  • ๐Ÿ“ŠQuPath guide for H-DAB Cell Counting Docs
  • ๐Ÿ’กPipeline
    • ๐Ÿ’กSimple Pipeline
  • Fundamentals
    • ๐Ÿ› ๏ธGetting Set Up
  • QuPath H-Dab Docs
    • ๐Ÿ’กQuPath H-DAB Tutorial
      • Creating and Opening of Projects
      • Estimating Stain Vectors
      • Training Image Creation
      • Cell Detection
      • Object Classifier
      • Tissue Detection
        • 1๏ธโƒฃAutomatic General Tissue Detection
        • 2๏ธโƒฃManual Specific Tissue Detection
    • ๐ŸงพQuPath Script
      • Batch Processing
    • ๐Ÿ“‚Output
  • Result Analysis Docs
    • ๐Ÿ’กProcessing Package Tutorial
      • Addition Information for Python insiders
      • In-Depth Python usage
    • ๐Ÿ—„๏ธFinal Spreadsheet creation
    • ๐Ÿ†˜Out-of-memory error
  • non-expert docs
    • ๐Ÿ”ŽQuPath Installation
    • ๐Ÿ’ปGit Bash Installation
    • ๐Ÿ–ฅ๏ธPython Installation & Packages
    • Git Bash installation
Powered by GitBook
On this page
  1. QuPath H-Dab Docs
  2. QuPath H-DAB Tutorial

Estimating Stain Vectors

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

PreviousCreating and Opening of ProjectsNextTraining Image Creation

Last updated 10 months ago

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.

  1. โ€œctrl+Lโ€ > type โ€œestimate stain vectorsโ€ and click on Yes.

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

    • 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

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.

Create a new folder "scripts" in the project.

setColorDeconvolutionStains('{"Name" : "H-DAB estimated", "Stain 1" : "Hematoxylin", "Values 1" : "0.73481 0.63078 0.24935", "Stain 2" : "DAB", "Values 2" : "0.27519 0.51569 0.81138", "Background" : " 255 255 255"}');

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.

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.

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.

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

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

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

๐Ÿ’ก
QuPath website

Youtube tutorial for H-DAB analysis by who created QuPath.
Pete Bankhead
Within this part of the step-by-step guide, we create an estimating staing vector script, specific for each tissue component.
Hematoxylin channel before auto optimisation
Hematoxylin channel after auto optimisation