Interacting with overlays

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

Interacting with overlays

Rats
Hello All!

I'm exporting the outlines of objects from wand selections using interpolated FloatPolygons. This part works fine, and shows you what you're getting on the image as an overlay, but I'd like to be able to interact a little more with the overlay, dragging parts of it (individual ROIs) to new locations and having ImageJ recalculate the co-ordinate list.

Is it possible to use the mouse to drag around parts of an overlay without hunting through the ROI manager? And are there events I can use to call the sampling methods on releasing the overlay once I've dragged it into position?

Thanks in advance!

Reply | Threaded
Open this post in threaded view
|

Re: Interacting with overlays

Rasband, Wayne (NIH/NIMH) [E]
On Oct 3, 2014, at 12:42 PM, Rats wrote:

> Hello All!
>
> I'm exporting the outlines of objects from wand selections using
> interpolated FloatPolygons. This part works fine, and shows you what you're
> getting on the image as an overlay, but I'd like to be able to interact a
> little more with the overlay, dragging parts of it (individual ROIs) to new
> locations and having ImageJ recalculate the co-ordinate list.
>
> Is it possible to use the mouse to drag around parts of an overlay without
> hunting through the ROI manager?

An overlay is just a collection of ROIs. An ROI in an overlay can by activated by long-clicking on it, alt-clicking on it or clicking on its label. You can drag an overlay ROI once it has been activated. In ImageJ 1.49h or later, you can drag an overlay ROI by its label without first activating it. Use the Image>Overlay>Labels command to enable overlay labels.

> And are there events I can use to call the
> sampling methods on releasing the overlay once I've dragged it into
> position?

You can monitor the mouse up events that occur when when an overlay is dragged into position. The Mouse Listener plugin at

   http://imagej.nih.gov/ij/plugins/mouse-listener.html

demonstrates how to monitor mouse events.

-wayne


> --
> View this message in context: http://imagej.1557.x6.nabble.com/Interacting-with-overlays-tp5009897.html
> Sent from the ImageJ mailing list archive at Nabble.com.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Interacting with overlays

Rats
Hi Wayne,

I had no idea about long-clicking! Thanks for the input, I've got things working nicely now.

-R