ClassesClassesClassesClasses | | | | Operators

smallest_rectangle1smallest_rectangle1SmallestRectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1 (Operator)

Name

smallest_rectangle1smallest_rectangle1SmallestRectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1 — Surrounding rectangle parallel to the coordinate axes.

Signature

smallest_rectangle1(Regions : : : Row1, Column1, Row2, Column2)

Herror smallest_rectangle1(const Hobject Regions, Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2)

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

Herror smallest_rectangle1(Hobject Regions, Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2)

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

Hlong HRegion::SmallestRectangle1(Hlong* Column1, Hlong* Row2, Hlong* Column2) const

HTuple HRegionArray::SmallestRectangle1(HTuple* Column1, HTuple* Row2, HTuple* Column2) const

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

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

void HRegion::SmallestRectangle1(Hlong* Row1, Hlong* Column1, Hlong* Row2, Hlong* Column2) const

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

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

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

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

void HRegion.SmallestRectangle1(out int row1, out int column1, out int row2, out int column2)

Description

The operator smallest_rectangle1smallest_rectangle1SmallestRectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1 calculates the surrounding rectangle of all input regions (parallel to the coordinate axes). The surrounding rectangle is described by the coordinates of the corner pixels (Row1Row1Row1Row1Row1row1,Column1Column1Column1Column1Column1column1,Row2Row2Row2Row2Row2row2,Column2Column2Column2Column2Column2column2). The calculation of the rectangle is based on the center coordinates of the region pixels.

The smallest axis aligned surrounding rectangle of a region. Note that the calculation is based on the center coordinates of the region pixels.

If more than one region is passed in RegionsRegionsRegionsRegionsRegionsregions, the results are stored in tuples, the index of a value in the tuple corresponding to the index of a region in the input. In case of empty region all parameters have the value 0 if no other behavior was set (see set_systemset_systemSetSystemset_systemSetSystemSetSystem).

Attention

In case of empty region the result of Row1Row1Row1Row1Row1row1,Column1Column1Column1Column1Column1column1, Row2Row2Row2Row2Row2row2 and Column2Column2Column2Column2Column2column2 (all are 0) can lead to confusion.

Parallelization

Parameters

RegionsRegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Regions to be examined.

Row1Row1Row1Row1Row1row1 (output_control)  rectangle.origin.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Line index of upper left corner point.

Column1Column1Column1Column1Column1column1 (output_control)  rectangle.origin.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column index of upper left corner point.

Row2Row2Row2Row2Row2row2 (output_control)  rectangle.corner.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Line index of lower right corner point.

Column2Column2Column2Column2Column2column2 (output_control)  rectangle.corner.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Column index of lower right corner point.

Complexity

If F is the area of the region the mean runtime complexity is O(sqrt(F)).

Result

The operator smallest_rectangle1smallest_rectangle1SmallestRectangle1smallest_rectangle1SmallestRectangle1SmallestRectangle1 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, runlength_featuresrunlength_featuresRunlengthFeaturesrunlength_featuresRunlengthFeaturesRunlengthFeatures

Possible Successors

disp_rectangle1disp_rectangle1DispRectangle1disp_rectangle1DispRectangle1DispRectangle1, gen_rectangle1gen_rectangle1GenRectangle1gen_rectangle1GenRectangle1GenRectangle1

Alternatives

smallest_rectangle2smallest_rectangle2SmallestRectangle2smallest_rectangle2SmallestRectangle2SmallestRectangle2, area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter

See also

select_shapeselect_shapeSelectShapeselect_shapeSelectShapeSelectShape

Module

Foundation


ClassesClassesClassesClasses | | | | Operators