Z-project - standard deviation equation

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

Z-project - standard deviation equation

John Oreopoulos
Hi,

I'm trying to find out how ImageJ calculates the standard deviation when using the Image->Stacks->Z-project (Standard Deviation) command. I can't seem to find a reference to this anywhere on the web. Mainly, I'm trying to find out if it uses a value of "N" or "N-1" in the equation.

Thanks to anyone who can clear this up for me!

John Oreopoulos
Reply | Threaded
Open this post in threaded view
|

Re: Z-project - standard deviation equation

Michael Schmid
Hi John,

there is a way to answer such questions (for people knowing a bit of Java):

Type (ctrl)-L to get the command and 'show full information'
This tells you to look in the sources at ij.plugin.ZProjector

There, it is easy to see that
  stdDev = (n*sum2[i]-sum[i]*sum[i])/n;
  result[i] = (float)Math.sqrt(stdDev/(n-1.0));

So it is divided by n-1.

Michael
________________________________________________________________
On Feb 13, 2012, at 16:05, John Oreopoulos wrote:

> Hi,
>
> I'm trying to find out how ImageJ calculates the standard deviation when using the Image->Stacks->Z-project (Standard Deviation) command. I can't seem to find a reference to this anywhere on the web. Mainly, I'm trying to find out if it uses a value of "N" or "N-1" in the equation.
>
> Thanks to anyone who can clear this up for me!
>
> John Oreopoulos
Reply | Threaded
Open this post in threaded view
|

Re: Z-project - standard deviation equation

dscho
Hi,

On Mon, 13 Feb 2012, Michael Schmid wrote:

> On Feb 13, 2012, at 16:05, John Oreopoulos wrote:
>
> > I'm trying to find out how ImageJ calculates the standard deviation
> > when using the Image->Stacks->Z-project (Standard Deviation) command.
> > I can't seem to find a reference to this anywhere on the web. Mainly,
> > I'm trying to find out if it uses a value of "N" or "N-1" in the
> > equation.
>
> there is a way to answer such questions (for people knowing a bit of Java):
>
> Type (ctrl)-L to get the command and 'show full information'
> This tells you to look in the sources at ij.plugin.ZProjector

... and as always, we tried to make that easier (and less geeky) in Fiji;
the option is hidden in the Plugins>Scripting menu and is called "Open
Source for Menu Item". It will change the mouse cursor and let you choose
a menu item for which it will then open the source code.

If you happen to have the ImageJ source code in the place where Fiji
expects it to be, the source code will be opened in the Script Editor,
otherwise it is shown in the web browser.

Ciao,
Johannes