Rescaling intensities in objects

Hi CellProfiler Team,
Before I start:
Great job, thanks a lot for that tool! We really appreciate your work.

So my aim is to identify foci within a nucleus. Therefore two pictures DAPI (nucleus) and TRITC (foci).

First step recognition of Nuclei works ok.

Second step identification of foci does not.
I think my problem is that just playing around with the threshold is not sufficient, because I have slightly different signal to background ratios within one image from nucleus to nucleus.

My solution would be normalizing the intensities from nucleus to nucleus whereas the nuclei detection works great. I wanted to set the max intensity in each foci stain within one nucleus to one, thereby getting the chance to put the threshold to a certain range that is then fitting to each foci stain in each nucleus.

I also tried saving each object from the first nuclei identification as a separate image to process each nucleus on its own, but the ‘save object’ just saves the shape of the object and did not help me much.

All image illumination corrections and rescaling functions just work on the whole image not on individual outlined objects… so either did not help.

Perhaps there are other ways to do it I am open for suggestions.

cheers sven
PS.: using CellProfiler v.10415
original images, pipeline and two different threshold settings for the identification of the foci are attached

pipeline.cp (12.6 KB)

Hi Sven,

My recommendation here would be use top-hat filtering to enhance the speckles. You can access this functionality via the EnhanceOrSupressfeatures module, with Enhance as the operation, Speckles as the feature type and the filter size set to a size larger than the foci but smaller than the gradations in intensity in the nucleus (10 pixels seemed to work fine, but you’ll need to confirm).

The result is an enhanced image which you can then input into IdentifyPrimaryObjs. Chances are you can omit the masking step beforehand, though it shouldn’t hurt. Also, Background or RobustBackground tends to work well for detecting speckles in these enhanced images, and you may need to uncheck the “Try to merge objects…” and “Discard objects touched the border” settings. I would also increase the smoothing filter size in IdentifyPrimaryObjs to 1 or set it to Automatic.

Lastly, you can omit the RescaleIntensity modules; the use of RescaleIntensity would not have worked in the way you intended since it divides each image by a measurement, rather than each object.

Hope this helps!

Another suggestion, in case others have this same particular question: There are several “Per-Object” thresholding options within IdentifyPrimary. Per-object thresholding works great when the background levels of fluorescence vary from cell to cell, although you can get poor results if there are many objects that do not contain sub-objects (because the per-object thresholding tries very hard to find something within each object!) Anyway, this might be something else to try especially for people who cannot use the Enhance speckles idea due to their objects not being tiny spots.

Let us know whether you were able to get something to work nicely!