Posted by
Michael Schmid on
URL: http://imagej.273.s1.nabble.com/activeImage-how-to-set-it-tp3701057p5002560.html
Hi Sombreroduck,
assuming you are writing a macro (your commands don't look like java code
of a plugin):
Before using selectImage(id) or selectImage(title), you have to define the
variable 'id' (or 'title') while the image is still in the foreground:
id = getImageID();
or
title = getTitle();
When really writing a plugin, however, use
ImagePlus imp = WindowManager.getCurrentImage();
Later on, you can use
WindowManager.setTempCurrentImage(imp);
Michael
_________________________________________________________________
On Fri, April 5, 2013 17:10, sombreroduck wrote:
> Hi,
> I'm writing a plugin which runs an FFT and then an Inverse FFT on (part
> of)
> an image. I then want to overlay this new inverse back onto the original
> image, and had thought to do this with IJ.run("Add Image...", "etc...);
> but
> to do this the original image would have to be active.
>
> I've tried selectImage(id) and selectImage(title) but it just throws
> errors
> "cannot find symbol". Does anyone know how I can convince it to make the
> original image active again?
>
> (alternatively if you know another way to pop the inverse FFT back onto
> the
> original img?)
>
>
> Cheers!
> R
>
>
>
> --
> View this message in context:
>
http://imagej.1557.n6.nabble.com/activeImage-how-to-set-it-tp3701057p5002556.html> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html