Cell detection: exclude stains in multicolor brightfield images?

Hi all,

I got stuck in another issue with multicolor (hematoxylin, DAB, red, green) images.

My basic workflow:

  1. Tissue detection (simple thresholder)
  2. Setting default H-DAB color deconvolution stains
  3. Identification of DAB-stained areas by a simple thresholder, and substracting them from the tissue annotation
  4. Setting color deconvolution stains for the 3 colors ocurring in the remaining tissue (hematoxylin, red, green)
  5. Watershed cell detection in the remaining tissue (Hematoxylin OD)

Unfortunately, after having precisely analysed the 3 color vectors I’m not satisfied with the watershed cell detection as even green-stained cytoplasm is frequently detected as a hematoxylin-stained nucleus. The problem might be that the vectors of hematoxylin and the “green” staining are not differing too much.

So I came up with the idea to “exclude stains” from the image (containing Hematoxylin OD values) that the watershed cell detection is run on, the same way the default option “exclude DAB (membrane staining)” does it, which is working perfectly fine as I experienced before.

In the source code, I tried to identify how exactly the “exclude DAB” option changes the cell detection process, however I didn’t found what I was hoping for.

So my questions are:

  1. Does anyone understand how the “exclude DAB” option is changing the Hematoxylin OD values for each pixel?
  2. Could there be an option to exclude further stainings (with known RGB vectors) from the Hematoxylin OD values, which are used for the watershed cell detection?

Thank you for your help!

It really just sets hematoxylin values to zero if the corresponding pixel value for DAB is higher (code here).

I don’t really plan to revisit that particular cell detection code myself; it is already quite complex, with a lot of parameters, and I don’t think it can be pushed much further. Also, it’s awkward to change because it is now quite well established – and so it’s hard to modify without inadvertently annoying other users by making it worse for their applications.

For those reasons, I’d prefer to investigate completely different methods of cell detection for other applications (e.g. stardist).

(That said, if you’re able to rename your green stain as DAB then you might be able to trick it into doing what you need…)

1 Like

alright, thanks for sharing. I’ll look into stardist, looks interesting to me at first glance!