stats

stats — 2D statistical functions

Synopsis




gdouble     gwy_data_field_get_max          (GwyDataField *data_field);
gdouble     gwy_data_field_get_min          (GwyDataField *data_field);
gdouble     gwy_data_field_get_avg          (GwyDataField *data_field);
gdouble     gwy_data_field_get_rms          (GwyDataField *data_field);
gdouble     gwy_data_field_get_sum          (GwyDataField *data_field);
gdouble     gwy_data_field_get_median       (GwyDataField *data_field);
gdouble     gwy_data_field_get_surface_area (GwyDataField *data_field,
                                             GwyInterpolationType interpolation);
gdouble     gwy_data_field_area_get_max     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);
gdouble     gwy_data_field_area_get_min     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);
gdouble     gwy_data_field_area_get_avg     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);
gdouble     gwy_data_field_area_get_rms     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);
gdouble     gwy_data_field_area_get_sum     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);
gdouble     gwy_data_field_area_get_median  (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);
gdouble     gwy_data_field_area_get_surface_area
                                            (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             GwyInterpolationType interpolation);
void        gwy_data_field_get_stats        (GwyDataField *data_field,
                                             gdouble *avg,
                                             gdouble *ra,
                                             gdouble *rms,
                                             gdouble *skew,
                                             gdouble *kurtosis);
void        gwy_data_field_area_get_stats   (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             gdouble *avg,
                                             gdouble *ra,
                                             gdouble *rms,
                                             gdouble *skew,
                                             gdouble *kurtosis);
gboolean    gwy_data_field_get_line_stat_function
                                            (GwyDataField *data_field,
                                             GwyDataLine *target_line,
                                             gint ulcol,
                                             gint ulrow,
                                             gint brcol,
                                             gint brrow,
                                             GwySFOutputType type,
                                             GwyOrientation orientation,
                                             GwyInterpolationType interpolation,
                                             GwyWindowingType windowing,
                                             gint nstats);
void        gwy_data_field_slope_distribution
                                            (GwyDataField *data_field,
                                             GwyDataLine *derdist,
                                             gint kernel_size);
void        gwy_data_field_get_normal_coeffs
                                            (GwyDataField *data_field,
                                             gdouble *nx,
                                             gdouble *ny,
                                             gdouble *nz,
                                             gboolean normalize1);
void        gwy_data_field_area_get_normal_coeffs
                                            (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             gdouble *nx,
                                             gdouble *ny,
                                             gdouble *nz,
                                             gboolean normalize1);
void        gwy_data_field_area_get_inclination
                                            (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             gdouble *theta,
                                             gdouble *phi);
void        gwy_data_field_get_inclination  (GwyDataField *data_field,
                                             gdouble *theta,
                                             gdouble *phi);

Description

Details

gwy_data_field_get_max ()

gdouble     gwy_data_field_get_max          (GwyDataField *data_field);

Finds the maximum value of a data field.

data_field : A data field.
Returns : The maximum value.

gwy_data_field_get_min ()

gdouble     gwy_data_field_get_min          (GwyDataField *data_field);

Finds the minimum value of a data field.

data_field : A data field.
Returns : The minimum value.

gwy_data_field_get_avg ()

gdouble     gwy_data_field_get_avg          (GwyDataField *data_field);

Computes average value of a data field.

data_field : A data field
Returns : The average value.

gwy_data_field_get_rms ()

gdouble     gwy_data_field_get_rms          (GwyDataField *data_field);

Computes root mean square value of a data field.

data_field : A data field.
Returns : The root mean square value.

gwy_data_field_get_sum ()

gdouble     gwy_data_field_get_sum          (GwyDataField *data_field);

Sums all values in a data field.

data_field : A data field.
Returns : The sum of all values.

gwy_data_field_get_median ()

gdouble     gwy_data_field_get_median       (GwyDataField *data_field);

Computes median value of a data field.

data_field : A data field.
Returns : The median value.

gwy_data_field_get_surface_area ()

gdouble     gwy_data_field_get_surface_area (GwyDataField *data_field,
                                             GwyInterpolationType interpolation);

Computes surface area of a data field.

data_field : A data field.
interpolation : interpolation method
Returns : surface area

gwy_data_field_area_get_max ()

gdouble     gwy_data_field_area_get_max     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);

Finds the maximum value in a rectangular part of a data field.

data_field : A data field
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
Returns : The maximum value.

gwy_data_field_area_get_min ()

gdouble     gwy_data_field_area_get_min     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);

Finds the minimum value in a rectangular part of a data field.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
Returns : The minimum value.

gwy_data_field_area_get_avg ()

gdouble     gwy_data_field_area_get_avg     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);

Computes average value of a rectangular part of a data field.

data_field : A data field
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
Returns : The average value.

gwy_data_field_area_get_rms ()

gdouble     gwy_data_field_area_get_rms     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);

Computes root mean square value of a rectangular part of a data field.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
Returns : The root mean square value.

gwy_data_field_area_get_sum ()

gdouble     gwy_data_field_area_get_sum     (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);

Sums values of a rectangular part of a data field.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
Returns : The sum of all values inside area.

gwy_data_field_area_get_median ()

gdouble     gwy_data_field_area_get_median  (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height);

Computes median value of a data field area.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
Returns : The median value.

gwy_data_field_area_get_surface_area ()

