Foci counting Imaris or cell profiller

I’m new in the field of image analysis. I have to analyse differents set of images. I tried to do the analysis with imaris but the nucleus segmentation is not very accurate.
The first one is Lymphocyte RGB with: red H2AX, green CD3, blue DAPI.
How I can have the number of foci per cells, their MFI, the area of each foci and the MFI of DAPI for the lymphocyte CD3+ (green +) and CD3- (green -).
I tried the tutorial for the foci counting with Cell profiler but I don’t know how to split between CD3+ and CD3- and how to remove apoptotic cells (red everywhere in cells).

Can you help me to design the pipeline?
I send you 2 files compressed for positive for H2AX IR and the test (where we should have some foci) (17.3 MB) (14.2 MB)

Thank you,
Kind regards,

I don’t have any experience with CellProfiler, unfortunately, and I suspect Imaris is overkill for this, but I did take a quick shot with QuPath. I didn’t do anything too technical, but a script:

runPlugin('qupath.imagej.detect.nuclei.WatershedCellDetection', '{"detectionImageFluorescence": 3,  "requestedPixelSizeMicrons": 0.1,  "backgroundRadiusMicrons": 0.0,  "medianRadiusMicrons": 0.0,  "sigmaMicrons": 1.0,  "minAreaMicrons": 10.0,  "maxAreaMicrons": 400.0,  "threshold": 60.0,  "watershedPostProcess": true,  "cellExpansionMicrons": 1.0,  "includeNuclei": true,  "smoothBoundaries": true,  "makeMeasurements": true}');
//this line classifies the green cells as positive
setCellIntensityClassifications("Cell: Channel 2 mean", 40)
//the next two lines remove cells that have too much red in the nucleus, 150 is a value you may want to adjust
dead = getCellObjects().findAll{measurement(it, "Nucleus: Channel 1 mean") > 150}
removeObjects(dead, false)
//This final line is the spot detection, and the 100.0 is likely a value you will want to raise or lower.
runPlugin('qupath.imagej.detect.cells.SubcellularDetection', '{"detection[Channel 1]": 100.0,  "doSmoothing": true,  "splitByIntensity": true,  "splitByShape": true,  "spotSizeMicrons": 1.0,  "minSpotSizeMicrons": 0.2,  "maxSpotSizeMicrons": 2.0,  "includeClusters": true}');

Gave me the following for your irradiated image:

where red colored cells are “positive” for green.

Some issues: The dark green areas (green hand drawn arrow) are considered too large and therefor probably multiple spots. That behavior can be changed. Also in the upper right is an example of something that almost certainly isn’t a cell, but cell detection picked up anyway. Objects that are too red are removed, though, and you can get spot counts as desired from either a CSV export of detections, or by creating a summary measurement.

And you would probably want to set your own thresholds, this is just an example. If you are more comfortable with CellProfiler, hopefully someone will jump in on that front.

I can go into more detail if you want, this was just a quick flyby. Other values could definitely be calculated. However, the MFI for the DAPI signal is not going to be terribly meaningful, as you are well over your detector’s threshold in most cells.


Dear Mike,
Thank you for this answer I will try your script with QuPath and I will also try to find a way to do this analysis with cellProfiler. What is the main difference between CellProfiler and QuPath ?
I saw a lot of software but i’m a bit lost Fiji, Imaris, Arivis, QuPath, CellProfiler.

Kind regards,

I haven’t used CellProfiler at all, but my understanding is it has many more options when it comes to cell detection, and so can be more precise about detecting nuclei, or following different rules for creating the cells. QuPath is intended for large, whole slide images, and only has a few variables to change around for cell detection, but at least it used to handle much larger images. Imaris is really intended for 3D images/Zstacks (it can handle files in the terabyte range), but I have definitely used it for 2D time lapse projects. Arivis I have only demoed, and while the interactive VR option was neat, it was at such low resolution it didn’t seem too useful yet.

In the end, though, the primary difference here is that I know how to use QuPath, and it only took me about 5 minutes to do :slight_smile:


Thank you for everything.

1 Like

One more note, the script above was written for QuPath 0.1.2/0.1.3, where your image opened with the ImageJ server. Some of the channels/names might change if you use QuPath 0.2.0, so let me know if you run into any problems with the script.