| Top |
| const GwyEnum * | gwy_distance_transform_type_get_enum () |
| void | gwy_nield_distance_transform () |
| void | gwy_nield_shrink () |
| void | gwy_nield_grow () |
| void | gwy_nield_thin () |
const GwyEnum *
gwy_distance_transform_type_get_enum (void);
Returns GwyEnum for GwyDistanceTransformType enum type.
void gwy_nield_distance_transform (GwyNield *nield,GwyField *distances,GwyDistanceTransformType dtype,gboolean from_border);
void gwy_nield_shrink (GwyNield *nield,gdouble amount,GwyDistanceTransformType dtype,gboolean from_border);
Erodes a number field containing mask by specified amount using a distance measure.
Non-zero pixels in nield
will be replaced with zeros if they are not farther than amount
from the grain
boundary as defined by dtype
.
nield |
A number field with zeros in empty space and nonzeros in grains. |
|
amount |
How much the grains should be reduced, in pixels. It is inclusive, i.e. pixels that are |
|
dtype |
Type of simple distance to use. |
|
from_border |
|
void gwy_nield_grow (GwyNield *nield,gdouble amount,GwyDistanceTransformType dtype,gboolean prevent_merging);
Dilates a number field containing mask by specified amount using a distance measure.
Non-positive pixels in field
will be replaced with ones if they are not farther than amount
from the grain
boundary as defined by dtype
.
nield |
A number field with zeros in empty space and nonzeros in grains. |
|
amount |
How much the grains should be expanded, in pixels. It is inclusive, i.e. exterior pixels that are |
|
dtype |
Type of simple distance to use. |
|
prevent_merging |
|
void
gwy_nield_thin (GwyNield *nield);
Performs thinning of a data field containing mask.
The result of thinning is a ‘skeleton’ mask consisting of single-pixel thin lines.
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. |
||
|
True Euclidean distance. |