/Users/bernard/b20/bsoft/src/dimgstats.cpp(3)

NAME
/Users/bernard/b20/bsoft/src/dimgstats.cpp - Calculates statistical measures within a set of images or between sets of images.

SYNOPSIS

#include 'Bstring.h'
#include 'rwimg.h'
#include 'img_combine.h'
#include 'math_util.h'
#include 'utilities.h'
#include 'options.h'
#include 'timer.h'
#include 'Vector3.h'

  Functions
int img_fom_sqrt (Bimage *p)
Bimage * img_students_t_test (int n, Bimage *p, vector< double > &weight)
Applies the Student's t-test to one set of images.
Bimage * img_students_t_test_equal (int set1, int set2, Bimage *p1, Bimage *p2, vector< double > &weight)
Applies the Student's t-test to two sets of images, assumes the two distributions have approximately the same variance.
Bimage * img_students_t_test_unequal (int set1, int set2, Bimage *p1, Bimage *p2, vector< double > &weight)
Applies the Student's t-test to two sets of images, assumes the two distributions have unequal variance.
Bimage * img_f_test (int set1, int set2, Bimage *p1, Bimage *p2, vector< double > &weight)
Applies the F-test to two sets of images.
int main (int argc, char **argv)

  Variables
int verbose
const char * use []

Detailed Description

Calculates statistical measures within a set of images or between sets of images.

Author:
    David Belnap and Bernard Heymann

Date:
    Created: 20051213

    Modified: 20190208 (BH)

Definition in file dimgstats.cpp.

Function Documentation

  Bimage * img_f_test (int set1, int set2, Bimage * p1, Bimage * p2, vector< double > & weight)

Applies the F-test to two sets of images.

Author:
    David Belnap

Parameters:
    set1 number of files in set 1.
    set2 number of files in set 2.
    *p1 average image with variance (FOM), set 1
    *p2 average image with variance (FOM), set 2
    weight list of weights.

Returns:
    Bimage* F-test image and significance image (as FOM).

    The F value is computed for each pixel:
            F(i) = var1(i) / var2(i)
    Variance (as FOM of an average image) is input.  The significance
    level is computed and stored as FOM of F-test image.  Output is
    in floating point.

     Reference: Press W.H. et al (1992) Numerical Recipes in C.

Definition at line 595 of file dimgstats.cpp.

  int img_fom_sqrt (Bimage * p)

Definition at line 328 of file dimgstats.cpp.

  Bimage * img_students_t_test (int n, Bimage * p, vector< double > & weight)

Applies the Student's t-test to one set of images.

Parameters:
    n number of files in the set.
    *p average and variance of the set.
    weight list of weights.

Returns:
    Bimage* significant level image (floating point).

    First, average (avg) and variance (var) images are calculated:
            var = [1/(N-1)] sum(x - avgx)^2
    Second, the t value is computed and returned as an image:
            t = avg / sqrt[ var/N ]
    Finally, the significance is calculated and returned as the FOM of the image:
            sig = betai(dof/2, 0.5, dof/(dof + t*t))
    where dof (degrees-of-freedom) is calculated as:
            dof = ws*(1 - 1.0L/N)
    and ws is the weight sum.
    All images are converted to floating point.

     Reference: Press W.H. et al (1992) Numerical Recipes in C. Milligan and Flicker (1987) J. Cell Biol. 105:29-39.

Definition at line 371 of file dimgstats.cpp.

  Bimage * img_students_t_test_equal (int set1, int set2, Bimage * p1, Bimage * p2, vector< double > & weight)

Applies the Student's t-test to two sets of images, assumes the two distributions have approximately the same variance.

Author:
    David Belnap and Bernard Heymann

Parameters:
    set1 number of files in set 1.
    set2 number of files in set 2.
    *p1 average image with variance (FOM), set 1
    *p2 average image with variance (FOM), set 2
    weight list of weights.

Returns:
    Bimage* t-test image and significance image (as FOM).

    Input average images for sets 1 and 2, with variance as FOM portion
    of the images.  The numerator portion of the variance (Vn) is
    computed from the variance.  The "standard error of the difference
    of the means" is computed:
    SD = sqrt[ ( (Vn1 + Vn2) / degrees_of_freedom ) * (1/set1 + 1/set2) ]
    and used to compute the t value:
                t = ( avg1 - avg2 ) / SD
    Finally, the significance level (probability) is computed.

Reference: Press W.H. et al (1992) Numerical Recipes in C. Milligan and Flicker (1987) J. Cell Biol. 105:29-39.

Definition at line 439 of file dimgstats.cpp.

  Bimage * img_students_t_test_unequal (int set1, int set2, Bimage * p1, Bimage * p2, vector< double > & weight)

Applies the Student's t-test to two sets of images, assumes the two distributions have unequal variance.

Author:
    David Belnap

Parameters:
    set1 number of files in set 1.
    set2 number of files in set 2.
    *p1 average image with variance (FOM), set 1
    *p2 average image with variance (FOM), set 2
    weight list of weights.

Returns:
    Bimage* t-test image and significance image (as FOM).

    Input average images for sets 1 and 2, with variance as FOM portion
    of the images.  The t value is computed:
            t = ( avg1 - avg2 ) / sqrt[ var1/ws1 + var2/ws2 ]
    (ws = weighted sum, default = N).  The significance level
    (probability) is computed.  Output is in floating point.

Reference: Press W.H. et al (1992) Numerical Recipes in C. Milligan and Flicker (1987) J. Cell Biol. 105:29-39.

Definition at line 521 of file dimgstats.cpp.

  int main (int argc, char ** argv)

Definition at line 81 of file dimgstats.cpp.

Variable Documentation

  const char* use[]

Definition at line 29 of file dimgstats.cpp.

  int verbose

Author

Generated automatically by Doxygen for Bsoft from the source code.