Re: RGB automation

Posted by Rasband, Wayne (NIH/NIMH) [E] on
URL: http://imagej.273.s1.nabble.com/RGB-automation-tp5001706p5001709.html

On Feb 8, 2013, at 10:34 AM, Brenda wrote:

> Hello everyone. I'm looking for some advice for automating image processing for a big batch of 3 color fluorescent images. I'm imaging red, green or blue fluorescence as a single channel. The output of the microscope's software is in RGB color, therefore 1 channel has information and the other 2 channels are blank. Quirk of the software and I'm stuck with it. I have been manually doing a RGB split, closing the blank channels, and manually RGB merge.
>
> Measuring the intensity of the data image gives me a number (345671) while measuring the blank ones gives me zero.
>
> Any ideas on how to put that in a macro?

You can measure the red channel of an RGB image using

     setRGBWeights(1, 0, 0);
     run("Measure");

Or extract the red channel of an RGB image using

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

and then type "m" *Analyze>Measure) to measure it.

You can create "1" and "2" keyboard shortcuts for these operations by adding the following two macros to the ImageJ/macros/StartupMacros.txt file.

-wayne

  macro "Measure Red Channel [1]" {
     setRGBWeights(1, 0, 0);
     run("Measure");
   }

  macro "Extract Red Channel [2]" {
     setRGBWeights(1, 0, 0);
     run("8-bit");
   }

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