Posted by
Pål Baggethun on
Oct 29, 2010; 11:38am
URL: http://imagej.273.s1.nabble.com/Measuring-signal-intensity-from-an-area-enclosed-between-two-ROIs-tp3686543p3686547.html
Also, if your ROI's are truly circular you can obtain normalized
integrated intenisties along concentric circles as a function of radius by
using the
Radial Profile Extended:
http://rsbweb.nih.gov/ij/plugins/radial-profile-ext.html
Pål Baggethun
Elkem Solar Research
Michael Schmid <
[hidden email]>
Sent by: ImageJ Interest Group <
[hidden email]>
29.10.2010 10:37
Please respond to
ImageJ Interest Group <
[hidden email]>
To
[hidden email]
cc
Subject
Re: Measuring signal intensity from an area enclosed between two ROIs
Hi Avinash,
there is also another possibility to select the area in ROI1 without
that of ROI2:
Take ROI2 (inner circle), Make Inverse, add the result to the Roi
Manager.
Then use AND of the ROI Manager with this Result and ROI1 (outer
circle).
Michael
________________________________________________________________
On 29 Oct 2010, at 10:06, Johannes Schindelin wrote:
> Hi,
>
> On Fri, 29 Oct 2010, Avinash Kali wrote:
>
>> I am trying to measure the signal intensity from a ring-like
>> structure
>> in my image.
>>
>> I drew an ROI enclosing the inner circle of the ring and another ROI
>> enclosing the outer circle of the ring. I have noticed that in ImageJ
>> 1.43 we can select multiple ROIs from ROI manager at the same
>> time. This
>> makes the two ROIs appear at the same time on the image. But how
>> can I
>> measure the signal intensity from the area enclosed between these two
>> ROIs?
>
> Actually, if you have a circular ROI enclosing another circular
> ROI, you
> do not have a region _between_ them, but you have a region that is
> only in
> one of them.
>
> The ROI Manager offers some operations to combine ROIs, such as AND
> (intersection) and OR (union), but not XOR (set difference). But
> you can
> use this Javascript snippet to perform the operation:
>
> -- snip --
> importClass(Packages.ij.IJ);
> importClass(Packages.ij.gui.ShapeRoi);
> importClass(Packages.ij.plugin.frame.RoiManager);
>
> roiManager = RoiManager.getInstance();
> if (roiManager == null)
> IJ.showMessage("No ROI Manager present!");
> else {
> rois = roiManager.getSelectedRoisAsArray();
> if (rois.length != 2)
> IJ.showMessage("Need exactly two selected
ROIs!");
> else {
> roi = new ShapeRoi(rois[0]);
> roi = roi.xor(new ShapeRoi(rois[1]));
> roiManager.addRoi(roi);
> }
> }
> -- snap --
>
> Just open an editor in ImageJ, paste the code, and run it via Run>Run
> Javascript (if I remember correctly; I use Fiji's script editor, of
> course).
>
> Before running it, you need to select exactly two ROIs in the ROI
> Manager.
>
> Ciao,
> Johannes
NOTICE: Please immediately e-mail back to sender if you are not the
intended recipient. Thereafter delete the e-mail along with any
attachments without making copies. The sender reserves all rights of
privilege, confidentiality and copyright.