Re: Translate command in ROI Manager

Posted by fabrice senger-2 on
URL: http://imagej.273.s1.nabble.com/Translate-command-in-ROI-Manager-tp5022823p5022826.html

I have found that macro wich might be useful :

Dialog.create("Move Selections");
Dialog.addNumber("X Displacement:", dx);
Dialog.addNumber("Y Displacement:", dy);
Dialog.show();
dx = Dialog.getNumber();
dy = Dialog.getNumber();;
n = roiManager("count");
   if (n==0)
     exit("The ROI Manager is empty");
    for (i=0; i<n; i++) {
          roiManager('select', i);
          getSelectionBounds(x, y, w, h);
          setSelectionLocation(x+dx, y+dy);
          roiManager('Add');
     }

All the best,

Fabrice.

Le jeu. 9 janv. 2020 à 19:56, Cammer, Michael <[hidden email]>
a écrit :

> We have a question regarding the Translate command within the ROI Manager.
>
> Our goal is to select a single or group of ROIs in the manager and move
> them.  Is this what the translate command does?
>
> We have tried selecting one ROI and translating it, but 1.) nothing
> happens and 2.) we don't see a macro command generated in the Recorder
> window.
>
> Is this a bug with the command or are we using it incorrectly?  Any help
> appreciated.
>
> We are using ImageJ 1.52t23, Java 1.8, Win10
>
> Thank you!
>
> Michael Cammer, Sr Research Scientist, DART Microscopy Laboratory
> NYU Langone Health, 540 First Avenue, SK2 Microscopy Suite, New York, NY
> 10016
> Office: 646-501-0567 Cell: 914-309-3270  [hidden email]
> <mailto:[hidden email]>
> http://nyulmc.org/micros  http://microscopynotes.com/
> Acknowledgement in your publications and presentations of work performed
> in the Microscopy Core plays a vital role in securing support and the
> funding necessary to maintain and operate this valuable research resource.
>  For publications that were made possible by work performed in the core,
> please use the acknowledgement statement "We thank the NYU Langone
> Microscopy Core for experimental and technical support" and include
> required grant numbers as listed here
> http://microscopynotes.com/ilabnyu/acknowledgements2017.pdf
> Please also consider staff for co-authorship if they played a key role in
> the study.
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html