|
Hi Guiseppe,
it seems that you want to convert all open images to a stack?
I see two ways,
(1) recording a plugin with the Macro Recorder:
IJ.run(imp, "Images to Stack", "method=[Copy (center)] name=Stack title=[] use");
(2) If you are sure that all images have the same size&type, create a new ImageStack with this size, and then a loop over all images, roughly like this (not debugged):
int[] ids = WindowManager.getIDList();
for (int i=0; i<ids.size; i++)
stack.add((WindowManager.getImage(ids[i])).getProcessor()).getPixels(), getImage(ids[i]).getTitle());
Michael
________________________________________________________________
On Apr 17, 2012, at 19:42, Giuseppe Cancellara wrote:
> Hi to everyone I'm Giuseppe;
> every time I create a stack in java with the command
> StackEditor StackEditor st1 = new ();
> st1.convertImagesToStack ();
> I need to click on ok I create 1000
> stack every time There is a command that automates everything
> best regards
>
> Giuseppe
|