Identifying nonzero pixels


I have a set of cell images which have very bright intensity on the membrane, weak intensity in the cytosol, and very weak intensity in the extracellular space. I’m planning on doing a set of image analysis steps in CellProfiler, the first of which is thresholding out the signal so as to separate the membrane/cytoplasm from the extracellular background fluorescence. Judging by the pixel intensity values that I see by just scanning the cursor around the image, this should be possible - the weak cytoplasmic fluorescence is still ~2x greater than the extracellular signal. I’m playing with different thresholds and I’d like to validate the results by showing the pixels that get cut off: that is, I apply a low pass filter so that everything above threshold goes away (becomes zero) and everything below threshold retains its associated greyscale value.

I now want to make the image binary so that I can see exactly which pixels get thresholded out. However, when I perform Process->Binary->Make Binary, I see that ImageJ again performs some sort of thresholding - all but a few speckles in the extracellular space get set to zero, when instead they should have been set to 255 (Because they were low non-zero). Is there a way to simply highlight all non-zero pixels and make them the same color/intensity?

Thanks for any help.

Hi @DanoBit,

You’re right, it uses the Default threshold method.[quote=“DanoBit, post:1, topic:5198”]
Is there a way to simply highlight all non-zero pixels and make them the same color/intensity?

You could try Image > Color > Edit LUT and make your own scheme.

I haven’t played with it, but I see in Fiji there is a command Edit LUT as Text (press L to get the Command Launcher and search on the name). Then you could edit the LUT directly instead of clicking on 254 little squares.

The 3 columns of numbers correspond to the red, green, and blue components of the displayed color for each pixel value, from 0 to 255.

Then I think you could save your new LUT as a text file and load it using File > Import > LUT.

Thanks, that’s exactly what I wanted! I just set the zero pixel to red 255 on the graphical LUT editor and it gave me all the information I needed. I guess I didn’t even need to make the image binary; just needed a clear distinction between zero vs. low non-zero pixels. Thank you!

Glad that this works for you, @DanoBit!

Also have a look at the HiLo LUT that serves a similar purpose.