ClassesClassesClassesClasses | | | | Operators

convexityconvexityConvexityconvexityConvexityConvexity (Operator)

Name

convexityconvexityConvexityconvexityConvexityConvexity — Shape factor for the convexity of a region.

Signature

convexity(Regions : : : Convexity)

Herror convexity(const Hobject Regions, double* Convexity)

Herror T_convexity(const Hobject Regions, Htuple* Convexity)

Herror convexity(Hobject Regions, double* Convexity)

Herror convexity(Hobject Regions, HTuple* Convexity)

double HRegion::Convexity() const

HTuple HRegionArray::Convexity() const

void Convexity(const HObject& Regions, HTuple* Convexity)

HTuple HRegion::Convexity() const

void HOperatorSetX.Convexity(
[in] IHUntypedObjectX* Regions, [out] VARIANT* Convexity)

VARIANT HRegionX.Convexity()

static void HOperatorSet.Convexity(HObject regions, out HTuple convexity)

HTuple HRegion.Convexity()

Description

The operator convexityconvexityConvexityconvexityConvexityConvexity calculates the convexity of each input region of RegionsRegionsRegionsRegionsRegionsregions.

Calculation:

If Fc is the area of the convex hull and Fo the original area of the region the shape factor C is defined as:

C = Fo / Fc

The shape factor C is 1 if the region is convex (e.g., rectangle, circle etc.). If there are indentations or holes C is smaller than 1.

In case of an empty region the operator convexityconvexityConvexityconvexityConvexityConvexity returns the value 0 (if no other behavior was set (see set_systemset_systemSetSystemset_systemSetSystemSetSystem)). If more than one region is passed the numerical values of the contour length are stored in a tuple, the position of a value in the tuple corresponding to the position of the region in the input tuple.

Parallelization

Parameters

RegionsRegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Region(s) to be examined.

ConvexityConvexityConvexityConvexityConvexityconvexity (output_control)  real(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Convexity of the input region(s).

Assertion: Convexity <= 1

Result

The operator convexityconvexityConvexityconvexityConvexityConvexity returns the value 2 (H_MSG_TRUE) if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator 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>). The behavior in case of empty region (the region is the empty set) is set via set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>). If necessary an exception is raised.

Possible Predecessors

thresholdthresholdThresholdthresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionconnectionConnectionConnection

See also

select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape, area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter, shape_transshape_transShapeTransshape_transShapeTransShapeTrans

Module

Foundation


ClassesClassesClassesClasses | | | | Operators