Skip to content

dist_ellipse_contour_points_xlddist_ellipse_contour_points_xldDistEllipseContourPointsXldDistEllipseContourPointsXlddist_ellipse_contour_points_xldT_dist_ellipse_contour_points_xld🔗

Short description🔗

dist_ellipse_contour_points_xlddist_ellipse_contour_points_xldDistEllipseContourPointsXldDistEllipseContourPointsXlddist_ellipse_contour_points_xldT_dist_ellipse_contour_points_xld — Compute the distances of all contour points to an ellipse.

Signature🔗

dist_ellipse_contour_points_xld( xld_cont Contour, string DistanceMode, integer ClippingEndPoints, ellipse.center.y Row, ellipse.center.x Column, ellipse.angle.rad Phi, ellipse.radius1 Radius1, ellipse.radius2 Radius2, out real Distances )dist_ellipse_contour_points_xld( Contour : : DistanceMode, ClippingEndPoints, Row, Column, Phi, Radius1, Radius2 : Distances )void DistEllipseContourPointsXld( const HObject& Contour, const HTuple& DistanceMode, const HTuple& ClippingEndPoints, const HTuple& Row, const HTuple& Column, const HTuple& Phi, const HTuple& Radius1, const HTuple& Radius2, HTuple* Distances )static void HOperatorSet.DistEllipseContourPointsXld( HObject contour, HTuple distanceMode, HTuple clippingEndPoints, HTuple row, HTuple column, HTuple phi, HTuple radius1, HTuple radius2, out HTuple distances )def dist_ellipse_contour_points_xld( contour: HObject, distance_mode: str, clipping_end_points: int, row: float, column: float, phi: float, radius_1: float, radius_2: float ) -> Sequence[float]

Herror T_dist_ellipse_contour_points_xld( const Hobject Contour, const Htuple DistanceMode, const Htuple ClippingEndPoints, const Htuple Row, const Htuple Column, const Htuple Phi, const Htuple Radius1, const Htuple Radius2, Htuple* Distances )

HTuple HXLDCont::DistEllipseContourPointsXld( const HString& DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2 ) const

HTuple HXLDCont::DistEllipseContourPointsXld( const char* DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2 ) const

HTuple HXLDCont::DistEllipseContourPointsXld( const wchar_t* DistanceMode, Hlong ClippingEndPoints, double Row, double Column, double Phi, double Radius1, double Radius2 ) const (Windows only)

HTuple HXLDCont.DistEllipseContourPointsXld( string distanceMode, int clippingEndPoints, double row, double column, double phi, double radius1, double radius2 )

Description🔗

The operator dist_ellipse_contour_points_xldDistEllipseContourPointsXld determines the distances between points of a contour Contourcontourcontour and an ellipse specified by the center (Rowrowrow, Columncolumncolumn), the orientation of the main axis Phiphiphi, the length of the larger half axis Radius1radius1radius_1, and the length of the smaller half axis Radius2radius2radius_2.

The distance measure is the geometric distance, sometimes also called orthogonal distance. The distances Distancesdistancesdistances are returned for all points of the contour. Normally, the distance is a positive value. In this case DistanceModedistanceModedistance_mode equal to 'unsigned'"unsigned" must be chosen. If this option is switched to 'signed'"signed" the distances can take positive or negative sign, depending on whether the contour points lie outside or inside the ellipse respectively.

Because of artifacts in the preprocessing, the start and end points of a contour might be faulty. In this case, the operator fit_ellipse_contour_xldFitEllipseContourXld is typically called with the parameter ClippingEndPointsclippingEndPointsclipping_end_points set to a value greater than zero to exclude points at the beginning and the end of the contour from the computation. In order to get the geometric distances of the same set of points as used in the fitting process ClippingEndPointsclippingEndPointsclipping_end_points should take the same value.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

Parameters🔗

Contourcontourcontour (input_object) xld_cont → objectobjectHObjectHXLDContHObjectHobject

Input contours.

DistanceModedistanceModedistance_mode (input_control) string → (string)(string)HTuple (HString)HTuple (string)strHtuple (char*)

Mode for unsigned or signed distance values.

Default: 'unsigned'"unsigned"
List of values: 'signed', 'unsigned'"signed", "unsigned"

ClippingEndPointsclippingEndPointsclipping_end_points (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

Number of points at the beginning and the end of the contours to be ignored for the computation of distances.

Default: 00
Restriction: ClippingEndPoints >= 0

Rowrowrow (input_control) ellipse.center.y → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Row coordinate of the center of the ellipse.

Columncolumncolumn (input_control) ellipse.center.x → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Column coordinate of the center of the ellipse.

Phiphiphi (input_control) ellipse.angle.rad → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Orientation of the main axis in radian.

Restriction: Phi >= 0 && Phi <= 6.283185307

Radius1radius1radius_1 (input_control) ellipse.radius1 → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Length of the larger half axis.

Restriction: Radius1 > 0

Radius2radius2radius_2 (input_control) ellipse.radius2 → (real)(real)HTuple (double)HTuple (double)floatHtuple (double)

Length of the smaller half axis.

Restriction: Radius2 >= 0 && Radius2 <= Radius1

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

Distances of the contour points to the ellipse.

Result🔗

dist_ellipse_contour_points_xldDistEllipseContourPointsXld returns 2 (H_MSG_TRUE) if all parameter values are correct. If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

fit_ellipse_contour_xldFitEllipseContourXld

Alternatives

dist_ellipse_contour_xldDistEllipseContourXld

Module🔗

Foundation