I was trying to convert an image back to RGB after using run("Make Composite") 
and ran into a problem.  Instead of converting the image as shown to RGB, the 
channels were reassigned RGB in the original order.  In this example run on my 
computer, the red and green channels should be swapped, but the resulting RGB 
image has them not swapped.  Is this expected behavior or a bug?

1.54k11

Thank you!

// Creates a test RGB Image.  Instead, use any existing RGB image.
newImage("Test HyperStack", "8-bit color-mode", 512, 256, 3, 1, 1);
setSlice(1);
makeRectangle(23, 27, 139, 182);
run("Set...", "value=255 slice");
setSlice(2);
makeRectangle(126, 44, 139, 182);
run("Set...", "value=255 slice");
setSlice(3);
makeRectangle(234, 70, 139, 182);
run("Set...", "value=255 slice");
Property.set("CompositeProjection", "Sum");
Stack.setDisplayMode("composite");
run("Select None");
run("RGB Color");


//swap channels and convert to RGB
run("Make Composite");
setSlice(1);
run("Green");
setSlice(2);
run("Red");
waitForUser("Red and green should be swapped");
run("RGB Color");
// The resulting image I get is the original RGB image, not the one with 
channels swapped.




Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
NYU Langone Health, 540 First Avenue, office MSB 4 111-120 (enter near Tisch, 
cubicle in far back corner)
main lab Smilow C-17, New York, NY  10016
Office: 646-501-0567 Cell (DO NOT TEXT): 914-309-3270  
[email protected]<mailto:[email protected]>
http://nyulmc.org/micros  http://microscopynotes.com/
Scheduling the time you want is far more reliable by phone call.  Why not 
provide your phone number?

Probably nobody reads this part, but everybody should and heed it:
Acknowledgement in publications and presentations of Microscopy Core performed 
work is vital to secure support and funding necessary to maintain this valuable 
research resource.   For publications that include work performed in the core, 
please use the acknowledgement statement "We thank the NYU Langone Microscopy 
Core for experimental and technical support" and include required grant numbers 
as listed here http://microscopynotes.com/ilabnyu/acknowledgements2017.pdf
Please also consider staff for co-authorship if they played a key role in the 
study.



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

Reply via email to