Re: Strange imp.close() behavior
Posted by
Wayne Rasband on
Jan 25, 2006; 9:59pm
URL: http://imagej.273.s1.nabble.com/Strange-imp-close-behavior-tp3703949p3703950.html
> Hi,
>
> In a plugin of mine I create a temporary image as follows:
> IJ.run("Scale...", "x=" + IJ.d2s(scale) +" y=" +
> IJ.d2s(scale) +
> " interpolate create title=Flatten_tmp");
> imp1 = WindowManager.getCurrentImage();
>
> ...
> imp1.close();
>
> In Eclipse the imp1.close(); line works fine. But when I run ImageJ
> outside of Eclipse the temp window doesn't close and it seems
> that my routine is exiting (at the close line) without giving any
> error messages.
>
>
> Can anyone help with the mystery?
It works fine for me. Note that the close() method was added to the
ImagePlus class in ImageJ 1.35m. With earlier versions, you have to use
imp1.hide() or IJ.run("Close").
-wayne