Login  Register

Re: roi select two rois

Posted by Jan Eglinger-5 on Jul 29, 2008; 2:02pm
URL: http://imagej.273.s1.nabble.com/roi-select-two-rois-tp3695488p3695494.html

Hi Thomas,

>
> 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.
>

When running:

roiManager("Select", 0);
setKeyDown("shift");
roiManager("Select", 1);

the picture ends up with a combination of two ROIs, but when you run the

roiManager("measure");

command afterwards, it only measures one selection.


Try one of the following:
- If you want to have one measurement of the combined ROIs, do:

run("Measure");

- If you want to have measurements for all the ROIs in the manager, do:

roiManager("deselect");
roiManager("measure");



Interestingly, the "Deselect" command doesn't seem to be recorded by the
Macro Recorder.


Hth,
Jan

--
Jan Eglinger
PhD Student, Eckhard Lammert group
Max Planck Institute of Molecular Cell Biology and Genetics
Pfotenhauerstrasse 108
01307 Dresden
Germany

Tel:  +49 351 210 2722