I am having a problem with pasting. I have a workaround, but I would like to know the underlying issue as it may explain other issues I see from time to time. In the code below I show that I copy the contents of one image into the clipboard, then (not showing all the code below) I make a larger image and then replicate the smaller image over and over to fill the larger image.
When I use IJ.run("Paste"); it works fine
When I use imp1.paste(); it only copies the last location
Below is the code. Please advise on the difference in behavior.
(Running ImageJ 1.50g4 Java 1.8.0_60 64 bit Mac OS 10.10.5)
thanks,
Joe
_________________________________
ImagePlus imp = IJ.getImage();
IJ.run(imp,"Select All", "");
imp.copy(false);
/* skip a bit brother *//
for ( k= 0; k < factor; k++) {
for (l = 0; l < factor; l++) {
iXROI = k * width;
iYROI = l * width;
imp1.setRoi (iXROI, iYROI, width, width);
/*IJ.run("Paste"); this works - copies into all locations*/
imp1.paste(); /* this only copies into the last location */
}
}
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html