Top | ![]() |
![]() |
![]() |
![]() |
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.
gdouble
gwy_data_field_get_min (GwyDataField *data_field
);
Finds the minimum value of a data field.
This quantity is cached.
void gwy_data_field_get_min_max (GwyDataField *data_field
,gdouble *min
,gdouble *max
);
Finds minimum and maximum values of a data field.
gdouble
gwy_data_field_get_avg (GwyDataField *data_field
);
Computes average value of a data field.
This quantity is cached.
gdouble
gwy_data_field_get_rms (GwyDataField *data_field
);
Computes root mean square value of a data field.
The root mean square value is calculated with respect to the mean value.
See gwy_data_field_get_mean_square()
for a similar function which does not
subtract the mean value.
This quantity is cached.
gdouble
gwy_data_field_get_mean_square (GwyDataField *data_field
);
Computes mean square value of a data field.
See gwy_data_field_area_get_mean_square()
for remarks.
Since: 2.52
gdouble
gwy_data_field_get_sum (GwyDataField *data_field
);
Sums all values in a data field.
This quantity is cached.
gdouble
gwy_data_field_get_median (GwyDataField *data_field
);
Computes median value of a data field.
This quantity is cached.
gdouble
gwy_data_field_get_surface_area (GwyDataField *data_field
);
Computes surface area of a data field.
This quantity is cached.
gdouble
gwy_data_field_get_surface_slope (GwyDataField *data_field
);
Computes root mean square surface slope (Sdq) of a data field.
Since: 2.58
gdouble
gwy_data_field_get_variation (GwyDataField *data_field
);
Computes the total variation of a data field.
See gwy_data_field_area_get_variation()
for the definition.
This quantity is cached.
Since: 2.38
gdouble
gwy_data_field_get_entropy (GwyDataField *data_field
);
Computes the entropy of a data field.
See gwy_data_field_area_get_entropy()
for the definition.
This quantity is cached.
Since: 2.42
gdouble gwy_data_field_get_entropy_2d (GwyDataField *xfield
,GwyDataField *yfield
);
Computes the entropy of a two-dimensional point cloud.
Each pair of corresponding xfield
and yfield
pixels is assumed to
represent the coordinates (x
,y
) of a point in plane. Hence they must have
the same dimensions.
xfield |
A data field containing the |
|
yfield |
A data field containing the |
Since: 2.44
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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
.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
min |
Location to store minimum to. |
|
max |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
min |
Location to store minimum to. |
|
max |
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
.
data_field |
A data field |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
data_field |
A data field |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
The root mean square value is calculated with respect to the mean value.
This function is equivalent to calling
with masking mode gwy_data_field_area_get_rms_mask()
GWY_MASK_INCLUDE
.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
The root mean square value is calculated with respect to the mean value.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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
.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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
.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
Computes surface area of a rectangular part of a data field.
This function is equivalent to calling
with masking mode
gwy_data_field_area_get_surface_area_mask()
GWY_MASK_INCLUDE
.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
Since: 2.18
gdouble gwy_data_field_area_get_surface_slope_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes root mean square surface slope (Sdq) of a rectangular part of a data field.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
Since: 2.58
gdouble gwy_data_field_area_get_mean_square (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes mean square value of a rectangular part of a data field.
Unlike gwy_data_field_get_rms()
, this function does not
subtract the mean value beforehand. Therefore, it is useful to sum the
squared values of data fields which can have the zero level set differently,
for instance when the field contains a distribution.
data_field |
A two-dimensional data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
Since: 2.52
gdouble gwy_data_field_area_get_entropy_at_scales (GwyDataField *data_field
,GwyDataLine *target_line
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
,gint maxdiv
);
Calculates estimates of value distribution entropy at various scales.
data_field |
A data field. |
|
target_line |
A data line to store the result to. It will be resampled to
|
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
maxdiv |
Maximum number of divisions of the value range. Pass zero to choose it automatically. |
Since: 2.44
gdouble gwy_data_field_get_entropy_2d_at_scales (GwyDataField *xfield
,GwyDataField *yfield
,GwyDataLine *target_line
,gint maxdiv
);
Calculates estimates of entropy of two-dimensional point cloud at various scales.
xfield |
A data field containing the |
|
yfield |
A data field containing the |
|
target_line |
A data line to store the result to. It will be resampled to
|
|
maxdiv |
Maximum number of divisions of the value range. Pass zero to choose it automatically. |
Since: 2.44
gdouble gwy_data_field_area_get_variation (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Computes the total variation of a rectangular part of a data field.
The total variation is estimated as the integral of the absolute value of local gradient.
This quantity has the somewhat odd units of value unit times lateral unit. It can be envisioned as follows. If the surface has just two height levels (upper and lower planes) then the quantity is the length of the boundary between the upper and lower part, multiplied by the step height. If the surface is piece-wise constant, then the variation is the step height integrated along the boundaries between the constant parts. Therefore, for non-fractal surfaces it scales with the linear dimension of the image, not with its area, despite being an area integral.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
Since: 2.38
gdouble gwy_data_field_area_get_entropy (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType mode
,gint col
,gint row
,gint width
,gint height
);
Estimates the entropy of field data distribution.
The estimate is calculated as S
= ln(n
Δ) − 1/n
∑ n_i
ln(n_i
), where
n
is the number of pixels considered, Δ the bin size and n_i
the count in
the i
-th bin. If S
is plotted as a function of the bin size Δ, it is,
generally, a growing function with a plateau for ‘reasonable’ bin sizes.
The estimate is taken at the plateau. If no plateau is found, which means
the distribution is effectively a sum of δ-functions, -G_MAXDOUBLE
is
returned.
It should be noted that this estimate may be biased.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
The estimated entropy of the data values. The entropy of no data
or a single single is returned as -G_MAXDOUBLE
.
Since: 2.42
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.
data_field |
A data field. |
|
basis |
The basis or background for volume calculation if not |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
Since: 2.3
void gwy_data_field_get_autorange (GwyDataField *data_field
,gdouble *from
,gdouble *to
);
Computes data field 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.
void gwy_data_field_area_get_autorange (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType masking
,gint col
,gint row
,gint width
,gint height
,gdouble *from
,gdouble *to
);
Computes data field area value range with outliers cut-off.
See gwy_data_field_get_autorange()
for discussion.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use. See the introduction for description of masking modes. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
from |
Location to store range start. |
|
to |
Location to store range end. |
Since: 2.54
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.
Note the kurtosis returned by this function returns is the excess kurtosis which is zero for the Gaussian distribution (not 3).
data_field |
A data field. |
|
avg |
Where average height value of the surface should be stored, or |
|
ra |
Where average value of irregularities should be stored, or |
|
rms |
Where root mean square value of irregularities (Rq) should be stored,
or |
|
skew |
Where skew (symmetry of height distribution) should be stored, or
|
|
kurtosis |
Where kurtosis (peakedness of height ditribution) should be
stored, or |
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
.
Note the kurtosis returned by this function returns is the excess kurtosis which is zero for the Gaussian distribution (not 3).
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
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 |
|
ra |
Where average value of irregularities should be stored, or |
|
rms |
Where root mean square value of irregularities (Rq) should be stored,
or |
|
skew |
Where skew (symmetry of height distribution) should be stored, or
|
|
kurtosis |
Where kurtosis (peakedness of height ditribution) should be
stored, or |
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.
Note the kurtosis returned by this function returns is the excess kurtosis which is zero for the Gaussian distribution (not 3).
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
mode |
Masking mode to use. See the introduction for description of masking modes. |
|
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 |
|
ra |
Where average value of irregularities should be stored, or |
|
rms |
Where root mean square value of irregularities (Rq) should be stored,
or |
|
skew |
Where skew (symmetry of height distribution) should be stored, or
|
|
kurtosis |
Where kurtosis (peakedness of height ditribution) should be
stored, or |
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; |
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account, or |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
below |
Upper bound to compare data to. The number of samples less
than or equal to |
|
above |
Lower bound to compare data to. The number of samples greater
than or equal to |
|
nbelow |
Location to store the number of samples less than or equal
to |
|
nabove |
Location to store the number of samples greater than or equal
to |
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account, or |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
nstats |
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.
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account, or |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_cdh (GwyDataField *data_field
,GwyDataLine *target_line
,gint nstats
);
Calculates cumulative distribution of heights in a data field.
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation to compute the slope distribution in. |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_da_mask (GwyDataField *data_field
,GwyDataField *mask
,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, with masking.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account, or |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation to compute the slope distribution in. |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
Since: 2.49
void gwy_data_field_da (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,gint nstats
);
Calculates distribution of slopes in a data field.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
orientation |
Orientation to compute the slope distribution in. |
|
nstats |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation to compute the slope distribution in. |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
void gwy_data_field_area_cda_mask (GwyDataField *data_field
,GwyDataField *mask
,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, with masking.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account, or |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation to compute the slope distribution in. |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, a suitable resolution is determined automatically. |
Since: 2.49
void gwy_data_field_cda (GwyDataField *data_field
,GwyDataLine *target_line
,GwyOrientation orientation
,gint nstats
);
Calculates cumulative distribution of slopes in a data field.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
orientation |
Orientation to compute the slope distribution in. |
|
nstats |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation of lines (ACF is simply averaged over the other orientation). |
|
interpolation |
Interpolation to use when |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
orientation |
Orientation of lines (ACF is simply averaged over the other orientation). |
|
interpolation |
Interpolation to use when |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
GwyDataLine * gwy_data_field_area_row_acf (GwyDataField *field
,GwyDataField *mask
,GwyMaskingType masking
,guint col
,guint row
,guint width
,guint height
,guint level
,GwyDataLine *weights
);
Calculates the row-wise autocorrelation function (ACF) of a field.
The calculated ACF has the natural number of points, i.e. width
.
Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different numbers of pixels, the resulting ACF values are calculated as a weighted sums where weight of each row's contribution is proportional to the number of contributing terms. In other words, the weighting is fair: each contributing pixel has the same influence on the result.
Only level
values 0 (no levelling) and 1 (subtract the mean value) used to be available. For SPM data, you usually
wish to pass 1. Since 2.56 you can also pass 2 for mean line subtraction.
field |
A two-dimensional data field. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
level |
The first polynomial degree to keep in the rows, lower degrees than |
|
weights |
Line to store the denominators to (or |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation of lines (HHCF is simply averaged over the other orientation). |
|
interpolation |
Interpolation to use when |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
orientation |
Orientation of lines (HHCF is simply averaged over the other orientation). |
|
interpolation |
Interpolation to use when |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
GwyDataLine * gwy_data_field_area_row_hhcf (GwyDataField *field
,GwyDataField *mask
,GwyMaskingType masking
,guint col
,guint row
,guint width
,guint height
,guint level
,GwyDataLine *weights
);
Calculates the row-wise height-height correlation function (HHCF) of a rectangular part of a field.
The calculated HHCF has the natural number of points, i.e. width
.
Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different numbers of pixels, the resulting HHCF values are calculated as a weighted sums where weight of each row's contribution is proportional to the number of contributing terms. In other words, the weighting is fair: each contributing pixel has the same influence on the result.
Only level
values 0 (no levelling) and 1 (subtract the mean value) used to be available. There is no difference
between them for HHCF. Since 2.56 you can also pass 2 for mean line subtraction.
field |
A two-dimensional data field. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
level |
The first polynomial degree to keep in the rows, lower degrees than |
|
weights |
Line to store the denominators to (or |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
orientation |
Orientation of lines (PSDF is simply averaged over the other orientation). |
|
interpolation |
Interpolation to use when |
|
windowing |
Windowing type to use. |
|
nstats |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
orientation |
Orientation of lines (PSDF is simply averaged over the other orientation). |
|
interpolation |
Interpolation to use when |
|
windowing |
Windowing type to use. |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
GwyDataLine * gwy_data_field_area_row_psdf (GwyDataField *field
,GwyDataField *mask
,GwyMaskingType masking
,guint col
,guint row
,guint width
,guint height
,GwyWindowingType windowing
,guint level
);
Calculates the row-wise power spectrum density function (PSDF) of a rectangular part of a field.
The calculated PSDF has the natural number of points that follows from DFT, i.e. width
/2+1.
The reduction of the total energy by windowing is compensated by multiplying the PSDF to make its sum of squares equal to the input data sum of squares.
Masking is performed by omitting all terms that contain excluded pixels. Since different rows contain different numbers of pixels, the resulting PSDF is calculated as a weighted sum where each row's weight is proportional to the number of contributing pixels. In other words, the weighting is fair: each contributing pixel has the same influence on the result.
Only level
values 0 (no levelling) and 1 (subtract the mean value) used to be available. For SPM data, you usually
wish to pass 1. Since 2.56 you can also pass 2 for mean line subtraction.
Do not assume the PSDF values are all positive, when masking is in effect. The PSDF should still have the correct integral, but it will be contaminated with noise, both positive and negative.
field |
A two-dimensional data field. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
windowing |
Windowing type to use. |
|
level |
The first polynomial degree to keep in the rows; lower degrees than |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
interpolation |
Interpolation to use when |
|
windowing |
Windowing type to use. |
|
nstats |
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
interpolation |
Interpolation to use when |
|
windowing |
Windowing type to use. |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, data field width (height) is used. |
Since: 2.7
GwyDataLine * gwy_data_field_area_row_asg (GwyDataField *field
,GwyDataField *mask
,GwyMaskingType masking
,guint col
,guint row
,guint width
,guint height
,guint level
);
Calculates the row-wise area scale graph (ASG) of a rectangular part of a field.
The calculated ASG has the natural number of points, i.e. width
-1.
The ASG represents the apparent area excess (ratio of surface and projected area minus one) observed at given
length scale. The quantity calculated by this function serves a similar purpose as ASME B46.1 area scale graph but
is defined differently, based on the HHCF. See gwy_data_field_area_row_hhcf()
for details of its calculation.
Only level
values 0 (no levelling) and 1 (subtract the mean value) used to be available. There is no difference
between them for HHCF. Since 2.56 you can also pass 2 for mean line subtraction.
field |
A two-dimensional data field. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
level |
The first polynomial degree to keep in the rows, lower degrees than |
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.
data_field |
A data field. |
|
target_field |
A data field to store the result to. It will be resampled to (2 |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
xrange |
Horizontal correlation range. Non-positive value means the default range of half of |
|
yrange |
Vertical correlation range. Non-positive value means the default range of half of |
Since: 2.7
void gwy_data_field_area_2dacf_mask (GwyDataField *data_field
,GwyDataField *target_field
,GwyDataField *mask
,GwyMaskingType masking
,gint col
,gint row
,gint width
,gint height
,gint xrange
,gint yrange
,GwyDataField *weights
);
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.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
target_field |
A data field to store the result to. It will be resampled to (2 |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
xrange |
Horizontal correlation range. Non-positive value means the default range of half of |
|
yrange |
Vertical correlation range. Non-positive value means the default range of half of |
|
weights |
Field to store the denominators to (or |
Since: 2.50
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.
Since: 2.7
void gwy_data_field_area_2dpsdf_mask (GwyDataField *field
,GwyDataField *target_field
,GwyDataField *mask
,GwyMaskingType masking
,gint col
,gint row
,gint width
,gint height
,GwyWindowingType windowing
,gint level
);
Calculates two-dimensional power spectrum density function of a data field area.
The resulting data field has the spectrum density corresponding zero frequency (0,0) in the centre.
Only level
values 0 (no levelling) and 1 (subtract the mean value) used to be available. For SPM data, you usually
wish to pass 1. Since 2.56 you can also pass 2 for mean plane subtraction.
The reduction of the total energy by windowing is compensated by multiplying the PSDF to make its sum of squares equal to the input data sum of squares.
Do not assume the PSDF values are all positive, when masking is in effect. The PSDF should still have the correct integral, but it will be contaminated with noise, both positive and negative.
field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
windowing |
Windowing type to use. |
|
level |
The first polynomial degree to keep in the area; lower degrees than |
|
target_field |
A data field to store the result to. It will be resampled to |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
Since: 2.51
void gwy_data_field_2dpsdf (GwyDataField *field
,GwyDataField *target_field
,GwyWindowingType windowing
,gint level
);
Calculates two-dimensional power spectrum density function of a data field.
See gwy_data_field_area_2dpsdf_mask()
for details and discussion.
field |
A data field. |
|
windowing |
Windowing type to use. |
|
level |
The first polynomial degree to keep in the area; lower degrees than |
|
target_field |
A data field to store the result to. It will be resampled to the same size as |
Since: 2.51
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 rectangular part of a data field.
data_field |
A data field. |
|
target_line |
A data line to store the autocorrelation function to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
nstats |
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
);
Calculates radially averaged autocorrelation function of a data field.
data_field |
A data field. |
|
target_line |
A data line to store the autocorrelation function to. It will be resampled to requested width. |
|
nstats |
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_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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
nstats |
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.
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
nstats |
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.
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to requested width. |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
nstats |
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.
gdouble gwy_data_field_area_get_dispersion (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType masking
,gint col
,gint row
,gint width
,gint height
,gdouble *xcenter
,gdouble *ycenter
);
Calculates the dispersion of a data field area, taking it as a distribution.
The function takes data_field
as a distribution, finds the centre of mass
in the area and then calculates the mean squared distance from this centre,
weighted by data_field
values. Normally data_field
should contain only
non-negative data.
The dispersion is measured in real coordinates, so horizontal and vertical
pixel sizes play a role and the units are squared lateral units of
data_field
. Note, however, that xcenter
and ycenter
is returned in pixel
coordinates since it is usually more convenient.
data_field |
A data field. |
|
mask |
Mask specifying which values to take into account/exclude, or |
|
masking |
Masking mode to use (has any effect only with non- |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
xcenter |
Location where to store the horizontal position of centre of mass
(in pixel coordinates), or |
|
ycenter |
Location where to store the vertical position of centre of mass
(in pixel coordinates), or |
Since: 2.52
gdouble gwy_data_field_get_dispersion (GwyDataField *data_field
,gdouble *xcenter
,gdouble *ycenter
);
Calculates the dispersion of a data field, taking it as a distribution.
See gwy_data_field_area_get_dispersion()
for discussion.
Since: 2.52
void gwy_data_field_slope_distribution (GwyDataField *data_field
,GwyDataLine *derdist
,gint kernel_size
);
Computes angular slope distribution.
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 |
|
ny |
Where y-component of average normal vector should be stored, or |
|
nz |
Where z-component of average normal vector should be stored, or |
|
normalize1 |
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.
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 |
|
ny |
Where y-component of average normal vector should be stored, or |
|
nz |
Where z-component of average normal vector should be stored, or |
|
normalize1 |
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).
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.
Use gwy_data_field_get_line_stats_mask()
for full masking type options.
data_field |
A data field. |
|
mask |
Mask of values to take values into account, or |
|
target_line |
A data line to store the distribution to. It will be resampled to the number of rows (columns). |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
quantity |
The line quantity to calulate for each row (column). |
|
orientation |
Line orientation. For |
Since: 2.2
void gwy_data_field_get_line_stats_mask (GwyDataField *data_field
,GwyDataField *mask
,GwyMaskingType masking
,GwyDataLine *target_line
,GwyDataLine *weights
,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.
data_field |
A data field. |
|
mask |
Mask of values to take values into account, or |
|
masking |
Masking mode to use. See the introduction for description of masking modes. |
|
target_line |
A data line to store the distribution to. It will be resampled to the number of rows (columns). |
|
weights |
A data line to store number of data points contributing to each
value in |
|
col |
Upper-left column coordinate. |
|
row |
Upper-left row coordinate. |
|
width |
Area width (number of columns). |
|
height |
Area height (number of rows). |
|
quantity |
The line quantity to calulate for each row (column). |
|
orientation |
Line orientation. For |
Since: 2.46
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.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be
resampled to |
|
quantity |
The line quantity to calulate for each row (column). |
|
orientation |
Line orientation. See |
Since: 2.2
guint
gwy_data_field_count_maxima (GwyDataField *data_field
);
Counts the number of regional maxima in a data field.
See gwy_data_field_mark_extrema()
for the definition of a regional maximum.
Since: 2.38
guint
gwy_data_field_count_minima (GwyDataField *data_field
);
Counts the number of regional minima in a data field.
See gwy_data_field_mark_extrema()
for the definition of a regional minimum.
Since: 2.38
GwyDataLine * gwy_data_field_psdf_to_angular_spectrum (GwyDataField *psdf
,gint nstats
);
Transforms 2D power spectral density to an angular spectrum.
psdf |
A data field containing 2D spectral density, humanized (i.e. with zero frequency in the centre). |
|
nstats |
The number of samples to take on the distribution function. If nonpositive, a suitable number is chosen automatically. |
Since: 2.56
void gwy_data_field_angular_average (GwyDataField *data_field
,GwyDataLine *target_line
,GwyDataField *mask
,GwyMaskingType masking
,gdouble x
,gdouble y
,gdouble r
,gint nstats
);
Performs angular averaging of a part of a data field.
The result of such averaging is an radial profile, starting from the disc centre.
The function does not guarantee that target_line
will have exactly nstats
samples upon return. A smaller number
of samples than requested may be calculated for instance if either central or outer part of the disc is excluded by
masking.
data_field |
A data field. |
|
target_line |
A data line to store the distribution to. It will be resampled to |
|
mask |
Mask of pixels to include from/exclude in the averaging, or |
|
masking |
Masking mode to use. See the introduction for description of masking modes. |
|
x |
X-coordinate of the averaging disc origin, in real coordinates including offsets. |
|
y |
Y-coordinate of the averaging disc origin, in real coordinates including offsets. |
|
r |
Radius, in real coordinates. It determines the real length of the resulting line. |
|
nstats |
The number of samples the resulting line should have. A non-positive value means the sampling will be determined automatically. |
Since: 2.42