Posted by
Toby Cornish on
Jul 30, 2008; 2:57pm
URL: http://imagej.273.s1.nabble.com/Re-IMAGEJ-Digest-28-Jul-2008-to-29-Jul-2008-2008-203-tp3695486.html
Thomas,
Not sure if this helps you out or not, but here is a function for measuring (separately) an arbitrary number of ROI manager selections listed by index in an array (code below).
toby
newImage("test", "8-bit Black", 128, 128, 1);
makeRectangle(54, 35,10,10);
roiManager("Add");
makeRectangle(70, 70,10,10);
roiManager("Add");
rois = newArray(0, 1);
measureSelections(rois);
exit();
// FUNCTIONS BELOW ================================
function measureSelections(rois) {
for (i =0; i < rois.length; i++) {
roiManager("select",rois[i]);
roiManager("measure");
}
}
>From: Thomas Boudier <
[hidden email]>
>Subject: Re: roi select two rois
>
>Hi,
>
>I'm running ImageJ 1.41i on linux with java1.6.0_06, what I would like
>is to select specifically two rois (to perform some computation on
>them), when I run this code :
>
>roiManager("Select", 0);
>setKeyDown("shift");
>roiManager("Select", 1);
>roiManager("measure");
>
>
>I only have one measure instead of two. Not sure if the shift key
>applies to the list inside roiManager or to Rois in the image where they
>are combined.
>
>Thomas
Toby C. Cornish, M.D., Ph.D.
Pathology Resident
Johns Hopkins Medical Institutions
[hidden email]