ClassesClasses | | Operators

diameter_xlddiameter_xldDiameterXldDiameterXld (Operator)

Name

diameter_xlddiameter_xldDiameterXldDiameterXld — Maximum distance between two contour or polygon points.

Signature

diameter_xld(XLD : : : Row1, Column1, Row2, Column2, Diameter)

Herror diameter_xld(const Hobject XLD, double* Row1, double* Column1, double* Row2, double* Column2, double* Diameter)

Herror T_diameter_xld(const Hobject XLD, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2, Htuple* Diameter)

void DiameterXld(const HObject& XLD, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter)

void HXLD::DiameterXld(HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter) const

void HXLD::DiameterXld(double* Row1, double* Column1, double* Row2, double* Column2, double* Diameter) const

static void HOperatorSet.DiameterXld(HObject XLD, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2, out HTuple diameter)

void HXLD.DiameterXld(out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2, out HTuple diameter)

void HXLD.DiameterXld(out double row1, out double column1, out double row2, out double column2, out double diameter)

Description

The operator diameter_xlddiameter_xldDiameterXldDiameterXldDiameterXld calculates the maximum distance between two points of each input contour or polygon. The coordinates of these two extremes and the distance between them will be returned. The input contour or polygon must not intersect itself, otherwise the resulting parameters are not meaningful (Whether the input contour or polygon intersects itself or not can be determined with test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXld). If the input contour or polygon is not closed it will be closed automatically. If more than one contour or polygon is passed, the results are stored in tuples in the same order as the respective contours or polygons in XLDXLDXLDXLDXLD.

Attention

If the contour or polygon is empty, the results of Row1Row1Row1Row1row1, Column1Column1Column1Column1column1, Row2Row2Row2Row2row2 and Column2Column2Column2Column2column2 (all of them = 0) may lead to confusion.

Execution Information

Parameters

XLDXLDXLDXLDXLD (input_object)  xld(-array) objectHXLDHXLDHobject

Contours or polygons to be examined.

Row1Row1Row1Row1row1 (output_control)  line.begin.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the first extreme point of the contours or polygons.

Column1Column1Column1Column1column1 (output_control)  line.begin.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the first extreme point of the contours or polygons.

Row2Row2Row2Row2row2 (output_control)  line.end.y(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Row coordinate of the second extreme point of the contour or polygons.

Column2Column2Column2Column2column2 (output_control)  line.end.x(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Column coordinate of the second extreme point of the contours or polygons.

DiameterDiameterDiameterDiameterdiameter (output_control)  number(-array) HTupleHTupleHtuple (real) (double) (double) (double)

Distance of the two extreme points of the contours or polygons.

Result

The operator diameter_xlddiameter_xldDiameterXldDiameterXldDiameterXld returns the value 2 (H_MSG_TRUE), if the input is not empty. The reaction to empty input (no input contours are available) may be determined with the help of the operator set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If necessary an exception is raised.

Possible Predecessors

gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXldGenContoursSkeletonXld, edges_sub_pixedges_sub_pixEdgesSubPixEdgesSubPixEdgesSubPix, threshold_sub_pixthreshold_sub_pixThresholdSubPixThresholdSubPixThresholdSubPix, gen_contour_polygon_xldgen_contour_polygon_xldGenContourPolygonXldGenContourPolygonXldGenContourPolygonXld, test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXldTestSelfIntersectionXld

Alternatives

smallest_rectangle2_xldsmallest_rectangle2_xldSmallestRectangle2XldSmallestRectangle2XldSmallestRectangle2Xld

See also

area_center_xldarea_center_xldAreaCenterXldAreaCenterXldAreaCenterXld

Module

Foundation


ClassesClasses | | Operators