Name
create_distance_transform_xldcreate_distance_transform_xldCreateDistanceTransformXldCreateDistanceTransformXld — Create the XLD distance transform.
void CreateDistanceTransformXld(const HObject& Contour, const HTuple& Mode, const HTuple& MaxDistance, HTuple* DistanceTransformID)
void HXLDDistTrans::HXLDDistTrans(const HXLDCont& Contour, const HString& Mode, const HTuple& MaxDistance)
void HXLDDistTrans::HXLDDistTrans(const HXLDCont& Contour, const HString& Mode, double MaxDistance)
void HXLDDistTrans::HXLDDistTrans(const HXLDCont& Contour, const char* Mode, double MaxDistance)
void HXLDDistTrans::CreateDistanceTransformXld(const HXLDCont& Contour, const HString& Mode, const HTuple& MaxDistance)
void HXLDDistTrans::CreateDistanceTransformXld(const HXLDCont& Contour, const HString& Mode, double MaxDistance)
void HXLDDistTrans::CreateDistanceTransformXld(const HXLDCont& Contour, const char* Mode, double MaxDistance)
static void HOperatorSet.CreateDistanceTransformXld(HObject contour, HTuple mode, HTuple maxDistance, out HTuple distanceTransformID)
public HXLDDistTrans(HXLDCont contour, string mode, HTuple maxDistance)
public HXLDDistTrans(HXLDCont contour, string mode, double maxDistance)
void HXLDDistTrans.CreateDistanceTransformXld(HXLDCont contour, string mode, HTuple maxDistance)
void HXLDDistTrans.CreateDistanceTransformXld(HXLDCont contour, string mode, double maxDistance)
create_distance_transform_xldcreate_distance_transform_xldCreateDistanceTransformXldCreateDistanceTransformXldCreateDistanceTransformXld creates the XLD distance transform
of the reference contour ContourContourContourContourcontour and returns the resulting handle
in DistanceTransformIDDistanceTransformIDDistanceTransformIDDistanceTransformIDdistanceTransformID.
Once the XLD distance transform has been created, the operator
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld calculates pointwise distances
from test contours to the reference contour ContourContourContourContourcontour. More
precisely, for each point of a test contour its minimal distance to the
contours in ContourContourContourContourcontour is calculated.
The parameter ModeModeModeModemode determines which distances
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld calculates:
'point_to_point'"point_to_point""point_to_point""point_to_point""point_to_point" calculates the minimum distance to the base
points of the ContourContourContourContourcontour.
In contrast, 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment" calculates the minimum
distance to the contour segments in ContourContourContourContourcontour (see the figure
below).
The parameter MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance specifies a maximum distance from the
reference contour ContourContourContourContourcontour which is of interest to the caller.
If the distance from a point of a test contour to the reference contour
exceeds MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance, the output distance of
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld is set to MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance.
The operators create_distance_transform_xldcreate_distance_transform_xldCreateDistanceTransformXldCreateDistanceTransformXldCreateDistanceTransformXld and
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld are an alternative to
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld, if the reference contour is repeatedly used.
create_distance_transform_xldcreate_distance_transform_xldCreateDistanceTransformXldCreateDistanceTransformXldCreateDistanceTransformXld stores for each pixel in a relevant
area around ContourContourContourContourcontour its nearest points or segments (depending on
ModeModeModeModemode) of the reference contour ContourContourContourContourcontour. This allows
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld to calculate the distances rather fast,
nearly independent of the number of points or segments of the reference
contour, the ModeModeModeModemode and the position of the points of the test contour.
However, the preparation of the XLD distance transform can take several
seconds or minutes, depending on the number of points or segments of the
reference contour and the relevant area around ContourContourContourContourcontour which can
be influenced by MaxDistanceMaxDistanceMaxDistanceMaxDistancemaxDistance. Furthermore,
create_distance_transform_xldcreate_distance_transform_xldCreateDistanceTransformXldCreateDistanceTransformXldCreateDistanceTransformXld is faster, if ModeModeModeModemode is set to
'point_to_point'.
get_distance_transform_xld_contourget_distance_transform_xld_contourGetDistanceTransformXldContourGetDistanceTransformXldContourGetDistanceTransformXldContour and
get_distance_transform_xld_paramget_distance_transform_xld_paramGetDistanceTransformXldParamGetDistanceTransformXldParamGetDistanceTransformXldParam can be used to get back the
reference contours and the parameters of the XLD distance
transform DistanceTransformIDDistanceTransformIDDistanceTransformIDDistanceTransformIDdistanceTransformID.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.
Compute the distance to points ('point_to_point')
or entire segments ('point_to_segment').
Default value:
'point_to_point'
"point_to_point"
"point_to_point"
"point_to_point"
"point_to_point"
List of values: 'point_to_point'"point_to_point""point_to_point""point_to_point""point_to_point", 'point_to_segment'"point_to_segment""point_to_segment""point_to_segment""point_to_segment"
Maximum distance of interest.
Default value: 20.0
Handle of the XLD distance transform.
If all parameters are correct, the operator returns the
value 2 (H_MSG_TRUE). Otherwise, an exception is raised.
apply_distance_transform_xldapply_distance_transform_xldApplyDistanceTransformXldApplyDistanceTransformXldApplyDistanceTransformXld,
write_distance_transform_xldwrite_distance_transform_xldWriteDistanceTransformXldWriteDistanceTransformXldWriteDistanceTransformXld,
serialize_distance_transform_xldserialize_distance_transform_xldSerializeDistanceTransformXldSerializeDistanceTransformXldSerializeDistanceTransformXld,
clear_distance_transform_xldclear_distance_transform_xldClearDistanceTransformXldClearDistanceTransformXldClearDistanceTransformXld
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXldDistanceContoursXld,
get_distance_transform_xld_contourget_distance_transform_xld_contourGetDistanceTransformXldContourGetDistanceTransformXldContourGetDistanceTransformXldContour,
read_distance_transform_xldread_distance_transform_xldReadDistanceTransformXldReadDistanceTransformXldReadDistanceTransformXld,
deserialize_distance_transform_xlddeserialize_distance_transform_xldDeserializeDistanceTransformXldDeserializeDistanceTransformXldDeserializeDistanceTransformXld,
get_distance_transform_xld_paramget_distance_transform_xld_paramGetDistanceTransformXldParamGetDistanceTransformXldParamGetDistanceTransformXldParam,
set_distance_transform_xld_paramset_distance_transform_xld_paramSetDistanceTransformXldParamSetDistanceTransformXldParamSetDistanceTransformXldParam
Foundation