Login  Register

Re: How can i copy ROI in imagej?

Posted by Mark J. Chopping on Oct 20, 2014; 2:58pm
URL: http://imagej.273.s1.nabble.com/How-can-i-copy-ROI-in-imagej-tp5010118p5010123.html

Hi Chinmaya,

Copy a ROI from one image to another: activate the image with the desired
ROI, then the image you want to put that ROI into, and hit Ctrl+Shift+E.
This triggers the Edit>Selection>Restore Selection that puts the selection
into the second image. To automate this, switch on macro recording:

selectWindow("image1.tif");
makeRectangle(132, 128, 384, 220);
selectWindow("image2.tif");
run("Restore Selection");

As you probably know, you can use the ROI manager to store ROIs, e.g.,

makeRectangle(244, 200, 476, 308);
// or makeOval(x-radius, y-radius, X, Y);
roiManager("Add");
run("Add to Manager");
// resize selection:
makeRectangle(640, 348, 604, 508);
roiManager("Add");
run("Add to Manager");
// move selection:
makeRectangle(844, 1704, 604, 508);

Of course, you have to provide the new coordinates/dimensions. Hope this
helps.

   Mark

  Mark Chopping, Ph.D.
  Montclair State University

-----
�> Date: Mon, 20 Oct 2014 07:29:50 -0700

> From: csadangi <[hidden email]>
> Reply-To: [hidden email]
> To: [hidden email]
> Subject: Re: How can i copy ROI in imagej?
>
> Dear Phillipe
>
> Thanks a lot for your message.
>
> I still couldn't find how to copy a ROI and use it in different images or
> the same image (but different locations).
>
>
>
> -----
> ----
> Chinmaya
> Medical University Innsbruck
> Innsbruck
> Austria
> --
> View this message in context: http://imagej.1557.x6.nabble.com/How-can-i-copy-ROI-in-imagej-tp5010118p5010122.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html