Display Data on Image Question - LUT Related

Cell Profiler Gurus,

I’m wanting to export images from a pipeline in which I overlay intensity data using the ‘Display Data on Image’ module. I’ve discovered that the scale for the LUT is linked to the range of each individual image which makes comparisons of different images in the batch impossible. Is there a way to set the range (low to high) for the LUT in this module so that you can compare within or between a batch of images knowing that the color ‘red’ on the LUT gradient is always some set value?

Thanks for your help!

David

Hi David,

Do you have a RescaleIntensity module in your pipeline? CellProfiler does not otherwise rescale each individual image’s intensity, as far as I can think of. So what you report is actually not what I would expect, except for RescaleIntensity.

CellProfiler purposefully rescales each image from 0-to-1 so that one can compare, say, images from 12-bit and 16-bit cameras. The scaling is gleaned from NamesAndTypes, either the setting “Image metadata” or “Image bit-depth”. It’s possible also that your image file’s metadata are spurious and so changing the setting to bit-depth might help.

Does that help?
David

David,

Nope, no Rescale. I tried switching from Image metadata to Image bit-depth in the NamesandTypes module but no change. If you step through the pipeline using TestMode you can see when you reach the DisplayDataonImage step that the LUT values differ between the two image sets attached. In one case “green” is ~0.21 and in the other image it is ~0.17. I’m sure the values reported are correct but the display is being generated on an image by image basis so the LUT scale isn’t fixed. Let me know if I can provide further details.

Thanks for your help!

David
David111014.cppipe (11.3 KB)







Hi,

I see what you are getting at now, sorry for the delay. Unfortunately, as far as I know the colormap scale is automatic to the range of values within the image. I will add your request to scale from [0,1] to our feature request list, but I cannot promise when this will be done.

If you really want to, you could hack this by adding a single pixel in each image with an intensity =1 and another =0 and then I believe the range should scale fully, however a better solution would be for us to add an option for this!

Cheers,
David

David,

Thanks for getting back to me. Too bad this isn’t implemented yet - hopefully someone will find time to squeeze it in in the future :smile:

As for adding a single pixel, is there a way - within CellProfiler - to do this? If so, I’ll give it a go. If not, I’ll see what can be done in another platform.

Best,
David

No, not within CellProfiler that I can think of.

FYI, the issue I posted is here: github.com/CellProfiler/CellPro … ssues/1269

Cheers,
David

This colorbar feature has been implemented. Anyone can try it by downloading and installing the latest trunk build here: cellprofiler.org/cgi-bin/trunk_build.cgi
Beware the caveats listed there!

David

Thanks very much for adding this feature! I’ll download the latest build and give it a go.

Thanks again!

David