Error While Processsing SaveImages

Hello,

I am trying to use CellProfiler to increase the intensity of my IMC images for processing in ilastik. My preliminary pipeline consists of the following steps:

SmoothMultichannel to remove hot pixels

MeasureImageIntensity with custom percentiles specified (1,99)

RescaleIntensity with the Divide each image by a previously calculated value method selected. The category is Intensity and the Percentile_99 measurement selected.

SaveImages to a 16-bit tiff

The following message appears:
Error snip

I can fix the error by using the RescaleIntensity module with the Stretch each image to use the full intensity range option selected. However, this removes the desired brightness acheived with the initial option.

Is there a way to save the bright images created with the Percentile_99 (Intensity) option selected that does not trigger this error?

Thanks in advance!

Lindsy

Hi @LindsyRapkin,

Would you be able to upload a copy of the pipeline?

Thanks

Hi @DStirling ,

Please find the pipeline attached.

Thanks for the quick response.

LindsyRescale_pipeline.cppipe (7.4 KB)

Hi @LindsyRapkin,

Thanks for uploading that. I suspect the problem is that your calculation is generating values greater than 1. I expect that there are rare pixels greater than the 99th percentile, so the divisor makes those pixels >1.

One solution would be to run ImageMath with no operation, enabling the option to clip values greater than 1 back down to 1. If you’re doing that you can probably perform the original division in ImageMath too.

Alternatively you could run another RescaleIntensity module to bring the scale back down to the 0-1 range.

Hope that helps

Hi @DStirling ,

With regards to running another RescaleIntensity module, I tried that. It fixed the error but reduced the brightness of the image. I uploaded both the processed and the original images into ilastik and found that they looked similar. I really need to up the brightness.

I will try to play with ImageMath and see if I can find a workaround.

Appreciate the help!

Lindsy

Hi @DStirling ,

ImageMath worked! Thanks again for your suggestions.

Best,
Lindsy

1 Like