![]() |
![]() |
Gwyddion Data Processing Library Reference Manual | ![]() |
|
---|---|---|---|---|
Top | Description |
#include <libprocess/gwyprocess.h> gboolean (*GwySetFractionFunc) (gdouble fraction
); gboolean (*GwySetMessageFunc) (const gchar *message
); void (*GwyTipModelFunc) (GwyDataField *tip
,gdouble height
,gdouble radius
,gdouble rotation
,gdouble *params
); void (*GwyTipGuessFunc) (GwyDataField *data
,gdouble height
,gdouble radius
,gdouble *params
,gint *xres
,gint *yres
); struct GwyTipModelPreset; gint gwy_tip_model_get_npresets (void
); const GwyTipModelPreset * gwy_tip_model_get_preset (gint preset_id
); const GwyTipModelPreset * gwy_tip_model_get_preset_by_name (const gchar *name
); gint gwy_tip_model_get_preset_id (const GwyTipModelPreset *preset
); const gchar * gwy_tip_model_get_preset_tip_name (const GwyTipModelPreset *preset
); const gchar * gwy_tip_model_get_preset_group_name (const GwyTipModelPreset *preset
); gint gwy_tip_model_get_preset_nparams (const GwyTipModelPreset *preset
); GwyDataField * gwy_tip_dilation (GwyDataField *tip
,GwyDataField *surface
,GwyDataField *result
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
); GwyDataField * gwy_tip_erosion (GwyDataField *tip
,GwyDataField *surface
,GwyDataField *result
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
); GwyDataField * gwy_tip_cmap (GwyDataField *tip
,GwyDataField *surface
,GwyDataField *result
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
); GwyDataField * gwy_tip_estimate_partial (GwyDataField *tip
,GwyDataField *surface
,gdouble threshold
,gboolean use_edges
,gint *count
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
); GwyDataField * gwy_tip_estimate_full (GwyDataField *tip
,GwyDataField *surface
,gdouble threshold
,gboolean use_edges
,gint *count
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
);
void (*GwyTipModelFunc) (GwyDataField *tip
,gdouble height
,gdouble radius
,gdouble rotation
,gdouble *params
);
void (*GwyTipGuessFunc) (GwyDataField *data
,gdouble height
,gdouble radius
,gdouble *params
,gint *xres
,gint *yres
);
struct GwyTipModelPreset { const gchar *tip_name; const gchar *group_name; GwyTipModelFunc func; GwyTipGuessFunc guess; gint nparams; };
gint gwy_tip_model_get_npresets (void
);
Find number of actual tip model presets.
Returns : |
Number of presets. |
const GwyTipModelPreset * gwy_tip_model_get_preset (gint preset_id
);
Get data related to tip preset.
|
Preset identifier. |
Returns : |
Chosen preset data. |
const GwyTipModelPreset * gwy_tip_model_get_preset_by_name
(const gchar *name
);
Get data related to preset with specified name.
|
Name of tip (e. g. "contact"). |
Returns : |
Chosen preset data. |
gint gwy_tip_model_get_preset_id (const GwyTipModelPreset *preset
);
Get preset identifier within all presets.
|
Tip model preset. |
Returns : |
Preset id. |
const gchar * gwy_tip_model_get_preset_tip_name (const GwyTipModelPreset *preset
);
Get name of the preset (e. g. "contact").
|
Tip model preset. |
Returns : |
Preset name. |
const gchar * gwy_tip_model_get_preset_group_name (const GwyTipModelPreset *preset
);
Get group name of preset (e. g. "analytical".)
|
Tip model preset. |
Returns : |
Preset group name. |
gint gwy_tip_model_get_preset_nparams (const GwyTipModelPreset *preset
);
Get number of tip preset parameters.
|
Tip model preset. |
Returns : |
Number of parameters. |
GwyDataField * gwy_tip_dilation (GwyDataField *tip
,GwyDataField *surface
,GwyDataField *result
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
);
Performs tip convolution (dilation) algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library.
|
Tip data. |
|
Surface data. |
|
Data field where to store dilated surface to. |
|
Function that sets fraction to output (or NULL ). |
|
Function that sets message to output (or NULL ). |
Returns : |
Dilated surface data, i.e. result , on success. May return NULL
if aborted. |
GwyDataField * gwy_tip_erosion (GwyDataField *tip
,GwyDataField *surface
,GwyDataField *result
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
);
Performs surface reconstruction (erosion) algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library.
|
Tip data. |
|
Surface to be eroded. |
|
Data field where to store dilated surface to. |
|
Function that sets fraction to output (or NULL ). |
|
Function that sets message to output (or NULL ). |
Returns : |
Reconstructed (eroded) surface, i.e. result , on success. May
return NULL if aborted. |
GwyDataField * gwy_tip_cmap (GwyDataField *tip
,GwyDataField *surface
,GwyDataField *result
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
);
Performs certainty map algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library. Result certainty map can be used as a mask of points where tip did not directly touch the surface.
GwyDataField * gwy_tip_estimate_partial (GwyDataField *tip
,GwyDataField *surface
,gdouble threshold
,gboolean use_edges
,gint *count
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
);
Performs partial blind estimation algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library. Note that the threshold value must be chosen sufficently high value to supress small fluctulations due to noise (that would lead to very sharp tip) but sufficiently low value to put algorithm at work. A value similar to 1/10000 of surface range can be good. Otherwise we recommend to start with zero threshold and increase it slowly to observe changes and choose right value.
|
Tip data to be refined (allocated). |
|
Surface data. |
|
Threshold for noise supression. |
|
Whether use also edges of image. |
|
Where to store the number of places that produced refinements to. |
|
Function that sets fraction to output (or NULL ). |
|
Function that sets message to output (or NULL ). |
Returns : |
Estimated tip. May return NULL if aborted. |
GwyDataField * gwy_tip_estimate_full (GwyDataField *tip
,GwyDataField *surface
,gdouble threshold
,gboolean use_edges
,gint *count
,GwySetFractionFunc set_fraction
,GwySetMessageFunc set_message
);
Performs full blind estimation algorithm published by Villarrubia. This function converts all fields into form requested by "morph_lib.c" library, that is almost identical with original Villarubia's library. Note that the threshold value must be chosen sufficently high value to supress small fluctulations due to noise (that would lead to very sharp tip) but sufficiently low value to put algorithm at work. A value similar to 1/10000 of surface range can be good. Otherwise we recommend to start with zero threshold and increase it slowly to observe changes and choose right value.
|
Tip data to be refined (allocated). |
|
Surface data. |
|
Threshold for noise supression. |
|
Whether use also edges of image. |
|
Where to store the number of places that produced refinements to. |
|
Function that sets fraction to output (or NULL ). |
|
Function that sets message to output (or NULL ). |
Returns : |
Estimated tip. May return NULL if aborted. |