RGB channel selection in batch processing

imagej

#1

Hello All

I have a problem, which probably is really basic, but I have not able to find a solution to for a 1½ week now.

I have RGB images, which by default opens in 3 channels. This gives me a problem, when using a macro, as my commands (bit-conversion, threshold etc.) are non-specific to the 3 different channels - as a result nothing happens, when I run a command, as none of the channels is selected.

Thus, the question is, how I program ImageJ to perform any given command on a specific and/or all channels (related to a specific RGB image).

Thanks in advance.

Best, Jakob


#2

Good day Jakob,

not perfectly sure about the format of your images.

I assume that the 3 channels are 8bit each.
To get a conventional RGB-image use:

run("Make Composite");
run("Stack to RGB");

For channel selection use:

Stack.setChannel(n)
Displays channel n .

See also:

setMinAndMax(min, max, channels)
Sets the display range of specified channels in an RGB image, where 4=red, 2=green, 1=blue, 6=red+green, etc. Note that the pixel data is altered since RGB images, unlike composite color images, do not have a LUT for each channel.

Regards

Herbie