I have been trying for some time to find a solution for reading a first group of images as 1 channel and another group as the second channel and both would be viewed in one stack.
I can do that as a user for ImageJ by using,
- File > import > Image Sequence… twice for each channel stack image
- Image > Color > Make Composite image
- Image > Color > Channel Tools and I would change Color Model from Composite to Color image
Now I need to do this using Java,
I have created my own code to read what is in the folder of images and read in a list of datasets or images. Still I couldn’t put them in a stack and so I am using OpenFolder class and it works.
I have been trying several solutions for merging the channels and nothing worked.
a. I tried
IJ.run("Merge Channels...", "c1=red channel c2=green channel"); didn’t give any results
b. Using RGBStackMerge Class it raises an exception.
ImagePlus in = new ImagePlus; in = redImg; in = greenImg; ImagePlus out; img = RGBStackMerge.mergeChannels(in, False)