Translating Polygon ROIs?

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

Translating Polygon ROIs?

John Hayes-5
Hi,

Does anyone know if there's a way to translate irregularly shaped ROIs (i.e., polygonal) by a specified amount  in ImageJ? I see the Edit|Selection|Rotate works with these ROIs but Edit|Selection|Specify seems to just generate a new Rectangular ROI from the polygon's bounding box. I also thought it might be in Edit|Selection|Properties but no luck. Am I missing something silly?

Thanks,

John
Reply | Threaded
Open this post in threaded view
|

Re: Translating Polygon ROIs?

Albert Cardona-2
Open the javascript editor and type:

proi = IJ.getImage().getRoi();
proi.setLocation(300, 450);

... to set any ROI in the current image to position 300,450 (the top
left of its bounds).

Albert
--
http://albert.rierol.net