Name
area_center_xldarea_center_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld — Area and center of gravity (centroid) of contours and polygons.
Herror area_center_xld(Hobject XLD, double* Area, double* Row, double* Column, char* PointOrder)
Herror area_center_xld(Hobject XLD, HTuple* Area, HTuple* Row, HTuple* Column, HTuple* PointOrder)
double HXLD::AreaCenterXld(double* Row, double* Column, char* PointOrder) const
HTuple HXLDArray::AreaCenterXld(HTuple* Row, HTuple* Column, HTuple* PointOrder) const
void HOperatorSetX.AreaCenterXld(
[in] IHUntypedObjectX* XLD, [out] VARIANT* Area, [out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
VARIANT HXLDX.AreaCenterXld(
[out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
VARIANT HXLDContX.AreaCenterXld(
[out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
VARIANT HXLDPolyX.AreaCenterXld(
[out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
VARIANT HXLDParaX.AreaCenterXld(
[out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
VARIANT HXLDModParaX.AreaCenterXld(
[out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
VARIANT HXLDExtParaX.AreaCenterXld(
[out] VARIANT* Row, [out] VARIANT* Column, [out] VARIANT* PointOrder)
area_center_xldarea_center_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld calculates the area and center of gravity
(centroid) of the regions enclosed by the contours or polygons
XLDXLDXLDXLDXLDXLD as well as the order of the points along the
boundary. The area and centroid are computed by applying Green's
theorem using only the points on the contour or polygon, i.e., no
region is generated explicitly for the purpose of calculating the
features. If the points are arranged counterclockwise (i.e., in a
positive mathematical sense) in the contour or polygon, PointOrderPointOrderPointOrderPointOrderPointOrderpointOrder
will be 'positive'"positive""positive""positive""positive""positive". It is assumed that the contours or
polygons are closed. If this is not the case
area_center_xldarea_center_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld will artificially close the contour respectively
polygon.
It should be noted that area_center_xldarea_center_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld only returns useful
results if the contour or polygon encloses a region in the plane. In
particular, the contour or polygon must not intersect itself. This
is particularly important if open contours or polygons are passed
because they are closed automatically, which can produce a
self-intersection. To test whether the contours or polygons
intersect themselves, test_self_intersection_xldtest_self_intersection_xldTestSelfIntersectionXldtest_self_intersection_xldTestSelfIntersectionXldTestSelfIntersectionXld can be
used. If the contour or polygon intersects itself, a useful value
for the center of gravity can be calculated with
area_center_points_xldarea_center_points_xldAreaCenterPointsXldarea_center_points_xldAreaCenterPointsXldAreaCenterPointsXld.
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
XLDXLDXLDXLDXLDXLD.
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
Contours or polygons to be examined.
Area enclosed by the contour or polygon.
Row coordinate of the centroid.
Column coordinate of the centroid.
point order along the boundary
('positive'/'negative').
Let n be the number of points of the contour or polygon.
Then the run time is O(n).
area_center_xldarea_center_xldAreaCenterXldarea_center_xldAreaCenterXldAreaCenterXld returns 2 (H_MSG_TRUE) if the input is not empty.
If the input is empty the behavior can be set via
set_system(::'no_object_result',<Result>:)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). If
necessary, an exception is raised.
gen_contours_skeleton_xldgen_contours_skeleton_xldGenContoursSkeletonXldgen_contours_skeleton_xldGenContoursSkeletonXldGenContoursSkeletonXld,
smooth_contours_xldsmooth_contours_xldSmoothContoursXldsmooth_contours_xldSmoothContoursXldSmoothContoursXld,
gen_polygons_xldgen_polygons_xldGenPolygonsXldgen_polygons_xldGenPolygonsXldGenPolygonsXld
area_center_points_xldarea_center_points_xldAreaCenterPointsXldarea_center_points_xldAreaCenterPointsXldAreaCenterPointsXld
moments_xldmoments_xldMomentsXldmoments_xldMomentsXldMomentsXld,
moments_any_xldmoments_any_xldMomentsAnyXldmoments_any_xldMomentsAnyXldMomentsAnyXld,
area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter,
moments_region_2ndmoments_region_2ndMomentsRegion2ndmoments_region_2ndMomentsRegion2ndMomentsRegion2nd
Foundation