Login  Register

Re: Average/Std of All open stacks

Posted by Michael Schmid on Dec 17, 2007; 4:36pm
URL: http://imagej.273.s1.nabble.com/Average-Std-of-All-open-stacks-tp3697741p3697742.html

Hi Alex,

see the macro documentation - you can loop simply through the
images.

For example:

for (i=1; i<=nImages(); i++)  {
   selectImage(i);
   if (nSlices>1) {
     print(getTitle()+" is a stack"); // or do whatever you like
   }
}


Michael
________________________________________________________________

On 16 Dec 2007, at 22:47, Alex Vaughan wrote:

> Hi All,
>
> I'd like to make a macro that will generate two stacks: the average of
> all open stacks, and the stdev of all open stacks.  Stacks will be the
> same size, type, etc.
> The math is simple, but I'm having trouble figuring out how to act on
> all open stacks - can anyone point me in the right direction?
>
> Many Thanks,
> Alex
>
> --
> Alex Vaughan
> Integrative and Organismal Biology
> Department of Biosciences, Stanford University
> Email :: [hidden email]
> Phone :: 510 717 6010
>
> If the shortest path
> is a straight line,
> I will be late. -  Nancy Boutilier
> --