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
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html