choosehappy / HistoQC

HistoQC is an open-source quality control tool for digital pathology slides
BSD 3-Clause Clear License
253 stars 100 forks source link

Beginner's question #275

Open dlysiak opened 6 months ago

dlysiak commented 6 months ago

I am a new HistoQC user. I would like to ask what the variables: deconv_c0, deconv_c1, deconv_c2 stand for. I am asking in the relation to the IHC H-DAB staining.

CielAl commented 6 months ago

Please refer to skimage's documentation of "separate_stains"

In general, it follows Ruifrok's color deconvolution (https://pubmed.ncbi.nlm.nih.gov/11531144/) such that, with a given RGB image, and a given stain matrix, it converts the RGB color of each pixel to the target stain space. For instance, Assume your input is RGB, and in the config you use the following setting:

[DeconvolutionModule.separateStains]
stain: hed_from_rgb
use_mask: True

The RGB colored space will be converted to HED, with deconv_c[n] as n-th channel. In this case, deconv_c0 will be the pixel intensity of H stain, deconv_c1 be that of the E stain, and deconv_c2 be the DAB.

However you should be careful since color deconvolution itself is pretty much a primitive way for stain separation and it is applied here for simplicity and only for compute color space statistics.