![]() |
Bsoft 2.1.4
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"
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.
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.
int img_fom_sqrt | ( | Bimage * | p | ) |
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.
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.
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.
int main | ( | int | argc, |
char ** | argv | ||
) |
const char* use[] |
|
extern |