On Apr 9, 2014, at 1:29 PM, Burni wrote:
> Hi Wayne,
>
> I specifically want the plot profiles and the fits to be shown.
> I just don't want to arrange them each time I run my program.
PlotWindows are ImageWindows so you can use the ImageWindow.setNextLocation() method to specify the location where the next plot will be opened. You will need to upgrade to the latest ImageJ daily build (1.48y22), which fixes a bug that prevents setNextLocation() from working with windows normally centered on the screen. Here is a JavaScript example:
imp = IJ.openImage("
http://imagej.nih.gov/ij/images/blobs.gif");
imp.setRoi(new Line(46, 128, 161, 68));
x=10; y=100;
ImageWindow.setNextLocation(x, y);
IJ.run(imp, "Plot Profile", "");
win = IJ.getImage().getWindow();
bounds = win.getBounds();
x += bounds.width + 10;
ImageWindow.setNextLocation(x, y);
imp.setRoi(new Line(47, 147, 82, 144));
IJ.run(imp, "Plot Profile", "");
And here is a macro version:
requires("1.48u");
run("Blobs (25K)");
id = getImageID;
x=10; y=100;
makeLine(46, 128, 161, 68);
call("ij.gui.ImageWindow.setNextLocation", x, y);
run("Plot Profile");
getLocationAndSize(x, y, width, height);
selectImage(id);
makeLine(47, 147, 82, 144);
x += width + 10;
call("ij.gui.ImageWindow.setNextLocation", x, y);
run("Plot Profile");
> --
> View this message in context:
http://imagej.1557.x6.nabble.com/How-to-NOT-open-windows-above-each-other-tp5007253p5007264.html> Sent from the ImageJ mailing list archive at Nabble.com.
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html