CellProfiler Image Thresholding and Speckle counting in 32 bit TIFF Images

Hello,

We are trying to count the number of cells positive for three different fluorescent markers, acquired on a confocal microscope at 32 bits. We are running into trouble with the autofluorescence and CellProfiler identifying too many false positive puncta, falsely inflating the number of positive cells.

I have tried all the different threshold methods, illumination correction, subtracting out a percentage of the intensity of our negative control image, thresholding twice, smoothing, enhancing speckles, etc. So far, the closest we’ve gotten to our hand-counted values is through subtracting the value of the intensity of the negative control image from the experimental images and then using IdentifyPrimaryObjects. Otherwise, even with maximum thresholding, IdentifyPrimaryObjects identifies way too many speckles (so they cover the entire image). The other way I have gotten the number of objects identified to a reasonable number is by rescaling the intensity of my images (stretch to the full spectrum) and then thresholding twice (once before IdentifyPrimaryObjects and once within IdentifyPrimaryObjects). Even still, I have to use RobustBackground and remove 90% of the lower outliers. However, these results are completely different from our hand-counted numbers, and we are worried that rescaling affects the relative amounts of positive fluorescent puncta in each image.

Essentially, I am at a loss. I came across some posts talking about CellProfiler acting strangely with 32-bit images, so I converted my images to 16-bit, but those results were not accurate either.

I hope I have been clear – any help is appreciated. I am happy to attach my various pipelines and example images if needed, and please let me know if there is anything I can clarify.

Thank you,
Shannon

Hi @WhatTheToast,

If possible, please upload the pipeline and an sample image along with the screen shot of the problematic step. We could help you better!!!

Regards,

Lakshmi
Fujifilm Wako Automation (Consultant)
www.wakoautomation.com
For CellProfiler training or optimised pipeline write to,
lakshmi.balasubramanian.contractor@fujifilm.com

Read more on our site.
Yokogawa CV8000 - The Ultimate in Confocal HCS
https://www.wakoautomation.com/products/yokogawa-high-content-imaging

Join us at, https://www.slas2020.org

I have attached example images and pipelines. Please excuse the delay!

Negative:


Positive:

Negative: CIE16_Negative_090519fusedMergedAll-6.tif (16.0 MB)
Positive: Naive4_082819fusedMergedAll_s4l_CeA-1.tif (16.0 MB)

Pipeline with rescaling intensities and double thresholding:
TestCellCountRescale.cpproj (615.9 KB)
Pipeline with subtraction of 50% negative intensity:
Inprogress Cell counting.cpproj (195.8 KB)

Example images of identifying too many speckle objects:
with cell mask:
image
without mask:
image

Hi,

You’ll need to use the RescaleIntensity and/or ImageMath modules to rescale these images to 0-1 (which CellProfiler assumes they are, and does automatically upon loading when images are 8 or 16 bit), either by dividing by a particular value in ImageMath then clipping to 0-1 or in RescaleIntensity to set specific values to 0-1; that should solve most of your issues.

Hi @bcimini,

Thank you for your suggestions! I did try using RescaleIntensity, and there is an example of my attempts in my “Rescale” Pipeline above. The results were quite different from the results when the images were hand-counted. Also, I am worried that because we are measuring puncta intensity, rescaling the intensity in CellProfiler will alter the relative intensities and offer false results. Is this something to be concerned about?

Thank you

Hi @bcimini,

If I use RescaleIntensity (Choose specific values to be reset to a custom range, minimum of all images, maximum of all images, set from 0-1), and then threshold (twice, once with Otsu and once without advanced settings, although it looks similar even if I use advanced settings) my images end up like this.

What am I doing wrong?

Thank you,
Shannon

Hi Shannon,

I can’t reproduce the original module snapshots you posted with the pipeline and images you provided (up there the threshold is 1, which says to me the images were NOT rescaled properly); I get what look like pretty reasonable results with a threshold of <1 (see below).

I would personally just use ImageMath to use multiply each image by 1/(max possible value of your camera) (see the second screenshot below- I guessed it was 4095 but you would set the actual decimal number to whatever is right), which will correctly scale your images from 0-1, without worrying about relative scaling since the factor is a constant.

As for your second screenshot, for speckly images you probably want to use RobustBackground thresholding, possibly after using the EnhanceOrSuppressFeatures module, but I’m not sure what in fact will work best for you.


Hi Beth,

Using RobustBackground twice after rescaling, I’ve been able to get CellProfiler to identify fewer objects, which seems to be on the right track. However, there are still far too many objects identified to be accurate puncta.
Any suggestions?

image

image