Problem Dragging ROIs

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem Dragging ROIs

Aaron Schiffman
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.)

Reply | Threaded
Open this post in threaded view
|

Re: Problem Dragging ROIs

Michael Schmid
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.)
>
Reply | Threaded
Open this post in threaded view
|

Re: Problem Dragging ROIs

Aaron Schiffman

Michael Schmid-3 wrote
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
Hi Michael,

Confusion about terminology aside, it used to be possible to click directly on the turqoise outlines and move them with the cursor. This is what I am no longer able to do. It is unfortunately necessary to move different turquoise ROIs at different times, often more than once. I understand it is easy to work around this problem by using 'roiManager("Update")'. If I adopt this solution, however, the user is required to drag the yellow ROIs and press an additional button to record the change. Given the enormous number of ROIs involved, additional steps like this are a problem. Another, better workaround would involve coupling the 'roiManager("Update")' function to left clicks of the mouse, but it seems the macro language does not support mouse hotkeys. Do you have any idea what might have caused this change?

Thanks,

Aaron

Reply | Threaded
Open this post in threaded view
|

Re: Problem Dragging ROIs

Wayne Rasband
In reply to this post by Aaron Schiffman
In the v1.43c daily build, ROI Manager "Show All" mode selections can
again be moved by clicking on the selection's label and dragging to the
desired location.

-wayne

On Jun 23, 2009, at 4:10 AM, 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.)
>
>
> --
> View this message in context:
> http://n2.nabble.com/Problem-Dragging-ROIs-tp3141050p3141050.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
GDC
Reply | Threaded
Open this post in threaded view
|

Re: Problem Dragging ROIs

GDC
In reply to this post by Aaron Schiffman
Aaron

Were you able to get this problem sorted out?  I'm having the exact same issue.  I have several hundred images and 25 ROI's per image.  Having to use the update function to shift the ROIs for each of these images will be a nightmare.  I'm considering uninstalling the latest version and going back to one of the older builds.if i can't get this problem sorted out.

Thanks
Greg


Aaron Schiffman wrote
Michael Schmid-3 wrote
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
Hi Michael,

Confusion about terminology aside, it used to be possible to click directly on the turqoise outlines and move them with the cursor. This is what I am no longer able to do. It is unfortunately necessary to move different turquoise ROIs at different times, often more than once. I understand it is easy to work around this problem by using 'roiManager("Update")'. If I adopt this solution, however, the user is required to drag the yellow ROIs and press an additional button to record the change. Given the enormous number of ROIs involved, additional steps like this are a problem. Another, better workaround would involve coupling the 'roiManager("Update")' function to left clicks of the mouse, but it seems the macro language does not support mouse hotkeys. Do you have any idea what might have caused this change?

Thanks,

Aaron
Reply | Threaded
Open this post in threaded view
|

Re: Problem Dragging ROIs

Aaron Schiffman
GDC wrote
Aaron

Were you able to get this problem sorted out?  I'm having the exact same issue.  I have several hundred images and 25 ROI's per image.  Having to use the update function to shift the ROIs for each of these images will be a nightmare.  I'm considering uninstalling the latest version and going back to one of the older builds.if i can't get this problem sorted out.

Thanks
Greg

Hi Greg,

Shortly after I created this thread this problem was fixed in an ImageJ update. Make sure your version of ImageJ is completely up to date. If that still doesn't work, I would be willing to take a look at your macro code. I also wrote a tool for moving ROIs on versions of ImageJ where it is not otherwise possible. If all else fails, you might want to try that.

Aaron
GDC
Reply | Threaded
Open this post in threaded view
|

Re: Problem Dragging ROIs

GDC
Thanks Aaron. 

I'll give the latest version of Image a try and see if that fixes my problems.

Greg

----- Original Message -----
From: "Aaron Schiffman (via Nabble)"
To: GDC
Subject: Re: Problem Dragging ROIs
Date: Mon, 20 Jul 2009 13:38:39 -0700 (PDT)

GDC wrote:
Aaron

Were you able to get this problem sorted out?  I'm having the exact same issue.  I have several hundred images and 25 ROI's per image.  Having to use the update function to shift the ROIs for each of these images will be a nightmare.  I'm considering uninstalling the latest version and going back to one of the older builds.if i can't get this problem sorted out.

Thanks
Greg

Hi Greg,

Shortly after I created this thread this problem was fixed in an ImageJ update. Make sure your version of ImageJ is completely up to date. If that still doesn't work, I would be willing to take a look at your macro code. I also wrote a tool for moving ROIs on versions of ImageJ where it is not otherwise possible. If all else fails, you might want to try that.

Aaron


View message @ http://n2.nabble.com/Problem-Dragging-ROIs-tp3141050p3291512.html
To unsubscribe from Re: Problem Dragging ROIs, click here.


--
How Strong is Your Score?
Click here to see yours for $0!
By FreeCreditReport.com