Login  Register

Re: Select window

Posted by Rasband, Wayne (NIH/NIMH) [E] on Nov 24, 2015; 7:20pm
URL: http://imagej.273.s1.nabble.com/Select-window-tp5015022p5015025.html

> On Nov 24, 2015, at 1:45 PM, JP Dustin <[hidden email]> wrote:
>
> I have been trying to find a solution to this, but have been having little success.
>
> I am running an RGB split and need to keep the green channel from the resulting split. How can I get my macro to select the green channel image, and close the red and blue? I would like to do this for all subsequent images with differing image names.

The best way to extract the green channel of an RGB image is to set the RGB weights and convert to 8-bits:

   setRGBWeights(0, 1, 0);
   run("8-bit”);

To extract the green (2nd) channel of a composite color image, use the Duplicate command:

   run("Duplicate...","duplicate channels=2”);

-wayne



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