gdouble     gwy_data_field_area_get_surface_area
                                            (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             GwyInterpolationType interpolation);

Computes surface area of a rectangular part of a data field.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
interpolation : Interpolation method.
Returns : The surface area.

gwy_data_field_get_stats ()

void        gwy_data_field_get_stats        (GwyDataField *data_field,
                                             gdouble *avg,
                                             gdouble *ra,
                                             gdouble *rms,
                                             gdouble *skew,
                                             gdouble *kurtosis);

Computes basic statistical quantities of a data field.

data_field : A data field.
avg : Where average height value of the surface should be stored, or NULL.
ra : Where average value of irregularities should be stored, or NULL.
rms : Where root mean square value of irregularities (Rq) should be stored, or NULL.
skew : Where skew (symmetry of height distribution) should be stored, or NULL.
kurtosis : Where kurtosis (peakedness of height ditribution) should be stored, or NULL.

gwy_data_field_area_get_stats ()

void        gwy_data_field_area_get_stats   (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             gdouble *avg,
                                             gdouble *ra,
                                             gdouble *rms,
                                             gdouble *skew,
                                             gdouble *kurtosis);

Computes basic statistical quantities of a rectangular part of a data field.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
avg : Where average height value of the surface should be stored, or NULL.
ra : Where average value of irregularities should be stored, or NULL.
rms : Where root mean square value of irregularities (Rq) should be stored, or NULL.
skew : Where skew (symmetry of height distribution) should be stored, or NULL.
kurtosis : Where kurtosis (peakedness of height ditribution) should be stored, or NULL.

gwy_data_field_get_line_stat_function ()

gboolean    gwy_data_field_get_line_stat_function
                                            (GwyDataField *data_field,
                                             GwyDataLine *target_line,
                                             gint ulcol,
                                             gint ulrow,
                                             gint brcol,
                                             gint brrow,
                                             GwySFOutputType type,
                                             GwyOrientation orientation,
                                             GwyInterpolationType interpolation,
                                             GwyWindowingType windowing,
                                             gint nstats);

Computes a statistical distribution of data field values.

data_field : A data field.
target_line : A data line to store the distribution to. It will be resampled to requested width.
ulcol : Upper-left corner column index.
ulrow : Upper-left corner row index.
brcol : Bottom-right corner column index + 1.
brrow : Bottom-right column row index + 1.
type : The type of distribution to compute.
orientation : Orientation to compute the distribution in.
interpolation : Interpolation to use (unused for some functions).
windowing : Windowing type to use (unused for some functions).
nstats : The number of samples to take on the distribution function. If nonpositive, data_field's resolution is used.
Returns : Normally FALSE; TRUE when data_field is too small. The return value should be ignored.

gwy_data_field_slope_distribution ()

void        gwy_data_field_slope_distribution
                                            (GwyDataField *data_field,
                                             GwyDataLine *derdist,
                                             gint kernel_size);

Computes angular slope distribution.

data_field : A data field.
derdist : A data line to fill with angular slope distribution. Its resolution determines resolution of the distribution.
kernel_size : If positive, local plane fitting will be used for slope computation; if nonpositive, plain central derivations will be used.

gwy_data_field_get_normal_coeffs ()

void        gwy_data_field_get_normal_coeffs
                                            (GwyDataField *data_field,
                                             gdouble *nx,
                                             gdouble *ny,
                                             gdouble *nz,
                                             gboolean normalize1);

Computes average normal vector of a data field.

data_field : A data field.
nx : Where x-component of average normal vector should be stored, or NULL.
ny : Where y-component of average normal vector should be stored, or NULL.
nz : Where z-component of average normal vector should be stored, or NULL.
normalize1 : true to normalize the normal vector to 1, false to normalize the vector so that z-component is 1.

gwy_data_field_area_get_normal_coeffs ()

void        gwy_data_field_area_get_normal_coeffs
                                            (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             gdouble *nx,
                                             gdouble *ny,
                                             gdouble *nz,
                                             gboolean normalize1);

Computes average normal vector of an area of a data field.

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
nx : Where x-component of average normal vector should be stored, or NULL.
ny : Where y-component of average normal vector should be stored, or NULL.
nz : Where z-component of average normal vector should be stored, or NULL.
normalize1 : true to normalize the normal vector to 1, false to normalize the vector so that z-component is 1.

gwy_data_field_area_get_inclination ()

void        gwy_data_field_area_get_inclination
                                            (GwyDataField *data_field,
                                             gint col,
                                             gint row,
                                             gint width,
                                             gint height,
                                             gdouble *theta,
                                             gdouble *phi);

Calculates the inclination of the image (polar and azimuth angle).

data_field : A data field.
col : Upper-left column coordinate.
row : Upper-left row coordinate.
width : Area width (number of columns).
height : Area height (number of rows).
theta : Where theta angle (in radians) should be stored, or NULL.
phi : Where phi angle (in radians) should be stored, or NULL.

gwy_data_field_get_inclination ()

void        gwy_data_field_get_inclination  (GwyDataField *data_field,
                                             gdouble *theta,
                                             gdouble *phi);

Calculates the inclination of the image (polar and azimuth angle).

data_field : A data field.
theta : Where theta angle (in radians) should be stored, or NULL.
phi : Where phi angle (in radians) should be stored, or NULL.