Re: Duplicaing Stacks
Posted by
David Webster on
Oct 08, 2009; 10:44pm
URL: http://imagej.273.s1.nabble.com/Duplicaing-Stacks-tp3690862p3690866.html
I'm trying imp = IJ.getImage().
David Webster
On Thu, Oct 8, 2009 at 12:40 PM, Ben Tupper <
[hidden email]> wrote:
> 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
>