Login  Register

Re: unexpected results with "Convert Stack to RGB"

Posted by Gabriel Landini on Jul 19, 2006; 4:54pm
URL: http://imagej.273.s1.nabble.com/unexpected-results-with-Convert-Stack-to-RGB-tp3702096p3702099.html

On Wednesday 19 July 2006 16:17, seb wrote:
> I got something pretty weird using "Convert Stack To RGB" with last
> (1.37k) version of ij:
> Instead of the usual RGB merged slices, I got 2 windows: one of "RGB"
> type containig one (gray) image coming from one slice of the previous
> stack and an "empty" blank stack (with a slider but nothing displayed).
> Moreover when I select a slice in the last one, it is displayed in the
> result "RGB" stack.
> I checked this with the same version of ij, both on linux and OSX
> (Tiger) (java 1.5.0x).

Not sure what the problem is, but you can avoid it.
Try this:

newImage("test", "RGB Black", 512, 512,1);
run("RGB Stack");

setColor(200);
for(i=1;i<=3;i++)
{
        setSlice(i);
        fillRect(i*50,i*50,100,100);
}

run("RGB Color");

Cheers,

G.