![]() |
![]() |
Gwyddion Data Processing Library Reference Manual | ![]() |
|
---|---|---|---|---|
Top | Description |
#include <libprocess/gwyprocess.h> gdouble gwy_data_field_get_max (GwyDataField *data_field
); gdouble gwy_data_field_get_min (GwyDataField *data_field
); void gwy_data_field_get_min_max (GwyDataField *data_field
,gdouble *min
,gdouble *max
); 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
); gdouble gwy_data_field_area_get_max (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_min (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); void gwy_data_field_area_get_min_max (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
,gdouble *min
,gdouble *max
); void gwy_data_field_area_get_min_max_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
,gdouble *min
,gdouble *max
); gdouble gwy_data_field_area_get_avg (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_avg_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_rms (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_rms_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_grainwise_rms (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_sum (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_sum_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_median (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_median_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_surface_area (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_surface_area_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
); gdouble gwy_data_field_area_get_volume (GwyDataField *data_field
,GwyDataField *basis
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
); void gwy_data_field_get_autorange (GwyDataField *data_field
,gdouble *from
,gdouble *to
); 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
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
,gdouble *avg
,gdouble *ra
,gdouble *rms
,gdouble *skew
,gdouble *kurtosis
); void gwy_data_field_area_get_stats_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
,gdouble *avg
,gdouble *ra
,gdouble *rms
,gdouble *skew
,gdouble *kurtosis
); void gwy_data_field_area_count_in_range (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
,gdouble below
,gdouble above
,gint *nbelow
,gint *nabove
); void gwy_data_field_area_dh (GwyDataField *data_field
,GwyDataField *mask
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
); void gwy_data_field_dh (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
); void gwy_data_field_area_cdh (GwyDataField *data_field
,GwyDataField *mask
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
); void gwy_data_field_cdh (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
); void gwy_data_field_area_da (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,gint nstats
); void gwy_data_field_da (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,gint nstats
); void gwy_data_field_area_cda (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,gint nstats
); void gwy_data_field_cda (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,gint nstats
); void gwy_data_field_area_acf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
); void gwy_data_field_acf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
); void gwy_data_field_area_hhcf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
); void gwy_data_field_hhcf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
); void gwy_data_field_area_psdf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
); void gwy_data_field_psdf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
); void gwy_data_field_area_rpsdf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
); void gwy_data_field_rpsdf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
); void gwy_data_field_area_2dacf (GwyDataField *data_field
,GwyDataField *target_field
,gint col
,gint row
,gint width
,gint height
,gint xrange
,gint yrange
); void gwy_data_field_2dacf (GwyDataField *data_field
,GwyDataField *target_field
); void gwy_data_field_area_racf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
); void gwy_data_field_racf (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
); void gwy_data_field_area_minkowski_volume (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
); void gwy_data_field_minkowski_volume (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
); void gwy_data_field_area_minkowski_boundary (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
); void gwy_data_field_minkowski_boundary (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
); void gwy_data_field_area_minkowski_euler (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
); void gwy_data_field_minkowski_euler (GwyDataField *data_field
,GwyDataLine *target_line
,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
); void gwy_data_field_area_get_line_stats (GwyDataField *data_field
,GwyDataField *mask
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyLineStatQuantity quantity
,GwyOrientation orientation
); void gwy_data_field_get_line_stats (GwyDataField *data_field
,GwyDataLine *target_line
,GwyLineStatQuantity quantity
,GwyOrientation orientation
);
Many statistical functions permit to pass masks that determine which values
in the data field to take into account or ignore when calculating the
statistical characteristics. Masking mode GWY_MASK_INCLUDE
means that
maks values equal to 0.0 and below cause corresponding data field samples
to be ignored, values equal to 1.0 and above cause inclusion of
corresponding data field samples. The behaviour for values inside interval
(0.0, 1.0) is undefined. In mode GWY_MASK_EXCLUDE
, the meaning of mask is
inverted, as if all mask values x were replaced with 1-x. The
mask field is ignored in mode GWY_MASK_IGNORE
, i.e. the same behaviour
occurs as with NULL
mask argument.
gdouble gwy_data_field_get_max (GwyDataField *data_field
);
Finds the maximum value of a data field.
This quantity is cached.
|
A data field. |
Returns : |
The maximum value. |
gdouble gwy_data_field_get_min (GwyDataField *data_field
);
Finds the minimum value of a data field.
This quantity is cached.
|
A data field. |
Returns : |
The minimum value. |
void gwy_data_field_get_min_max (GwyDataField *data_field
,gdouble *min
,gdouble *max
);
Finds minimum and maximum values of a data field.
|
A data field. |
|
Location to store minimum to. |
|
Location to store maximum to. |
gdouble gwy_data_field_get_avg (GwyDataField *data_field
);
Computes average value of a data field.
This quantity is cached.
|
A data field |
Returns : |
The average value. |
gdouble gwy_data_field_get_rms (GwyDataField *data_field
);
Computes root mean square value of a data field.
This quantity is cached.
|
A data field. |
Returns : |
The root mean square value. |
gdouble gwy_data_field_get_sum (GwyDataField *data_field
);
Sums all values in a data field.
This quantity is cached.
|
A data field. |
Returns : |
The sum of all values. |
gdouble gwy_data_field_get_median (GwyDataField *data_field
);
Computes median value of a data field.
This quantity is cached.
|
A data field. |
Returns : |
The median value. |
gdouble gwy_data_field_get_surface_area (GwyDataField *data_field
);
Computes surface area of a data field.
This quantity is cached.
|
A data field. |
Returns : |
surface area |
gdouble gwy_data_field_area_get_max (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
Finds the maximum value in a rectangular part of a data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The maximum value. When the number of samples to calculate
maximum of is zero, -G_MAXDOUBLE is returned. |
gdouble gwy_data_field_area_get_min (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
Finds the minimum value in a rectangular part of a data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The minimum value. When the number of samples to calculate
minimum of is zero, -G_MAXDOUBLE is returned. |
void gwy_data_field_area_get_min_max (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
,gdouble *min
,gdouble *max
);
gwy_data_field_area_get_min_max
is deprecated and should not be used in newly-written code.
Finds minimum and maximum values in a rectangular part of a data field.
This function is equivalent to calling
with masking mode gwy_data_field_area_get_min_max_mask()
GWY_MASK_INCLUDE
.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Location to store minimum to. |
|
Location to store maximum to. |
void gwy_data_field_area_get_min_max_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
,gdouble *min
,gdouble *max
);
Finds minimum and maximum values in a rectangular part of a data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Location to store minimum to. |
|
Location to store maximum to. |
Since 2.18
gdouble gwy_data_field_area_get_avg (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
gwy_data_field_area_get_avg
is deprecated and should not be used in newly-written code.
Computes average value of a rectangular part of a data field.
This function is equivalent to calling
with masking mode gwy_data_field_area_get_avg_mask()
GWY_MASK_INCLUDE
.
|
A data field |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The average value. |
gdouble gwy_data_field_area_get_avg_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes average value of a rectangular part of a data field.
|
A data field |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The average value. |
Since 2.18
gdouble gwy_data_field_area_get_rms (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
gwy_data_field_area_get_rms
is deprecated and should not be used in newly-written code.
Computes root mean square value of a rectangular part of a data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The root mean square value.
This function is equivalent to calling
with masking mode GWY_MASK_INCLUDE . |
gdouble gwy_data_field_area_get_rms_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes root mean square value of deviations of a rectangular part of a data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The root mean square value of deviations from the mean value. |
Since 2.18
gdouble gwy_data_field_area_get_grainwise_rms (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes grain-wise root mean square value of deviations of a rectangular part of a data field.
Grain-wise means that the mean value is determined for each grain (i.e. cotinguous part of the mask or inverted mask) separately and the deviations are calculated from these mean values.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The root mean square value of deviations from the mean value. |
Since 2.29
gdouble gwy_data_field_area_get_sum (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
gwy_data_field_area_get_sum
is deprecated and should not be used in newly-written code.
Sums values of a rectangular part of a data field.
This function is equivalent to calling
with masking mode gwy_data_field_area_get_sum_mask()
GWY_MASK_INCLUDE
.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The sum of all values inside area. |
gdouble gwy_data_field_area_get_sum_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Sums values of a rectangular part of a data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The sum of all values inside area. |
Since 2.18
gdouble gwy_data_field_area_get_median (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
gwy_data_field_area_get_median
is deprecated and should not be used in newly-written code.
Computes median value of a data field area.
This function is equivalent to calling
with masking mode gwy_data_field_area_get_median_mask()
GWY_MASK_INCLUDE
.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The median value. |
gdouble gwy_data_field_area_get_median_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes median value of a data field area.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The median value. |
Since 2.18
gdouble gwy_data_field_area_get_surface_area (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
gwy_data_field_area_get_surface_area
is deprecated and should not be used in newly-written code.
gdouble gwy_data_field_area_get_surface_area_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes surface area of a rectangular part of a data field.
This quantity makes sense only if the lateral dimensions and values of
data_field
are the same physical quantities.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The surface area. |
Since 2.18
gdouble gwy_data_field_area_get_volume (GwyDataField *data_field
,GwyDataField *basis
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
);
Computes volume of a rectangular part of a data field.
|
A data field. |
|
The basis or background for volume calculation if not NULL .
The height of each vertex is then the difference between
data_field value and basis value. Value NULL is the same
as passing all zeroes for the basis. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
Returns : |
The volume. |
Since 2.3
void gwy_data_field_get_autorange (GwyDataField *data_field
,gdouble *from
,gdouble *to
);
Computes value range with outliers cut-off.
The purpose of this function is to find a range is suitable for false color mapping. The precise method how it is calculated is unspecified and may be subject to changes.
However, it is guaranteed minimum <= from
<= to
<= maximum.
This quantity is cached.
|
A data field. |
|
Location to store range start. |
|
Location to store range end. |
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.
|
A data field. |
|
Where average height value of the surface should be stored, or NULL . |
|
Where average value of irregularities should be stored, or NULL . |
|
Where root mean square value of irregularities (Rq) should be stored,
or NULL . |
|
Where skew (symmetry of height distribution) should be stored, or
NULL . |
|
Where kurtosis (peakedness of height ditribution) should be
stored, or NULL . |
void gwy_data_field_area_get_stats (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
,gdouble *avg
,gdouble *ra
,gdouble *rms
,gdouble *skew
,gdouble *kurtosis
);
gwy_data_field_area_get_stats
is deprecated and should not be used in newly-written code.
Computes basic statistical quantities of a rectangular part of a data field.
This function is equivalent to calling
with masking mode gwy_data_field_area_get_stats_mask()
GWY_MASK_INCLUDE
.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Where average height value of the surface should be stored, or NULL . |
|
Where average value of irregularities should be stored, or NULL . |
|
Where root mean square value of irregularities (Rq) should be stored,
or NULL . |
|
Where skew (symmetry of height distribution) should be stored, or
NULL . |
|
Where kurtosis (peakedness of height ditribution) should be
stored, or NULL . |
void gwy_data_field_area_get_stats_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,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.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Masking mode to use. See the introduction for description of masking modes. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Where average height value of the surface should be stored, or NULL . |
|
Where average value of irregularities should be stored, or NULL . |
|
Where root mean square value of irregularities (Rq) should be stored,
or NULL . |
|
Where skew (symmetry of height distribution) should be stored, or
NULL . |
|
Where kurtosis (peakedness of height ditribution) should be
stored, or NULL . |
Since 2.18
void gwy_data_field_area_count_in_range (GwyDataField *data_field
,GwyDataField *mask
,gint col
,gint row
,gint width
,gint height
,gdouble below
,gdouble above
,gint *nbelow
,gint *nabove
);
Counts data samples in given range.
No assertion is made about the values of above
and below
, in other words
above
may be larger than below
. To count samples in an open interval
instead of a closed interval, exchange below
and above
and then subtract
the nabove
and nbelow
from width
*height
to get the complementary counts.
With this trick the common task of counting positive values can be realized:
1 2 3 4 |
gwy_data_field_area_count_in_range(data_field, NULL, col, row, width, height, 0.0, 0.0, &count, NULL); count = width*height - count; |
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Upper bound to compare data to. The number of samples less
than or equal to below is stored in nbelow . |
|
Lower bound to compare data to. The number of samples greater
than or equal to above is stored in nabove . |
|
Location to store the number of samples less than or equal
to below , or NULL . |
|
Location to store the number of samples greater than or equal
to above , or NULL . |
void gwy_data_field_area_dh (GwyDataField *data_field
,GwyDataField *mask
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
);
Calculates distribution of heights in a rectangular part of data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_dh (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
Calculates distribution of heights in a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_cdh (GwyDataField *data_field
,GwyDataField *mask
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
);
Calculates cumulative distribution of heights in a rectangular part of data field.
|
A data field. |
|
Mask specifying which values to take into account/exclude, or NULL . |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
Since 2.23
void gwy_data_field_cdh (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
Calculates cumulative distribution of heights in a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_da (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,gint nstats
);
Calculates distribution of slopes in a rectangular part of data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Orientation to compute the slope distribution in. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_da (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,gint nstats
);
Calculates distribution of slopes in a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Orientation to compute the slope distribution in. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_cda (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,gint nstats
);
Calculates cumulative distribution of slopes in a rectangular part of data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Orientation to compute the slope distribution in. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_cda (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,gint nstats
);
Calculates cumulative distribution of slopes in a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Orientation to compute the slope distribution in. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_acf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
);
Calculates one-dimensional autocorrelation function of a rectangular part of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Orientation of lines (ACF is simply averaged over the other orientation). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
The number of samples to take on the distribution function. If
nonpositive, width (height ) is used. |
void gwy_data_field_acf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
);
Calculates one-dimensional autocorrelation function of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Orientation of lines (ACF is simply averaged over the other orientation). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
void gwy_data_field_area_hhcf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
);
Calculates one-dimensional autocorrelation function of a rectangular part of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Orientation of lines (HHCF is simply averaged over the other orientation). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
The number of samples to take on the distribution function. If
nonpositive, width (height ) is used. |
void gwy_data_field_hhcf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,GwyInterpolationType interpolation
,gint nstats
);
Calculates one-dimensional autocorrelation function of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Orientation of lines (HHCF is simply averaged over the other orientation). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
void gwy_data_field_area_psdf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyOrientation orientation
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
);
Calculates one-dimensional power spectrum density function of a rectangular part of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Orientation of lines (PSDF is simply averaged over the other orientation). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
Windowing type to use. |
|
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
void gwy_data_field_psdf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
);
Calculates one-dimensional power spectrum density function of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Orientation of lines (PSDF is simply averaged over the other orientation). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
Windowing type to use. |
|
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
void gwy_data_field_area_rpsdf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
);
Calculates radial power spectrum density function of a rectangular part of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Interpolation to use when nstats is given and requires
resampling. |
|
Windowing type to use. |
|
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
Since 2.7
void gwy_data_field_rpsdf (GwyDataField *data_field
,GwyDataLine *target_line
,GwyInterpolationType interpolation
,GwyWindowingType windowing
,gint nstats
);
Calculates radial power spectrum density function of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Interpolation to use when nstats is given and requires
resampling. |
|
Windowing type to use. |
|
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
Since 2.7
void gwy_data_field_area_2dacf (GwyDataField *data_field
,GwyDataField *target_field
,gint col
,gint row
,gint width
,gint height
,gint xrange
,gint yrange
);
Calculates two-dimensional autocorrelation function of a data field area.
The resulting data field has the correlation corresponding to (0,0) in the centre.
The maximum possible values of xrange
and yrange
are data_field
width and height, respectively. However, as the values for longer
distances are calculated from smaller number of data points they become
increasingly bogus, therefore the default range is half of the size.
|
A data field. |
|
A data field to store the result to. It will be resampled
to (2xrange -1)x(2yrange -1). |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Horizontal correlation range. Non-positive value means
the default range of half of data_field width will be used. |
|
Vertical correlation range. Non-positive value means
the default range of half of data_field height will be used. |
Since 2.7
void gwy_data_field_2dacf (GwyDataField *data_field
,GwyDataField *target_field
);
Calculates two-dimensional autocorrelation function of a data field.
See gwy_data_field_area_2dacf()
for details. Parameters missing (not
adjustable) in this function are set to their default values.
|
A data field. |
|
A data field to store the result to. |
Since 2.7
void gwy_data_field_area_racf (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
);
Calculates radially averaged autocorrelation function of a data field.
|
A data field. |
|
A data line to store the autocorrelation function to. It will be resampled to requested width. |
|
The number of samples to take on the autocorrelation function. If nonpositive, a suitable resolution is chosen automatically. |
Since 2.22
void gwy_data_field_racf (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
void gwy_data_field_area_minkowski_volume (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
);
Calculates Minkowski volume functional of a rectangular part of a data field.
Volume functional is calculated as the number of values above each threshold value (,white pixels`) divided by the total number of samples in the area. Is it's equivalent to 1-CDH.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_minkowski_volume (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
Calculates Minkowski volume functional of a data field.
See gwy_data_field_area_minkowski_volume()
for details.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_minkowski_boundary (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
);
Calculates Minkowski boundary functional of a rectangular part of a data field.
Boundary functional is calculated as the number of boundaries for each threshold value (the number of pixel sides where of neighouring pixels is ,white` and the other ,black`) divided by the total number of samples in the area.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_minkowski_boundary (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
Calculates Minkowski boundary functional of a data field.
See gwy_data_field_area_minkowski_boundary()
for details.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_minkowski_euler (GwyDataField *data_field
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,gint nstats
);
Calculates Minkowski connectivity functional (Euler characteristics) of a rectangular part of a data field.
Connectivity functional is calculated as the number connected areas of pixels above threhsold (,white`) minus the number of connected areas of pixels below threhsold (,black`) for each threshold value, divided by the total number of samples in the area.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_minkowski_euler (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
Calculates Minkowski connectivity functional (Euler characteristics) of a data field.
See gwy_data_field_area_minkowski_euler()
for details.
|
A data field. |
|
A data line to store the distribution to. It will be resampled to requested width. |
|
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_slope_distribution (GwyDataField *data_field
,GwyDataLine *derdist
,gint kernel_size
);
Computes angular slope distribution.
|
A data field. |
|
A data line to fill with angular slope distribution. Its resolution determines resolution of the distribution. |
|
If positive, local plane fitting will be used for slope computation; if nonpositive, plain central derivations will be used. |
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.
|
A data field. |
|
Where x-component of average normal vector should be stored, or NULL . |
|
Where y-component of average normal vector should be stored, or NULL . |
|
Where z-component of average normal vector should be stored, or NULL . |
|
true to normalize the normal vector to 1, false to normalize the vector so that z-component is 1. |
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.
|
A data field. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Where x-component of average normal vector should be stored, or NULL . |
|
Where y-component of average normal vector should be stored, or NULL . |
|
Where z-component of average normal vector should be stored, or NULL . |
|
true to normalize the normal vector to 1, false to normalize the vector so that z-component is 1. |
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).
|
A data field. |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
Where theta angle (in radians) should be stored, or NULL . |
|
Where phi angle (in radians) should be stored, or NULL . |
void gwy_data_field_get_inclination (GwyDataField *data_field
,gdouble *theta
,gdouble *phi
);
Calculates the inclination of the image (polar and azimuth angle).
void gwy_data_field_area_get_line_stats (GwyDataField *data_field
,GwyDataField *mask
,GwyDataLine *target_line
,gint col
,gint row
,gint width
,gint height
,GwyLineStatQuantity quantity
,GwyOrientation orientation
);
Calculates a line quantity for each row or column in a data field area.
|
A data field. |
|
Mask of values to take values into account, or NULL for full
data_field . Masking is currently unimplemented. |
|
A data line to store the distribution to. It will be resampled to the number of rows (columns). |
|
Upper-left column coordinate. |
|
Upper-left row coordinate. |
|
Area width (number of columns). |
|
Area height (number of rows). |
|
The line quantity to calulate for each row (column). |
|
Line orientation. For GWY_ORIENTATION_HORIZONTAL each
target_line point corresponds to a row of the area,
for GWY_ORIENTATION_VERTICAL each target_line point
corresponds to a column of the area. |
Since 2.2
void gwy_data_field_get_line_stats (GwyDataField *data_field
,GwyDataLine *target_line
,GwyLineStatQuantity quantity
,GwyOrientation orientation
);
Calculates a line quantity for each row or column of a data field.
|
A data field. |
|
A data line to store the distribution to. It will be
resampled to data_field height (width). |
|
The line quantity to calulate for each row (column). |
|
Line orientation. See gwy_data_field_area_get_line_stats() . |
Since 2.2