|
Bsoft
2.1.0
Bernard's software package
|
Calculates statistical measures within a set of images or between sets of images. More...
#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"Go to the source code of this file.
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. More... | |
| 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. More... | |
| 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. More... | |
| Bimage * | img_f_test (int set1, int set2, Bimage *p1, Bimage *p2, vector< double > &weight) |
| Applies the F-test to two sets of images. More... | |
| int | main (int argc, char **argv) |
Variables | |
| int | verbose |
| const char * | use [] |
Calculates statistical measures within a set of images or between sets of images.
Definition in file dimgstats.cpp.
Applies the F-test to two sets of images.
| 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. |
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 589 of file dimgstats.cpp.
| int img_fom_sqrt | ( | Bimage * | p | ) |
Definition at line 322 of file dimgstats.cpp.
Applies the Student's t-test to one set of images.
| n | number of files in the set. |
| *p | average and variance of the set. |
| weight | list of weights. |
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 365 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.
| 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. |
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 433 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.
| 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. |
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 515 of file dimgstats.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 81 of file dimgstats.cpp.
| const char* use[] |
Definition at line 29 of file dimgstats.cpp.
|
extern |