Posted by
Kenneth R Sloan on
May 28, 2015; 2:31pm
URL: http://imagej.273.s1.nabble.com/32-bit-color-LUT-editor-tp5012968p5012971.html
With a ratio image, you may want to take extra care.
The idea is to map your expected range of values to [0,255]. You have values which fall in
[0.0, 1.0) on the one hand, and (0.0,<pick a big number>) on the other hand (with 1.0 being the dividing line.
So, the trick is to design a mapping s.t.:
0.0 -> 0
1.0 -> 127
<pick a big number> -> 254
greater than <pick a big number> -> 255
The reason I specify <pick a big number> is that you probably don’t want to go out to infinity, but rather have some value in mind that is as big as you want to consider
I would then design a LUT for which:
0 —> a distinctive color meaning 0.0000000
[1,126] —> color representing one side
127 -> a distinctive color meaning “the two images match here”
[128, 254] -> color representing the other side
255 -> a distinctive color meaning “to infinity, and beyond”
That leaves you with 5 colors to choose. I won’t step into the debate on who can see what colors. If all you need is a binary distinction - use BLACK and WHITE. The “distinctive colors” representing single values can be dispensed with - but I recommend keeping them.
So - your remaining problem is to produce the mapping from [0.0, <pick a big number>] -> [0,255].
Again, if you simply need two values (less than 1, greater than 1), this is fairly easy. I recommend working out a mapping that scales the two sides of your scale to something close to linear - so that if you were to swap the images and then invert the ratio image you would get exactly the same image.
Good luck.
--
Kenneth Sloan
[hidden email]
Vision is the art of seeing what is invisible to others.
> On May 28, 2015, at 08:27 , Michael Schmid <
[hidden email]> wrote:
>
> Hi Dave,
>
> in ImageJ, LUTs are always 8 bits wide.
> For 16-bit and 32-bit images, they apply to the display range that you can define with setMinAndMax in a macro or the 'Set' button of the Brightness&Contrast panel.
>
> So, define a LUT with values 0-127 in the color used for negative numbers, and 128-255 for the positive side, and make sure that the display range is symmetric around zero (e.g. min= -5, max= +5).
>
> But don't use red and green: a significant percentage of the male population in Europe or the US won't be able to distinguish these colors due to dichromacy (color blindness).
>
> There are ImageJ plugins to examine what an image looks like with various types of dichromacy, e.g. on Gabriel Landini's web site
>
http://www.mecourse.com/landinig/software/software.html>
> Michael
> ________________________________________________________________
> On May 28, 2015, at 15:09, David Knecht wrote:
>
>> I would like to do a ratio of two images and then color code the 32 bit result so that pixels greater than 1 are coded in one gradation of color (red) and the pixels less than 1 are coded in another color gradation (green) to highlight areas which have different relative amounts of two fluorescent proteins. The color LUT editor appears to be only in 0-255 so how do I do this? Thanks- Dave
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html