Pasting content from PolygonRoi to a new Image
Posted by Thomas Kesper on Aug 20, 2008; 3:55pm
URL: http://imagej.273.s1.nabble.com/Pasting-content-from-PolygonRoi-to-a-new-Image-tp3695348.html
Hi,
i have several regions of interest as PolygonRoi in an ImagePlus object
that i want to extract to extra ImagePlus objects.
My attempts with
ImagePlus plus = new ImagePlus(..) ;
plus.setRoi(polyRoi); //
plus.copy(true);
ImagePlus iplus= ImagePlus.getClipboard();
iplus.setTitle(polyRoi.getName());
iplus.show();
or just with "iplus.paste()" resulted in the insertion of the content
of the bounding Rectangle of my PolygonRoi.
when I use manually the GUI with copying the current ROI selection and
using "File>> New >> Internal Clipboard"
i have only the desired content of the Polygon Roi.
How can i get this result with java code?
best regards
Thomas