Skip to content

distance_pcDistancePcDistancePcdistance_pcdistance_pc🔗

Short description🔗

distance_pcDistancePcDistancePcdistance_pcdistance_pc — Calculate the distance between a point and one contour.

Signature🔗

distance_pc( xld_cont Contour, point.y Row, point.x Column, out real DistanceMin, out real DistanceMax )void DistancePc( const HObject& Contour, const HTuple& Row, const HTuple& Column, HTuple* DistanceMin, HTuple* DistanceMax )static void HOperatorSet.DistancePc( HObject contour, HTuple row, HTuple column, out HTuple distanceMin, out HTuple 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]Herror distance_pc( const Hobject Contour, double Row, double Column, double* DistanceMin, double* DistanceMax )

Herror T_distance_pc( 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

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 )

Description🔗

The operator distance_pcDistancePc calculates the distance between one or several points and a single contour. As input the coordinates of the points (Rowrowrow,Columncolumncolumn) and the contour (Contourcontourcontour) are expected. The parameters DistanceMindistanceMindistance_min and DistanceMaxdistanceMaxdistance_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_xldDistanceContoursXld).

Execution information🔗

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🔗

Contourcontourcontour (input_object) xld_cont → objectHObjectHXLDContHObjectHobject

Input contour.

Rowrowrow (input_control) point.y(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Row coordinate of the point.

Columncolumncolumn (input_control) point.x(-array) → (real / integer)HTuple (double / Hlong)HTuple (double / int / long)MaybeSequence[Union[float, int]]Htuple (double / Hlong)

Column coordinate of the point.

DistanceMindistanceMindistance_min (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Minimum distance between the point and the contour.

DistanceMaxdistanceMaxdistance_max (output_control) real(-array) → (real)HTuple (double)HTuple (double)Sequence[float]Htuple (double)

Maximum distance between the point and the contour.

Result🔗

distance_pcDistancePc returns 2 (H_MSG_TRUE).

Combinations with other operators🔗

Combinations

Alternatives

distance_lcDistanceLc, distance_scDistanceSc, distance_ccDistanceCc, distance_cc_minDistanceCcMin

See also

distance_prDistancePr, distance_lrDistanceLr, distance_srDistanceSr, hamming_distanceHammingDistance, select_xld_pointSelectXldPoint, test_xld_pointTestXldPoint

Module🔗

Foundation