gwyprocessenums — Common enumerations
const GwyEnum * | gwy_merge_type_get_enum () |
const GwyEnum * | gwy_masking_type_get_enum () |
const GwyEnum * | gwy_plane_symmetry_get_enum () |
const GwyEnum * | gwy_2d_cwt_wavelet_type_get_enum () |
const GwyEnum * | gwy_orientation_get_enum () |
const GwyEnum * | gwy_dwt_type_get_enum () |
const GwyEnum * | gwy_dwt_denoise_type_get_enum () |
const GwyEnum * | gwy_interpolation_type_get_enum () |
const GwyEnum * | gwy_windowing_type_get_enum () |
const GwyEnum * | gwy_correlation_type_get_enum () |
const GwyEnum * | gwy_distance_transform_type_get_enum () |
gint | gwy_computation_state_get_state () |
gdouble | gwy_computation_state_get_fraction () |
enum | GwyMergeType |
enum | GwyMaskingType |
enum | GwyWatershedStateType |
enum | GwyPlaneSymmetry |
enum | Gwy2DCWTWaveletType |
enum | GwyOrientation |
enum | GwyTransformDirection |
enum | GwyDataFieldCached |
enum | GwyComputationStateType |
enum | GwyDWTType |
enum | GwyDWTDenoiseType |
enum | GwyInterpolationType |
enum | GwyPlaneFitQuantity |
enum | GwyWindowingType |
enum | GwyTipType |
enum | GwyTipParamType |
enum | GwyCorrelationType |
enum | GwyCorrSearchType |
enum | GwyGrainQuantity |
enum | GwyDataCompatibilityFlags |
enum | GwyLineStatQuantity |
enum | GwyExteriorType |
enum | GwyDistanceTransformType |
enum | GwyMinMaxFilterType |
enum | GwyRotateResizeType |
enum | GwyAffineScalingType |
enum | GwyBrickTransposeType |
GwyComputationState |
gpointer ╰── GwyComputationState
#include <libprocess/gwyprocess.h>
const GwyEnum *
gwy_merge_type_get_enum (void
);
Returns GwyEnum for GwyMergeType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_masking_type_get_enum (void
);
Returns GwyEnum for GwyMaskingType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
Since: 2.18
const GwyEnum *
gwy_plane_symmetry_get_enum (void
);
Returns GwyEnum for GwyPlaneSymmetry enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_2d_cwt_wavelet_type_get_enum (void
);
Returns GwyEnum for Gwy2DCWTWaveletType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_orientation_get_enum (void
);
Returns GwyEnum for GwyOrientation enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_dwt_type_get_enum (void
);
Returns GwyEnum for GwyDWTType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_dwt_denoise_type_get_enum (void
);
Returns GwyEnum for GwyDWTDenoiseType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_interpolation_type_get_enum (void
);
Returns GwyEnum for GwyInterpolationType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_windowing_type_get_enum (void
);
Returns GwyEnum for GwyWindowingType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_correlation_type_get_enum (void
);
Returns GwyEnum for GwyCorrelationType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
const GwyEnum *
gwy_distance_transform_type_get_enum (void
);
Returns GwyEnum for GwyDistanceTransformType enum type.
NULL
-terminated GwyEnum which must not be modified nor freed.
Since: 2.43
gint
gwy_computation_state_get_state (GwyComputationState *compstate
);
Gets the state field of a computation state struct.
Useful mostly for language bindings.
compstate |
Computation state. |
The state field of compstate
.
Since: 2.49
gdouble
gwy_computation_state_get_fraction (GwyComputationState *compstate
);
Gets the fraction field of a computation state struct.
compstate |
Computation state. |
The fraction field of compstate
.
Since: 2.49
Mask merge type (namely used in grain processing).
Union (logical or) merging. |
||
Intersection (logical and) merging. |
Mask handling in procedures that can apply masking.
Note at present many procedures do not have a masking argument and hence cannot apply masks in exclude mode.
Exclude data under mask, i.e. take into account only data not covered by the mask. |
||
Take into account only data under the mask. |
||
Ignore mask, if present, and use all data. |
Since: 2.12
Plane symmetry types for rotation correction.
Automatic symmetry selection. |
||
Parallel symmetry, there is one prevalent direction (bilateral). |
||
Triangular symmetry, there are three prevalent directions (unilateral) by 120 degrees. |
||
Square symmetry, two prevalent directions (bilateral) oriented approximately along image sides. |
||
Rhombic symmetry, two prevalent directions (bilateral) oriented approximately along diagonals. |
||
Hexagonal symmetry, three prevalent directions (bilateral) by 120 degrees. |
||
The number of symmetries. |
Orientation type.
Horizontal orientation. |
||
Vertical orientation. |
Transform (namely integral transform) direction.
In FFT, it is equal to sign of the exponent, that is the backward transform uses -1, the forward transform +1. This is the opposite sign convention to FFTW (for instance), so care must be taken when mixing operations.
Backward (inverse) transform. |
||
Forward (direct) transform. |
Cached data field quantity type.
There should be little need to this enum directly except in libgwyprocess methods.
Overall minimum. |
||
Overall maximum. |
||
Sum of all values. |
||
Root mean square. |
||
Median. |
||
Auto-range from. |
||
Auto-range to. |
||
Surface area. |
||
Variation. |
||
Entropy. |
||
Mean square. |
||
The size of statistics cache. |
Common iterative computation iterator state type.
Iterator was set up, the next step will actually create temporary data structures and precalculate values. |
||
Iteration is in progress, the |
||
Calculation has been finished, further calls to the iterator will be no-op. |
Interpolation types.
No interpolation at all, resulting values are not defined, it must not be used for interpolation. It can be used in resize operations discarding original data. |
||
Round interpolation (more precisely symmetric nearest neighbour interpolation). |
||
Linear interpolation. |
||
Old name for |
||
Cubic Key's interpolation (with a=-1/2). |
||
B-spline interpolation. |
||
Omoms interpolation. |
||
Nearest neighbour approximation. |
||
Cubic Schaum interpolation. |
Local plane fitting quantity to request from gwy_data_field_area_fit_local_planes()
and similar functions.
Constant coefficient (mean value). |
||
Linear coefficient in |
||
Linear coefficient in |
||
Slope orientation in (x,y) plane (in radians). |
||
Absolute slope value (that is sqrt(bx*bx + by*by)). |
||
Residual sum of squares. |
||
Slope-reduced residual sum of squares. |
Frequency windowing type.
No windowing is applied. |
||
Hann window. |
||
Hamming window. |
||
Blackmann window. |
||
Lanczos window. |
||
Welch window. |
||
Rectangular window. |
||
Nuttall window (Since 2.7). |
||
Flat-top window (Since 2.7). |
||
Kaiser window with β=2.5 (Since 2.7). |
Type of tip shape presets.
N-sided pyramidal tip. |
||
Legacy name for |
||
Four-sided pyramidal tip. |
||
Three-sided pyramidal tip. |
||
Delta function (single-pixel tip). |
||
Parabolic tip. (Since 2.45) |
||
Conical tip. (Since 2.45) |
||
Elliptical parabola tip. (Since 2.47) |
||
Spherical tip at the end of almost-cyliner. (Since 2.50) |
Type of tip model preset parameter.
This enum is used with the new tip preset functions gwy_tip_model_get_preset_params()
,
gwy_tip_model_preset_create()
, gwy_tip_model_preset_create_for_zrange()
.
Total tip height. This is used only in the delta function tip; for all others it is implied. |
||
Radius of curvature of the tip apex. |
||
Rotation angle. |
||
Number of sides for pyramidal tips. |
||
Half-angle of the apex (complement of the side slope for straight sides). |
||
Ratio between larger and smaller tip width in two orthotonal directions. |
Since: 2.47
Type of correlation search output.
Raw average of data values multiplied by kernel values. |
||
Local mean value is subtracted from data before kernel multiplication. |
||
In addition, result is normalised by dividing by the local variance. |
||
Raw mean square difference between data and kernel values. |
||
Mean values of data and kernel are adjusted before summing the squared differences. |
||
In addition, result is normalised by dividing by the local variance. |
||
Score from phase-only correlation (since 2.63). |
Since: 2.50
Grain quantity to request from gwy_data_field_grains_get_distribution()
and similar functions.
Projected (flat) grain area. |
||
Side of a square with the same area as the grain. |
||
Radius of a disc with the same area as the grain. |
||
Surface area. |
||
Minimum value. |
||
Maximum value. |
||
Mean value. |
||
Median value. |
||
Flat grain area measured in pixels. This value is redundant but it is useful for filtering (Since 2.37). |
||
Projected area of the part of grain that is above the half-height, i.e. the height between the minimum and maximum (Since 2.8). |
||
Length of projected grain boundary. Note for grains not topologically equivalent to disc, only the length of the outer boundary is calculated. |
||
Standard deviation of grain values. (Since 2.51) |
||
Minimum lateral bounding size, in other words the minimum length of grain projection to any line in the horizontal plane. |
||
Direction of the minimum lateral bounding size (arbitrary one if the minimum is not unique). |
||
Maximum lateral bounding size, in other words the maximum length of grain projection to any line in the horizontal plane. |
||
Direction of the maximum lateral bounding size (arbitrary one if the maximum is not unique). |
||
Grain centre horizontal position, i.e. the mean value of its physical x-coordinates. (Since 2.7) |
||
Grain centre vertical position, i.e. the mean value of its physical y-coordinates. (Since 2.7) |
||
Grain volume calculated with grain basis at |
||
Grain volume calculated with grain basis at grain minimum value. This value is a lower bound. (Since 2.3) |
||
Grain volume calculated with grain basis calculated by laplacian interpolation of surrounding values. (Since 2.3) |
||
Spherical angle theta of grain normal (0 is upwards). (Since 2.7) |
||
Spherical angle phi of grain normal (0 is in positive x direction). (Since 2.7) |
||
Maximum value in the grain inner boundary. (Since 2.12) |
||
Minimum value on the grain inner boundary. (Since 2.12) |
||
Grain curvature centre horizontal position. For too small or flat grains it reduces to the horizontal position of geometrical centre. (Since 2.22) |
||
Grain curvature centre vertical position. For too small or flat grains it reduces to the vertical position of geometrical centre. (Since 2.22) |
||
The value at curvature centre. Note this is the value in the origin of the fitted quadratic surface, not at the real surface. (Since 2.22) |
||
Smaller grain curvature. (Since 2.22) |
||
Larger grain curvature. (Since 2.22) |
||
Direction of the smaller grain curvature radius. If the grain is flat or too small the angle is reported as 0. (Since 2.22) |
||
Direction of the larger grain curvature radius. If the grain is flat or too small the angle is reported as π/2. (Since 2.22) |
||
Radius of maximum disc that fits inside the grain (Since 2.30) |
||
Real X-coordinate of the centre of the maximum inscribed disc. (Since 2.30) |
||
Real Y-coordinate of the centre of the maximum inscribed disc. (Since 2.30) |
||
Projected (flat) area of grain convex hull. (Since 2.30) |
||
Radius of minimum circle containing the grain. (Since 2.30) |
||
Real X-coordinate of the centre of the minimum circumcircle. (Since 2.30) |
||
Real Y-coordinate of the centre of the minimum circumcircle. (Since 2.30) |
||
Mean distance from boundary to the grain centre as defined by
|
||
Length of major semiaxis of equivalent ellipse. (Since 2.36) |
||
Length of minor semiaxis of equivalent ellipse. (Since 2.36) |
||
Orientation of the major axis of equivalent ellipse. (Since 2.36) |
||
Minimum value of Martin diameter. (Since 2.50) |
||
Direction corresponding to minimum Martin diameter. (Since 2.50) |
||
Maximum value of Martin diameter. (Since 2.50) |
||
Direction corresponding to maximum Martin diameter. (Since 2.50) |
Data line, field, brick and lawn compatibility flags.
It is not recommended to pass GWY_DATA_COMPATIBILITY_ALL
to checking functions since not all flags are meaningful
for all data objects (even though meaningless flags are generally silently ignored).
Pixel sizes. |
||
Real (physical) dimensions. |
||
Real to pixel ratios. |
||
Units of lateral dimensions. |
||
Units of values (for all curves in the case of lawns). |
||
Axis calibrations. At present it only makes sense for GwyBrick which can have Z-calibrations. (Since 2.51) |
||
Number of lawn curves. (Since 2.60) |
||
Lengths of curves in all lawn pixels. (Since 2.60) |
||
Mask of all defined flags. |
Line statistical quantities to be requested with gwy_data_field_area_get_line_stats()
.
Mean value. |
||
Median. |
||
Minimum value. |
||
Maximum value. |
||
Root mean square of deviations from the mean value. |
||
Line length. |
||
Overall line slope. |
||
Root mean square slope. |
||
Arithmetic mean surface roughness. |
||
Maximum height of the roughness profile. |
||
Total height of the roughness profile. |
||
Line skew. |
||
Line excess kurtosis (which is 0 for a Gaussaian distrubution, not 3). |
||
Difference between maximum and minimum value (Since 2.42). |
||
Variation (integral of absolute value) (Since 2.42). |
||
Minimum position along the line (Since 2.48). |
||
Maximum position along the line (Since 2.48). |
Since: 2.2
Methods to handle pixels outside data.
Many methods currently use a fixed metod of handling of exterior pixels, for example area calculation uses extension (border and mirror coincide), convolution uses mirror extension, rotation fills exterior with a fixed value.
The values corresponding to or calculated from exterior data values are undefined, they may be left unset or set to bogus values. The caller must handle them itself afterwards, for instance by resizing the result to consist of valid data only. |
||
Values of exterior pixels are considered to be equal to the values of the nearest interior pixels. |
||
The data is considered to be periodically repeated, with odd instances reflected (the total period is thus twice the size of the data). |
||
The data is considered to be periodically repeated. |
||
Values of exterior pixels are considered to be all equal to a user-specified value. |
||
Values of exterior pixels are extended using Laplace interpolation (actually extrapolation)
like |
Since: 2.2
Type of distance transform.
City-block distance (sum of horizontal and vertical distances). |
||
Four-connectivity distance; another name for city-block distance. |
||
Chessboard distance (maximum of horizontal and vertical distance). |
||
Eight-connectivity distance; another name for chessboard distance. |
||
Octagonal distance beginning from city-block. |
||
Octagonal distance beginning from chess. |
||
Average octagonal distance, i.e. the mean of the 48 and 84 distances (Since 2.43). |
||
True Euclidean distance (Since 2.43). |
Since: 2.41
Type of operation based on morphological filters with flat structuring elements.
Minimum filter, i.e. minimum of the surrounding values. |
||
Another name for the minimum filter. |
||
Maximum filter, i.e. maximum of the surrounding values. |
||
Another name for the maximum filter. |
||
Morphological opening filter. |
||
Morphological closing filter. |
||
Difference between maximum and minimum. |
||
Data value rescaled to the range between minimum and maximum. |
Since: 2.43
Type of rotated data field size determination method.
The result has the same area as the original. |
||
The result is sufficiently large so that all original data are present (usually meaning that there will be also lot of exterior). |
||
The result is optimally cut to interior data only. |
Since: 2.46
Type of lattice vector scaling in affine transform preparation.
Correct lattice vectors lengths are taken as given. |
||
Correct lattice vectors are scaled to make the transformation area-preserving. |
||
Correct lattice vectors are scaled to preserve the scale along |
Since: 2.49
Type of volume data transposition.
The enum values names spell which old axis becomes which new axes.
No change (useful with axis flipping). |
||
Axes Z and Y are swapped. |
||
Axes Y and Z are swapped. |
||
Axis X becomes Y, Y becomes Z and Z becomes X. |
||
Axis X becomes Z, Y becomes X and Z becomes Y. |
||
Axes X and Z are swapped. |
Since: 2.51
typedef struct { guint state; gdouble fraction; } GwyComputationState;
State of iterative computation.
Iterators usually append their own private state data, therefore it must not be assumed the public fields state
and fraction
are the only fields.
A typical iteration, assuming an iterative computation `foo' with the default GwyComputationStateType state could be:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
GwyComputationStateType *state; state = gwy_data_field_foo_init(GwyDataField *data_field, ...); do { gwy_data_field_foo_iteration(state); /* Update progress using state->fraction, let Gtk+ main loop run, check for abort, ... */ if (aborted) { gwy_data_field_foo_finalize(state); return FALSE; } } while (state->state != GWY_COMPUTATION_STATE_FINISHED); gwy_data_field_foo_finalize(state); return TRUE; |
Current computation state, usually of GwyComputationStateType, but particular iterators can define their own types. |
||
Fraction of computation completed. For staged algorithms, the fraction refers to the current stage only. |