distance_pcdistance_pcDistancePcDistancePcdistance_pc (Operator)
distance_pcdistance_pcDistancePcDistancePcdistance_pc
— Calculate the distance between a point and one contour.
Signature
void DistancePc(const HObject& Contour, const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax)
void HXLDCont::DistancePc(const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax) const
void HXLDCont::DistancePc(double Row, double Column, double* DistanceMin, double* DistanceMax) const
static void HOperatorSet.DistancePc(HObject contour, HTuple row, HTuple column, out HTuple distanceMin, out HTuple distanceMax)
void HXLDCont.DistancePc(HTuple row, HTuple column, out HTuple distanceMin, out HTuple distanceMax)
void HXLDCont.DistancePc(double row, double column, out double distanceMin, out double distanceMax)
def distance_pc(contour: HObject, row: MaybeSequence[Union[float, int]], column: MaybeSequence[Union[float, int]]) -> Tuple[Sequence[float], Sequence[float]]
def distance_pc_s(contour: HObject, row: MaybeSequence[Union[float, int]], column: MaybeSequence[Union[float, int]]) -> Tuple[float, float]
Description
The operator distance_pcdistance_pcDistancePcDistancePcdistance_pc
calculates the distance between one or
several points and a single contour. As input the coordinates of the points
(RowRowRowrowrow
,ColumnColumnColumncolumncolumn
) and the contour (ContourContourContourcontourcontour
) are
expected. The parameters DistanceMinDistanceMinDistanceMindistanceMindistance_min
and DistanceMaxDistanceMaxDistanceMaxdistanceMaxdistance_max
return the result of the calculation. Note that the result corresponds to the
distances between the points and the segments of the contour and not the
distances between the points and the base points of the contour (see also
distance_contours_xlddistance_contours_xldDistanceContoursXldDistanceContoursXlddistance_contours_xld
).
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on internal data level.
Parameters
ContourContourContourcontourcontour
(input_object) xld_cont →
objectHXLDContHObjectHObjectHobject
Input contour.
RowRowRowrowrow
(input_control) point.y(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Row coordinate of the point.
ColumnColumnColumncolumncolumn
(input_control) point.x(-array) →
HTupleMaybeSequence[Union[float, int]]HTupleHtuple (real / integer) (double / int / long) (double / Hlong) (double / Hlong)
Column coordinate of the point.
DistanceMinDistanceMinDistanceMindistanceMindistance_min
(output_control) real(-array) →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Minimum distance between the point and the contour.
DistanceMaxDistanceMaxDistanceMaxdistanceMaxdistance_max
(output_control) real(-array) →
HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)
Maximum distance between the point and the contour.
Result
distance_pcdistance_pcDistancePcDistancePcdistance_pc
returns 2 (
H_MSG_TRUE)
.
Alternatives
distance_lcdistance_lcDistanceLcDistanceLcdistance_lc
,
distance_scdistance_scDistanceScDistanceScdistance_sc
,
distance_ccdistance_ccDistanceCcDistanceCcdistance_cc
,
distance_cc_mindistance_cc_minDistanceCcMinDistanceCcMindistance_cc_min
See also
distance_prdistance_prDistancePrDistancePrdistance_pr
,
distance_lrdistance_lrDistanceLrDistanceLrdistance_lr
,
distance_srdistance_srDistanceSrDistanceSrdistance_sr
,
hamming_distancehamming_distanceHammingDistanceHammingDistancehamming_distance
,
select_xld_pointselect_xld_pointSelectXldPointSelectXldPointselect_xld_point
,
test_xld_pointtest_xld_pointTestXldPointTestXldPointtest_xld_point
Module
Foundation