Bug in set colours option?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug in set colours option?

Straub, Volko A. (Dr.)
I noticed some strange behaviour when working with composite images and setting the foreground colour - not sure if this intended or a bug.
Briefly, if I start with a three channel composite image, create a selection, duplicate one channel and fill the selection on the duplicate image, the selection appears to always be filled with white (pixel value
255) regardless what foreground colour is selected.
However, if I change the LUT after duplicating the selection to 'Grays', the selection is filled with the expected pixel values as set by the foreground colour option.

Below is a short macro code to reproduce the behaviour. I am using Fiji 1.50i with Java 8.

Any thoughts/comments?

Thanks,
Volko


newImage("test", "8-bit black", 500, 500, 3);
run("Make Composite", "display=Composite");
makeOval(150, 150, 200, 200);
setForegroundColor(255, 255, 255);
run("Fill", "slice"); //fills circle on red channel with pixel value of 255
run("Duplicate...", "duplicate channels=3"); //creates duplicate of selection on blue channel (channel 3), selection is filled with pixel value 0 as expected
run("Colors...", "foreground=blue background=black selection=magenta"); //set foreground colour to blue (pixel value 85)
run("Fill", "slice");  //fills circle with pixel value 255, setting foreground colour appears to have no effect
selectWindow("test");
run("Duplicate...", "duplicate channels=3");
run("Grays");
run("Fill", "slice");  //circle is filled with pixel value 85

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html