Re: Duplicaing Stacks
Posted by
BenTupper on
Oct 08, 2009; 7:40pm
URL: http://imagej.273.s1.nabble.com/Duplicaing-Stacks-tp3690862p3690865.html
Hi,
On Oct 8, 2009, at 2:58 PM, David William Webster wrote:
> All,
>
> If I want to duplicate a Stack, I assume I must do it either slice by
> slice or use;
>
> IJ.run(imp, "Duplicate...", "title=myimage duplicate range=1-
> maxslice");
>
> where imp is an ImagePlus object.
>
> If I use the IJ.run() how do I get the ImagePlus reference for the
> reult.
> Is there an easier way to do this? I may be missing it again, but I
> don't
> see anything in Plugins/Stacks that obviously does this.
I think you have a couple of choices. Using IJ you can
imp = IJ.getImage()
... which assumes that the new image is the one you created and is
active.
Alternatively, you can use
imp = WindowManager.getImage("myimage");
which works of there really is just one "myimage" instantiated.
Cheers,
Ben