tip

tip — SPM tip morphological operations

Functions

Includes

#include <libprocess/gwyprocess.h>

Description

Functions

gwy_tip_dilation()

GwyDataField *
gwy_tip_dilation (GwyDataField *tip,
                  GwyDataField *surface,
                  GwyDataField *result,
                  GwySetFractionFunc set_fraction,
                  GwySetMessageFunc set_message);

Performs the tip convolution algorithm published by Villarrubia, which is equivalent to morphological dilation operation.

If the operation is aborted the size and contents of result field is undefined.

Parameters

tip

Tip data.

 

surface

Surface data.

 

result

Data field where to store dilated surface to.

 

set_fraction

Function that sets fraction to output (or NULL).

 

set_message

Function that sets message to output (or NULL).

 

Returns

Dilated surface data, i.e. result , on success. May return NULL if aborted.


gwy_tip_erosion()

GwyDataField *
gwy_tip_erosion (GwyDataField *tip,
                 GwyDataField *surface,
                 GwyDataField *result,
                 GwySetFractionFunc set_fraction,
                 GwySetMessageFunc set_message);

Performs surface reconstruction (erosion) algorithm published by Villarrubia, which is equivalent to morphological erosion operation.

If the operation is aborted the size and contents of result field is undefined.

Parameters

tip

Tip data.

 

surface

Surface to be eroded.

 

result

Data field where to store dilated surface to.

 

set_fraction

Function that sets fraction to output (or NULL).

 

set_message

Function that sets message to output (or NULL).

 

Returns

Reconstructed (eroded) surface, i.e. result , on success. May return NULL if aborted.


gwy_tip_cmap()

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.

Parameters

tip

Tip data.

 

surface

Surface data.

 

result

Data field to store ceratainty map data to.

 

set_fraction

Function that sets fraction to output (or NULL).

 

set_message

Function that sets message to output (of NULL).

 

Returns

Certainty map, i.e. result , on success. May return NULL if aborted.


gwy_tip_estimate_partial()

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.

Parameters

tip

Tip data to be refined (allocated).

 

surface

Surface data.

 

threshold

Threshold for noise supression.

 

use_edges

Whether use also edges of image.

 

count

Where to store the number of places that produced refinements to.

 

set_fraction

Function that sets fraction to output (or NULL).

 

set_message

Function that sets message to output (or NULL).

 

Returns

Estimated tip. May return NULL if aborted.


gwy_tip_estimate_full()

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.

Parameters

tip

Tip data to be refined (allocated).

 

surface

Surface data.

 

threshold

Threshold for noise supression.

 

use_edges

Whether use also edges of image.

 

count

Where to store the number of places that produced refinements to.

 

set_fraction

Function that sets fraction to output (or NULL).

 

set_message

Function that sets message to output (or NULL).

 

Returns

Estimated tip. May return NULL if aborted.