Separate Channels in final image

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

Separate Channels in final image

Roland
Hi everyone,

If i create a multichannel image, the shown image shows on all channels the rgb image. now i want to separate the channels and show one color per channel, like the imageJ function "Channels Tools" does (Image->Color->Channels Tools->Color). The recorder gave the following output:

run("Channels Tool...");
Stack.setDisplayMode("color");
Stack.setChannel(2);

But by generating the Java-code, i get an error (Stack is not known). Does anyone have an idea how to solve this problem?

Thanks in advance

Roland
Reply | Threaded
Open this post in threaded view
|

Re: Separate Channels in final image

Rasband, Wayne (NIH/NIMH) [E]
> On Dec 22, 2014, at 8:55 AM, Roland <[hidden email]> wrote:
>
> Hi everyone,
>
> If i create a multichannel image, the shown image shows on all channels the
> rgb image. now i want to separate the channels and show one color per
> channel, like the imageJ function "Channels Tools" does
> (Image->Color->Channels Tools->Color). The recorder gave the following
> output:
>
> run("Channels Tool...");
> Stack.setDisplayMode("color");
> Stack.setChannel(2);
>
> But by generating the Java-code, i get an error (Stack is not known). Does
> anyone have an idea how to solve this problem?

Upgrade to the latest ImageJ daily build (1.49o5). After upgrading, the recorder will output:

   imp.setDisplayMode(IJ.COLOR);
   imp.setC(2);

The ImagePlus.setDisplayMode() method is new so you will need to upgrade to use it.

-wayne



> --
> View this message in context: http://imagej.1557.x6.nabble.com/Separate-Channels-in-final-image-tp5011028.html
> Sent from the ImageJ mailing list archive at Nabble.com.

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