DAB detection - Cell expansion - QuPath

Hi there @petebankhead,

I’m trying to detect DAB in the cytoplasm, and I watched your videos on how to do that. Now I made a semi-optimized workflow. The only problem is that I have different cell types in my tissue cores, like some giant cells and some smaller ones, including red blood cells and white blood cells. I cannot use the same cell expansion for them; otherwise, it considers red blood cells as giant cells. I can ignore them as I mainly work with tumor cells, but is there any way to apply an automatic cell expansion based on the cell size? So that I can finally classify the expression of the protein in each cell type. As I have different tissue cores in one slide, I guess I cannot apply the detection classifier?

My next question is when I select the tissue microarrays and arrange them in rows and columns, I cannot draw on the tissue or use the wand tool anymore. So I guess the only way is first to classify them and then select the TMAs, am I right?

Not with the built-in cell segmentation.

You can with the (somewhat experimental) StarDist cell segmentation. This is rather more complicated to set up, and requires scripting. The key parameter is cellConstrainScale – see

The detection classifier will end up being applied to all cells across the image, so I think you’re right and the answer is ‘no’.

I’m not sure I understand – can you just deselect the cores first before drawing (e.g. double-click outside a core with the Move tool active)?

1 Like

I don’t know if @sadaffazeli1995 wants to dig into scripting, but I think that you pointed out this was possible in a post here:

Passing the children of a given set of TMA cores (or children of children, or checking “contains”) would allow specific classifiers to be applied to specific cores, perhaps by tissue type.


And wanted to mention that “cell size” in this case is “size of what StarDist detects as the nucleus.” Probably is what everyone meant, but sometimes expectations can be tricky.

1 Like