Login  Register

Re: ROI to calculate mean grey value of 2 stacks

Posted by Swayne, Theresa C. on Mar 24, 2017; 2:26pm
URL: http://imagej.273.s1.nabble.com/ROI-to-calculate-mean-grey-value-of-2-stacks-tp5018354p5018366.html

Dear Nan,

Thanks for the details. I think I understand your issue now.

The Multi-Measure function is working as intended. It measures multiple
ROIs and also multiple slices within a stack. But it only measures the
active image.

If you want the results from multiple images in one table, you can do this
manually or with a macro.

The manual method:
1. Click on 1st stack.
2. Edit > Select All, then press T to add to the ROI Manager.
3. ROI Manager > More > Multi-Measure. Check Measure all slices, One row
per slice.
4. Click on 2nd stack. (* you don¹t need to add another ROI if the images
are the same size.)
5. ROI Manager > More > Multi-Measure. This time, check all 3 boxes
including Append Results.

The macro method (this will work whether you have 2 stacks or 200!):
1. Open one of your input images, create the ROI of the whole image, and
press T to add to the ROI Manager.
2. Place the stacks you want to measure in a folder. This is the input
folder.
3. Create an output folder (it cannot be inside the input folder).
4. Process > Batch > MacroŠ (see link to screenshot below)
        ‹ Select the input and output folders.
        ‹ Paste the following text into the large box:
                roiManager("multi-measure measure_all one append²);
        ‹ Click Process.

You can delete the images in the ³output² folder.

Screenshot of the Process > Batch > Macro window:
https://drive.google.com/open?id=0B-8RX8d7WOd9V1dSdmVONU5CcjQ

After either method, your results table will have the data from all images.

They will be in sequence, first the Image1 results, then the Image2
results.

I think you were hoping to have the results into adjacent columns, but
this would require some more intense macro writing. So it might be most
efficient to rearrange the results in your spreadsheet.

Hope this helps!


------------------------------------
Theresa Swayne, Ph.D.
Manager
Confocal and Specialized Microscopy Shared Resource
<http://hiccc.columbia.edu/research/sharedresources/confocal>

Herbert Irving Comprehensive Cancer Center
Columbia University Medical Center
1130 St. Nicholas Ave., Room 222A
New York, NY 10032
Phone: 212-851-4613
[hidden email]















On 3/23/17, 11:06 PM, "Nan Hu" <[hidden email]> wrote:

>Dear Theresa,
>
>Thanks a lot for your reply! The attachment explains my question well.
>Hope it helps.
>
>Best regards,
>Nan

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