Copy and Paste in a plugin
Posted by Gabriel Landini on
URL: http://imagej.273.s1.nabble.com/Copy-and-Paste-in-a-plugin-tp3693413.html
Hi,
Rather than calling: IJ.run("Copy"); and IJ.run("Paste"); in a plugin, can
somebody please suggest a way to directly copy from an existing ROI in an
ImagePlus and paste it directly into another ROI in a different ImagePlus?
(the ROIs are the same type and size).
And similarly is there a way to execute a "Duplicate..." command so it is
guaranteed that a particular image is being duplicated ?
I just want the ROI to be duplicated, as when using the Duplicate... command,
but I wonder if calling IJ.run("Duplicate...", "_temp"); one runs the risk (as
in macros) of not accessing the right image if one mistakenly clicks into
another image while the plugin is being executed.
Many thanks
Gabriel