My macro stitches z-series confocal images into a montage, all as composite images. The macro converts the resulting montage into an RGB.
but, saving the image writes a composite image. I can pause the montage and verify that it is a RGB montage stack with a header info that says “RGB" , but, manually saving it still creates a composite! I’m pretty sure this used to work. Is this a bug or am I overlooking something? I”m pretty certain this used to work. Create montage code... Composite to RGB conversion: selectWindow("montage"); run("Arrange Channels...", "new=321"); Stack.setDisplayMode("color"); Stack.setChannel(1); run("Red"); Stack.setChannel(2); run("Green"); Stack.setChannel(3); run("Blue"); //Stack.setChannel(4); //run("Grays"); Stack.setDisplayMode("composite"); run("Stack to RGB", "slices"); Save the file: saveAs("tiff",target+sep+dirname); Thanks, Glen MacDonald Digital Microscopy Center Box 357923 University of Washington Seattle, WA 98195-7923 USA (206) 616-4156 depts.washington.edu/digmicro [hidden email] -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
> On Jul 14, 2017, at 2:49 PM, Glen MacDonald <[hidden email]> wrote:
> > My macro stitches z-series confocal images into a montage, all as composite images. The macro converts the resulting montage into an RGB. > but, saving the image writes a composite image. I can pause the montage and verify that it is a RGB montage stack with a header info that says “RGB" , but, manually saving it still creates a composite! I’m pretty sure this used to work. > Is this a bug or am I overlooking something? I”m pretty certain this used to work. Do you have “Use SCIFIO when opening files (BETA!)” checked in the Edit>Options>ImageJ2 dialog? RGB tiff files open as composite when this option is enabled. -wayne > Create montage code... > Composite to RGB conversion: > selectWindow("montage"); > run("Arrange Channels...", "new=321"); > Stack.setDisplayMode("color"); > Stack.setChannel(1); > run("Red"); > Stack.setChannel(2); > run("Green"); > Stack.setChannel(3); > run("Blue"); > //Stack.setChannel(4); > //run("Grays"); > Stack.setDisplayMode("composite"); > run("Stack to RGB", "slices"); > Save the file: > saveAs("tiff",target+sep+dirname); > > Thanks, > Glen MacDonald > Digital Microscopy Center > Box 357923 > University of Washington > Seattle, WA 98195-7923 USA > (206) 616-4156 > depts.washington.edu/digmicro > [hidden email] > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
That was the problem. SCIFIO is handy for working with some file operations and I had forgotten that I had checked it a few months ago. It makes sense to treat RGB as composite for image operations. But, displaying an RGB as composite makes it hard to test macros and may confuse users expecting a traditional RGB display, and those of us who are forgetful.
Thanks, Glen MacDonald Digital Microscopy Center Box 357923 University of Washington Seattle, WA 98195-7923 USA (206) 616-4156 depts.washington.edu/digmicro [hidden email] > On Jul 17, 2017, at 8:06 AM, Wayne Rasband <[hidden email]> wrote: > >> On Jul 14, 2017, at 2:49 PM, Glen MacDonald <[hidden email]> wrote: >> >> My macro stitches z-series confocal images into a montage, all as composite images. The macro converts the resulting montage into an RGB. >> but, saving the image writes a composite image. I can pause the montage and verify that it is a RGB montage stack with a header info that says “RGB" , but, manually saving it still creates a composite! I’m pretty sure this used to work. >> Is this a bug or am I overlooking something? I”m pretty certain this used to work. > > Do you have “Use SCIFIO when opening files (BETA!)” checked in the Edit>Options>ImageJ2 dialog? RGB tiff files open as composite when this option is enabled. > > -wayne > >> Create montage code... >> Composite to RGB conversion: >> selectWindow("montage"); >> run("Arrange Channels...", "new=321"); >> Stack.setDisplayMode("color"); >> Stack.setChannel(1); >> run("Red"); >> Stack.setChannel(2); >> run("Green"); >> Stack.setChannel(3); >> run("Blue"); >> //Stack.setChannel(4); >> //run("Grays"); >> Stack.setDisplayMode("composite"); >> run("Stack to RGB", "slices"); >> Save the file: >> saveAs("tiff",target+sep+dirname); >> >> Thanks, >> Glen MacDonald >> Digital Microscopy Center >> Box 357923 >> University of Washington >> Seattle, WA 98195-7923 USA >> (206) 616-4156 >> depts.washington.edu/digmicro >> [hidden email] >> >> -- >> ImageJ mailing list: http://imagej.nih.gov/ij/list.html > > -- > ImageJ mailing list: http://imagej.nih.gov/ij/list.html -- ImageJ mailing list: http://imagej.nih.gov/ij/list.html |
Free forum by Nabble | Edit this page |