Hi,
I found a strange behavior when drawing in composite images in combination with an adapted gray LUT. Situation: I like to make some manual corrections in several layers of a composite image. The first 3 layers contain the RGB channels of the image. The fourth channel contains a binary mask. This mask is used to manual edit the areas to be measured. I linked this channel to an adapted Grays LUT. Index 255 is set to the color 255,0,255 (Magenta). When I use the Paintbrush tool and set the Foreground color to white (255), the painted area has the value 254 instead of 255! This happens when the picture is in composite or color mode (Channels tool). However when I change to Grayscale mode (channels tool) once and go back to composite or color mode. The next edits have the value 255. It looks like a bug? My workaround is now to change for a moment to the grayscale mode and go back to composite and start drawing then. Maybe there are better solutions? I attached the lut file: Gray_Magenta.lut Regards, Peter |
On Apr 22, 2015, at 4:01 AM, Peter van Loon <[hidden email]> wrote:
> > Hi, > I found a strange behavior when drawing in composite images in combination > with an adapted gray LUT. > > Situation: > I like to make some manual corrections in several layers of a composite > image. The first 3 layers contain the RGB channels of the image. The fourth > channel contains a binary mask. This mask is used to manual edit the areas > to be measured. I linked this channel to an adapted Grays LUT. Index 255 is > set to the color 255,0,255 (Magenta). > When I use the Paintbrush tool and set the Foreground color to white (255), > the painted area has the value 254 instead of 255! This happens when the > picture is in composite or color mode (Channels tool). However when I change > to Grayscale mode (channels tool) once and go back to composite or color > mode. The next edits have the value 255. It looks like a bug? My workaround > is now to change for a moment to the grayscale mode and go back to composite > and start drawing then. Maybe there are better solutions? Set the foreground color to magenta (255,0,255) and the paintbrush tool will work as expected with your gray_magenta LUT. A magenta foreground color matches the magenta entry in the LUT, which has an index of 255. A white foreground color (255,255,255) matches the whitest entry in the LUT, which has an index of 254. -wayne > I attached the lut file: Gray_Magenta.lut > <http://imagej.1557.x6.nabble.com/file/n5012564/Gray_Magenta.lut> > > Regards, > Peter > > -- > View this message in context: http://imagej.1557.x6.nabble.com/Possible-bug-when-drawing-in-composite-images-tp5012564.html > Sent from the ImageJ mailing list archive at Nabble.com. -- ImageJ mailing list: http://imagej.nih.gov/ij/list.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 |
On Apr 23, 2015, at 3:59 AM, Peter van Loon <[hidden email]> wrote:
> > 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 latest ImageJ daily build (1.49s4) fixes a bug that caused the paintbrush tool and Edit>Fill command to not work correctly on composite color images. -wayne > 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 > <http://imagej.1557.x6.nabble.com/file/n5012578/leaf_channel_4_-_0_32_0.lut> > leaf_channel_5_-_64_64_0.lut > <http://imagej.1557.x6.nabble.com/file/n5012578/leaf_channel_5_-_64_64_0.lut> > leaf_channel_6_-_255_0_255.lut > <http://imagej.1557.x6.nabble.com/file/n5012578/leaf_channel_6_-_255_0_255.lut> > leaf_6_channels_with_luts_and_drawing.tif > <http://imagej.1557.x6.nabble.com/file/n5012578/leaf_6_channels_with_luts_and_drawing.tif> > leaf_6_channels_with_luts_after_drawing_with_255_255_255_and_grayscale_change.tif > <http://imagej.1557.x6.nabble.com/file/n5012578/leaf_6_channels_with_luts_after_drawing_with_255_255_255_and_grayscale_change.tif> > > Regards Peter > > > > -- > View this message in context: http://imagej.1557.x6.nabble.com/Possible-bug-when-drawing-in-composite-images-tp5012564p5012578.html > Sent from the ImageJ mailing list archive at Nabble.com. > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Hi Wayne,
Sorry for the late response (holiday). I tried build 1.49s and even the latest build t6 but I don't see any changes in behaviour. If I draw with a white Pencil (255,255,255), the drawn (or filled) area in the selected slice still has the value 254 instead of 255. Regards, Peter |
Free forum by Nabble | Edit this page |