Login  Register

Re: Possible bug when drawing in composite images?

Posted by Peter van Loon on Apr 23, 2015; 7:59am
URL: http://imagej.273.s1.nabble.com/Possible-bug-when-drawing-in-composite-images-tp5012564p5012578.html

Hi Wayne,

Thank you for your response!
I tried it and it indeed works for this particular Magenta LUT (255,0,255). But I use other LUTs also with values like: (0,32,0) and (64,64,0).
When I tried the same procedure: set the foreground color to these values then I get a value of 11 for the channel with LUT (0,32,0) and 43 with LUT (64,64,0).  Maybe I’m still using it in the wrong way?

The only way for me now to get a value of 255 in the channels with these LUT is to use Stack.setDisplayMode("grayscale"); Stack.setDisplayMode("composite");
After this I use setForegroundColor(255, 255, 255); and I’m able to draw values of 255 in every channel.
I added an example I made special for to illustrate this:
It has the following LUTs:
channel #1 Red LUT
channel #2 Green LUT
channel #3 Blue LUT
channel #4 (0,32,0) LUT
channel #5 (64,64,0) LUT
channel #6 (255,0,255) LUT (= magenta)

When I follow your procedure and draw the number 4, 5 and 6 in the corresponding channels, I get image: 'leaf 6 channels with LUTs and drawing.tif'.
The drawn numbers represent a drawing in that particular channel.
In this image only number 6 in channel #6 with the magenta LUT is ok (has value 255).
The image should look like this: 'leaf 6 channels with LUTs after drawing with 255 255 255 and grayscale change.tif'

I added all images and LUTs.
leaf_channel_4_-_0_32_0.lut
leaf_channel_5_-_64_64_0.lut
leaf_channel_6_-_255_0_255.lut
leaf_6_channels_with_luts_and_drawing.tif
leaf_6_channels_with_luts_after_drawing_with_255_255_255_and_grayscale_change.tif

Regards Peter