Automated cell counting

Hi, I’ve been trying to figure out how I would be able to cell count in QuPath. I’m looking to differentiate types of neurons in nissl stained tissue sections. Are there ways to define specific shapes of cells and have qupath count them?


Not exactly, that’s more in line with CellProfiler at the moment. If your whole cell is stained, you could try the pixel classifier to create detection objects from every bit of stained tissue, but you would have to manually create some sort of script to split the cells appropriately if they were touching. Alternatively, you might be able to create an annotation that encompasses all stained area (pixel classifier or pixel threshold tool), and then count nuclei within that stained area (best in a fluorescent image). Depends on your sample though.

Alternatively, if you are comfortable scripting in ImageJ/FIJI, you could run a script from there across a whole slide image:

Though frequently there are ways around that whole mess. If your staining looks like some of the first google image searches:

You could potentially quantify the amount of purple (as your primary stain) within the whole cell. The lower right, in particular, would be pretty easy to detect as the cell detection could find the dark stain in the center as the “nucleus” and then check whether there was a large amount of purple in the “cytoplasm.”

Screen Shot 2020-01-08 at 11.25.08 AM Screen Shot 2020-01-08 at 11.24.51 AM

Hi, I’ve attached a photo of the stain I have and boxed the neuron I was interested in counting (the elongated neuron) and possibly compare it against pyramidal cell numbers. I’m not that comfortable with scripting in imageJ/fiji and also couldn’t open any of my files because they were too large for the program and downsizing them ruined the resolution.

Hmm, that is going to be difficult, though possibly the pixel classifier could be used. Unfortunately, your stain is the same color as your background, and that makes it difficult to track the borders of the tapering points of the cells. In addition, have you considered what that cell would look like if it were oriented straight up and down out of the tissue, rather than perpendicular to the view? How many cells might you be missing if you only look for cells that are perfectly parallel to the slice?

An IHC stain for a marker of interest might be a more accurate method of detecting your cells if you want to quantify them automatically. Maybe someone else will have some better ideas.