ClassesClassesClassesClasses | | | | Operators

diameter_regiondiameter_regionDiameterRegiondiameter_regionDiameterRegionDiameterRegion (Operator)

Name

diameter_regiondiameter_regionDiameterRegiondiameter_regionDiameterRegionDiameterRegion — Maximal distance between two boundary points of a region.

Signature

diameter_region(Regions : : : Row1, Column1, Row2, Column2, Diameter)

Herror diameter_region(const Hobject Regions, Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2, double* Diameter)

Herror T_diameter_region(const Hobject Regions, Htuple* Row1, Htuple* Column1, Htuple* Row2, Htuple* Column2, Htuple* Diameter)

Herror diameter_region(Hobject Regions, Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2, double* Diameter)

Herror diameter_region(Hobject Regions, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter)

Hlong HRegion::DiameterRegion(Hlong* Column1, Hlong* Row2, Hlong* Column2, double* Diameter) const

HTuple HRegionArray::DiameterRegion(HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter) const

void DiameterRegion(const HObject& Regions, HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter)

void HRegion::DiameterRegion(HTuple* Row1, HTuple* Column1, HTuple* Row2, HTuple* Column2, HTuple* Diameter) const

void HRegion::DiameterRegion(Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2, double* Diameter) const

void HOperatorSetX.DiameterRegion(
[in] IHUntypedObjectX* Regions, [out] VARIANT* Row1, [out] VARIANT* Column1, [out] VARIANT* Row2, [out] VARIANT* Column2, [out] VARIANT* Diameter)

VARIANT HRegionX.DiameterRegion(
[out] VARIANT* Column1, [out] VARIANT* Row2, [out] VARIANT* Column2, [out] VARIANT* Diameter)

static void HOperatorSet.DiameterRegion(HObject regions, out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2, out HTuple diameter)

void HRegion.DiameterRegion(out HTuple row1, out HTuple column1, out HTuple row2, out HTuple column2, out HTuple diameter)

void HRegion.DiameterRegion(out int row1, out int column1, out int row2, out int column2, out double diameter)

Description

The operator diameter_regiondiameter_regionDiameterRegiondiameter_regionDiameterRegionDiameterRegion calculates the maximal distance between two boundary points of a region. The coordinates of these two extremes and the distance between them will be returned.

In the documentation of the operator region_featuresregion_featuresRegionFeaturesregion_featuresRegionFeaturesRegionFeatures, you can find an image illustrating regions which vary in their diameter.

Attention

If the region is empty, the results of Row1Row1Row1Row1Row1row1, Column1Column1Column1Column1Column1column1, Row2Row2Row2Row2Row2row2 and Column2Column2Column2Column2Column2column2 (all of them = 0) may lead to confusion.

Parallelization

Parameters

RegionsRegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be examined.

Row1Row1Row1Row1Row1row1 (output_control)  line.begin.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row index of the first extreme point.

Column1Column1Column1Column1Column1column1 (output_control)  line.begin.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column index of the first extreme point.

Row2Row2Row2Row2Row2row2 (output_control)  line.end.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Row index of the second extreme point.

Column2Column2Column2Column2Column2column2 (output_control)  line.end.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column index of the second extreme point.

DiameterDiameterDiameterDiameterDiameterdiameter (output_control)  number(-array) HTupleHTupleHTupleVARIANTHtuple (real) (double) (double) (double) (double) (double)

Distance of the two extreme points.

Complexity

If F is the area of a region, the runtime complexity amounts to O(sqrt(F)) on average.

Result

The operator diameter_regiondiameter_regionDiameterRegiondiameter_regionDiameterRegionDiameterRegion returns the value 2 (H_MSG_TRUE), if the input is not empty. The reaction to empty input (no input regions 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>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>). The reaction concerning an empty region (region is the empty set) will be determined by the operator 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, runlength_featuresrunlength_featuresRunlengthFeaturesrunlength_featuresRunlengthFeaturesRunlengthFeatures

Possible Successors

disp_linedisp_lineDispLinedisp_lineDispLineDispLine

Alternatives

smallest_rectangle2smallest_rectangle2SmallestRectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2

Module

Foundation


ClassesClassesClassesClasses | | | | Operators