Login  Register

Re: Problem Dragging ROIs

Posted by Michael Schmid on Jun 23, 2009; 8:44am
URL: http://imagej.273.s1.nabble.com/Problem-Dragging-ROIs-tp3691692p3691693.html

Hi Aaron,

the yellow outline is the ROI.

The turquoise outlines are the rois stored in the Roi Manager,  
visible with 'show all'. By clicking on the turquoise label you can  
select a roi. Then you can modify it, but this won't change the roi  
stored in the Roi Manager.

A way out would be to add each roi to the Roi Manager after it has  
been modified by the user, not after the initial click where the user  
specifies the roi position.

Michael
________________________________________________________________

On 23 Jun 2009, at 10:10, Aaron Schiffman wrote:

> Hello,
>
> Before I pose my question, I will provide some background. I have  
> written an
> image analysis protocol which requires the user to define cell  
> nuclei. This
> is accomplished by moving the cursor to the center of cell and  
> hitting a
> certain hotkey, which creates a circular region and adds it to the ROI
> manager. It is often necessary for the user to move these ROIs  
> (over 100 per
> image). Up until at least ImageJ version 1.40, this could be  
> accomplished
> simply by clicking on the center of a ROI and dragging it to the  
> desired
> location. As you can imagine, it is necessary for this process to  
> be as
> painless as possible for the user.
>
> Recently I upgraded to version 1.42q and have been experiencing some
> difficulties dragging and dropping ROIs. Currently, when I select  
> an ROI it
> creates a temporary region around it (outlined in yellow, by  
> default), and
> it is impossible to click on anything else besides the yellow  
> region. I have
> an inelegant work around, but I would prefer it if I could recover my
> previous functionality. I have included the macro code for creating  
> these
> regions below, in case anyone is interested.
>
> Any help with this problem would be much appreciated.
>
> macro "Macro 1 [a]" {
> setOption("Show All",true);
> getCursorLoc(x, y, z, flags);
> makeOval(x-11, y-11, 22, 22);
> roiManager("Add");
> n = roiManager("count");
> roiManager("select", n-1);
> d = roiManager("index");
> x = call("ij.plugin.frame.RoiManager.getName", d);
> l = lastIndexOf(x, "-");
> if(l==9){
> y = substring(x, 5, 14);
> roiManager("Rename", y);
> }
>     }
>
> (Everything after 'roiManager("Add")' is for renaming the ROIs and  
> is not
> especially pertinent here.)
>