Automated cell counting in IHC-DAB

286 views
Skip to first unread message

Claudia Belliveau

unread,
Mar 12, 2019, 2:48:22 PM3/12/19
to QuPath users
Hi all,

I am wondering to see if anyone has automated counting (cell detection) in only DAB stained slides. I have watched the QuPath YouTube tutorials (thanks Pete!) however, I am having trouble optimizing the cell detection because of the difference between my samples and the ones used in the tutorials.

I am working with human brain tissue (IHC-DAB) that is immunolabeled for parvalbumin. I am having issues thresholding (I think) because I cannot detect the lightly stained neurons and disregard "background" at the same time. I feel as though it is a super simple task, but I cannot figure out which parameter I need to change to "perfect" the cell detection.

I have attached 2 pictures in a google drive folder - with and without the cell detection annotations (I have drawn in black two areas of concern - arrow is an artefact, while the circle is an area of tissue fold that I cannot remove even after changing max background intensity as mentioned in the tutorials).


Thank you in advance for your time!

micros...@gmail.com

unread,
Mar 12, 2019, 7:06:12 PM3/12/19
to QuPath users
Two things I would try first based on those images. First, work on your color vectors, and use the hematoxylin color vector for your DAB stain. That lets you use Hematoxylin from the dropdown menu rather than Optical denisty... which is somewhat restrictive. Second you may want to play with the background radius and max background intensity. I think the sort of thing you have circled is exactly what that is for, but I can't recommend specific values based off the png.

Hard to be more specific without the original image.

micros...@gmail.com

unread,
Mar 12, 2019, 8:25:14 PM3/12/19
to QuPath users
Or maybe I can a little:
For the color vectors, create an annotation like I above, and then double click the hematoxylin vector and use that ROI as the color vector. Don't change the name.
Use the area II to set the color vector for DAB.

Try the cell detection again at that point using the Hematoxylin option at the top.

Claudia B

unread,
Mar 14, 2019, 2:10:46 PM3/14/19
to QuPath users
Hi microscopyra,

I have tried what you mentioned, but it completely ruins the detection...

The original file has been added to the file at this link - https://drive.google.com/drive/folders/1RY_UwubnMJNwZzMZCZ0XohQxYs0vGGBy?usp=sharing titled image_01

micros...@gmail.com

unread,
Mar 14, 2019, 5:11:43 PM3/14/19
to QuPath users
Sorry for the delay, but you are right, the background is basically the stain itself, so color separation won't work. I was able to get this playing with the background intensity, though.

Using:
runPlugin('qupath.imagej.detect.nuclei.WatershedCellDetection', '{"detectionImageBrightfield": "Optical density sum",  "requestedPixelSizeMicrons": 0.5,  "backgroundRadiusMicrons": 10.0,  "medianRadiusMicrons": 0.0,  "sigmaMicrons": 2.0,  "minAreaMicrons": 30.0,  "maxAreaMicrons": 400.0,  "threshold": 0.15,  "maxBackground": 0.2,  "watershedPostProcess": true,  "excludeDAB": false,  "cellExpansionMicrons": 5.0,  "includeNuclei": true,  "smoothBoundaries": true,  "makeMeasurements": true}');


You may want to drop the threshold slightly more, I didn't go for perfection due to my current circumstances :)

If you want to get rid of background, I would recommend using 0.1 cell expansion, add RGB measurements, and see if you can pick up and delete the "bad" cells that way.
For example:
selectDetections();
runPlugin
('qupath.lib.algorithms.IntensityFeaturesPlugin', '{"pixelSizeMicrons": 0.7,  "region": "ROI",  "tileSizeMicrons": 25.0,  "colorOD": false,  "colorStain1": false,  "colorStain2": false,  "colorStain3": false,  "colorRed": true,  "colorGreen": true,  "colorBlue": true,  "colorHue": false,  "colorSaturation": false,  "colorBrightness": false,  "doMean": true,  "doStdDev": false,  "doMinMax": false,  "doMedian": true,  "doHaralick": false,  "haralickDistance": 1,  "haralickBins": 32}');

I found that the bit of fluff had equal red and green measurements, so that might be a possibility if it is important enough to remove them.


micros...@gmail.com

unread,
Mar 14, 2019, 5:14:03 PM3/14/19
to QuPath users
If you want to get even crazier, you could probably script an ImageJ macro to do a rolling ball background subtraction... but that would take some coding :)
Reply all
Reply to author
Forward
0 new messages