Posted by
Mike A on
Mar 17, 2011; 6:47pm
URL: http://imagej.273.s1.nabble.com/non-destructive-2-channel-merge-question-tp3685343p3685345.html
Thank you Glen/Curtis for your helpful comments. Curtis: thanks that “color mode” to “composite” is useful to know.
The trouble is, I would love to stick with composite images, but the situation is a little more complex as i need to us the reslice command on both red and green channels separately... and then generate a red/green overlay of these two channels together. The reslice command cannot be used with 2-channel composite images?
I think i should describe exactly what i am trying to do, i wanted to avoid this to keep things simple but it might be neccessary.
I open my 2 channel (red/green) timelapse movie with Z-sections using LOCI and imageJ v1.44n6 and maxintensity project all my Z’s. I then mark up regions of interest using the line tool that im interested in and add each line to the ROI manager. I then split my channels with LOCI and run a macro on each channel (macro kindly written by Wayne - attached at the bottom of this message). This macro takes each line selection in the ROI Manager, re-slices using a slice_count of 7, rotates the reslice, does a Max Intensity projection and then saves the projections in TIFF format. Essentially the result is a bunch of reslices saved as tif files (reslices from each channel are saved to separate folders).
However, i also need to show the individual reslices of each channel together in colour (i prefer the individual channel reslices to be greyscale). The trouble is, how to combine in the least destructive way a reslice of the two channels in which one channel coloured red is overlayed on the other channel coloured green. Its important that all three reslices look like they have had the same level adjustments. Not sure how to do this ! should i just merge the output reslices for each channel and thats that?
Thanks for your help.
Mike
++macro that im using:
setBatchMode(true);
dir = getDirectory("Choose a Directory");
n = roiManager("count");
for (i=0; i<n; i++) {
roiManager("Select", i);
run("Reslice [/]...", "slice_count=7 rotate");
id = getImageID;
run("Z Project...", "projection=[Max Intensity]");
saveAs("Tiff", dir+i+".tif");
close();
selectImage(id);
close();
}
From: Curtis Rueden
Sent: Thursday, March 17, 2011 6:16 PM
To: ImageJ Interest Group
Cc: trshrthrth rdthjdrtjdrtj
Subject: Re: non-destructive 2 channel merge question
Hi Mike,
The "Merge channels" command will destructively remap your data to create an RGB image. The problem with RGB images is that they are limited to exactly three 8-bit color channels.
I suggest you avoid using RGB images, and instead use the "composite image" feature. You can display multi-channel 16-bit data, for example, with a red and a green channel, without altering the color values.
You can save a composite image to a TIFF with each channel as a separate plane, preserving the bit depth.
You can also use the Bio-Formats importer to display your image as red-green without all the steps you describe. Just change the "Color mode" to "Composite" and it should do what you want.
-Curtis
On Thu, Mar 17, 2011 at 8:39 AM, trshrthrth rdthjdrtjdrtj <
[hidden email]> wrote:
Hi folks,
I am using imageJ v1.44n6 and I am working with a 2 channel (red/green) timelapse movie with Z-sections.
I open this file with LOCI bioformats and use the “split channels” function. I then use the following to get a red/green overlay which i then save to .tif: image > color > merge channels > select the 2 channels > leave “create composite” blank > click ok. However, I noticed that if prior to merging the 2 channels I have adjusted pixel intensities using the window/level tool, these are destructively carried over into my merged RGB file. Is there a way to avoid this?
I want to create an image where red and green are overlayed, but where the pixel intensities in both the red and green channels represent those of my raw data. Really, the question is how does one create a red green overlay and save to .tif without destructively altering pixel intensity values. Is it just a matter of avoiding using the window/level tool before merging?? I like to be as non-destructive as possible before getting my output .tif file into photoshop.
Many thanks for your help.
Mike