Measure object (cell) counts in radial bins

Hi,
I have been making a pipeline to count my cells relative to another object in the middle. I was trying to use MeasureObjectRadialDistribution but I failed. My image has white cells on black background. Would that be a problem? I managed to get the program to count my cells so I think it is not the problem.
Any help would be appreciated.

Thanks,
Karen

Hi Karen,

Objects brighter than the background are normal for CellProfiler analysis, so that should be fine. Can you be more specific in the trouble you are having? Better, would you post your pipeline and an example image or two?

Thanks,
David

Hello,
Here is the pipeline that I tried using and the cells. So I try that I will identify manually the bead in the middle and make radial bins relative to that, and then count the cells per bin. So far, since I cannot figure it out in CellProfiler, I use Fiji to make the bins, save bins individually and then count them using CellProfiler.

Thanks,
Karen




CELLCOUNTPIPELINE2.cp (5.91 KB)

Hello Karen,

Sorry for the delay. I am attaching a pipeline that addresses a number of issues.

(1) You said that you have “white cells on black background” however the image actually has a bright background with dark cells (typical for bright-field). Here’s a screenshot from CellProfiler
CloudApp
So that means that your IdentifyPrimaryObjects is actually not identifying the cells of interest, rather background artifacts. I added ImageMath -> Invert to fix this.
(2) The background on the left side of the image had a marked illumination artifact. I added an EnhanceOrSuppressFeatures -> “Enhance Speckles” to compensate, which has the side effect of smoothening the background. (This also has the side effect of making the cells much lower in absolute intensity, but the background is even lower so that’s OK).
(3) IDPrimary – I changed a few parameters to make the object ID better (IMHO).
(4) IDSecondryObjects: This is used to create an “object” that is the entire field, grown out from the Alox central object. We will use this in RelateObjects, the next module.
(5) RelateObjects: This creates a parent-child relationship between Cell objects and the “Entire_field” object. The benefit here in this module is that the distances of all child objects are measured to the centroid of the Entire_field, and also more importantly, to the Alox object.
(6) ExportToSpreadsheet: Cell objects are exported now, since the distances from each object to the Alox central objects are contained there. Look for “Distance_Centroid_Alox” in the Cell.csv.

Hopefully this works for you!
David
CELLCOUNTPIPELINE_DLogan_Relate.cp (8.52 KB)

Hi David,
I forgot to add that I processed all my pictures first on ImageJ. I changed the image type to 8-bit and did inverse LUT with them. I did not know that you could do it on cellprofiler itself. I have another question. My secondary object is the same for all pictures, how do I retain that the pipeline will just need to ask me once to identify the secondary object? I tried checking retain outlines of secondary objects but that did not work.
Other than that, the pipeline worked great! Thanks!

Hi Karen,

I see re: pre-processing. Yes, it is simpler to just do this in CP, now that you know it can be done.

Note that the Secondary object is always the whole image for every cycle here. This is a non-standard use of IDSecondary, to be sure, but it allows you to count all the cells that “Relate” to the whole image. I any case, what do you mean by “how do I retain that the pipeline will just need to ask me once to identify the secondary object”? Are you referring to drawing the central Alox object every tim ein IdentifyObjectsManually? I would agree that this is not a great way to do it because of variations in your drawing this for each cycle. A better way to do that would be to substitute IdentifyPrimaryObjects for the IdentifyObjectsManually and use a big size criterion to reject objects too small and hopefully you can remove all cells while keeping the Alox object.

Please clarify though, if I misunderstand!

David

Hi David,
For my set of pictures, the location of the alox bead is roughly the same and since I have around 2000 images per set it is a tedious task to identify objects manually every time. :open_mouth:
Thanks! It worked that way! I thought I can only have 1 primary object per pipeline. Thanks for your help. :smiley:

Cheers,
Karen

Good! I was worried about the reproducibility of manual segmentation in TWO subsequent images, let alone 2000(!). Glad to help.
-David

Hi David,
Sorry to bother again. I am having difficulties when cells are clumped together. I am using the pipeline you have sent me before with modifications on the alox bead identification part. I attached a sample image and the pipeline I am currently using. Hope you could help me with it. Thank you.

Cheers,
Karen

Srcellbin.cp (8.74 KB)


Hi Karen,

When brightfield (right?) objects are clumped, they are very hard to declump. I tried changing some settings in IDPrimary (increasing the threshold correction factor, and raising the suppress local maxima), but it didn’t improve that much. You could tweak all you want for one image, but I don’t predict that it will be very robust. I also tried some Morphological filtering (“Morph” module in CP) using the Open operator , but the little intensity depression in the middle of your cells causes issues with this approach (as well as the current approach).

Some thoughts come to mind:
(1) Add a fluorescent marker, preferably for a single subcellular compartment (nucleus, etc). I understand if that is not your first choice, but it is the most straightforward one.
(2) Instead of using the Combined image in ColorToGray, try using the red channel only using the Split option. To my eye it seems (very) marginally cleaner than the combined image.
(3) You could try UntangleWorms. These modules were developed for C. Elegans, but they might work for your images too. There is some more work involved than your current pipeline (defining a “Worm” model, etc) but it might work if you are stuck with bright field.

Good luck!
David