problem with stack

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with stack

Giuseppe Cancellara
Hi to everyone I'm Giuseppe;
every time I create a stack in java with the commandStackEditor 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    
Reply | Threaded
Open this post in threaded view
|

Re: problem with stack

Michael Schmid
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    
Reply | Threaded
Open this post in threaded view
|

install plugin

Giuseppe Cancellara
In reply to this post by Giuseppe Cancellara
Hi to everyone I'm Giuseppe;
I've a problem with install piv plugin in javathere is a command to do it automatically?
best regard
Giuseppe