ClassesClassesClassesClasses | | | | Operators

test_region_pointtest_region_pointTestRegionPointtest_region_pointTestRegionPointTestRegionPoint (Operator)

Name

test_region_pointtest_region_pointTestRegionPointtest_region_pointTestRegionPointTestRegionPoint — Test if the region contains a given point.

Signature

test_region_point(Regions : : Row, Column : IsInside)

Herror test_region_point(const Hobject Regions, const Hlong Row, const Hlong Column, Hlong* IsInside)

Herror T_test_region_point(const Hobject Regions, const Htuple Row, const Htuple Column, Htuple* IsInside)

Herror test_region_point(Hobject Regions, const HTuple& Row, const HTuple& Column, Hlong* IsInside)

Hlong HRegion::TestRegionPoint(const HTuple& Row, const HTuple& Column) const

Hlong HRegionArray::TestRegionPoint(const HTuple& Row, const HTuple& Column) const

void TestRegionPoint(const HObject& Regions, const HTuple& Row, const HTuple& Column, HTuple* IsInside)

Hlong HRegion::TestRegionPoint(const HTuple& Row, const HTuple& Column) const

Hlong HRegion::TestRegionPoint(Hlong Row, Hlong Column) const

void HOperatorSetX.TestRegionPoint(
[in] IHUntypedObjectX* Regions, [in] VARIANT Row, [in] VARIANT Column, [out] VARIANT* IsInside)

Hlong HRegionX.TestRegionPoint(
[in] VARIANT Row, [in] VARIANT Column)

static void HOperatorSet.TestRegionPoint(HObject regions, HTuple row, HTuple column, out HTuple isInside)

int HRegion.TestRegionPoint(HTuple row, HTuple column)

int HRegion.TestRegionPoint(int row, int column)

Description

If an array of regions and one test point is provided, test_region_pointtest_region_pointTestRegionPointtest_region_pointTestRegionPointTestRegionPoint tests if at least one input region of RegionsRegionsRegionsRegionsRegionsregions contains the single test point given in (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn). If this is the case, IsInsideIsInsideIsInsideIsInsideIsInsideisInside is set to TRUE, else to FALSE. Alternatively, if a single region and several test points are provided, test_region_pointtest_region_pointTestRegionPointtest_region_pointTestRegionPointTestRegionPoint tests if at least one of the test points (given in RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) is contained in the input region given in RegionsRegionsRegionsRegionsRegionsregions. If this is the case, IsInsideIsInsideIsInsideIsInsideIsInsideisInside is set to TRUE, otherwise it is set to FALSE. If (RowRowRowRowRowrow,ColumnColumnColumnColumnColumncolumn) are real-valued, rounding is performed internally since regions are pixel precise.

Attention

The test pixel is not contained in an empty region (no pixel of the region corresponds to the pixel). If all regions are empty IsInsideIsInsideIsInsideIsInsideIsInsideisInside is set to FALSE.

In case of an empty input object (empty tuple) RegionsRegionsRegionsRegionsRegionsregions and set_system('no_object_result','true')set_system("no_object_result","true")SetSystem("no_object_result","true")set_system("no_object_result","true")SetSystem("no_object_result","true")SetSystem("no_object_result","true"), an empty tuple is returned in IsInsideIsInsideIsInsideIsInsideIsInsideisInside. If set_system('no_object_result','false')set_system("no_object_result","false")SetSystem("no_object_result","false")set_system("no_object_result","false")SetSystem("no_object_result","false")SetSystem("no_object_result","false") was set, an exception is raised.

Parallelization

Parameters

RegionsRegionsRegionsRegionsRegionsregions (input_object)  region(-array) objectHRegionHRegionHRegionHRegionXHobject

Region(s) to be examined.

RowRowRowRowRowrow (input_control)  point.y(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Row index of the test pixel(s).

Default value: 100

ColumnColumnColumnColumnColumncolumn (input_control)  point.x(-array) HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Column index of the test pixel(s).

Number of elements: Row == Column

Default value: 100

IsInsideIsInsideIsInsideIsInsideIsInsideisInside (output_control)  integer HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Boolean result value.

Complexity

If F is the area of one region, N is the number of regions, and M is the number of test points, the runtime complexity is O(ln(sqrt(F)) * N) in the case of one test point and several regions and O(ln(sqrt(F)) * M) in the case of one region and several test points.

Result

The operator test_region_pointtest_region_pointTestRegionPointtest_region_pointTestRegionPointTestRegionPoint returns the value 2 (H_MSG_TRUE) if the parameters are correct. The behavior in case of an empty object 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>). If necessary, an exception is raised.

Possible Predecessors

thresholdthresholdThresholdthresholdThresholdThreshold, regiongrowingregiongrowingRegiongrowingregiongrowingRegiongrowingRegiongrowing, connectionconnectionConnectionconnectionConnectionConnection

Alternatives

union1union1Union1union1Union1Union1, intersectionintersectionIntersectionintersectionIntersectionIntersection, area_centerarea_centerAreaCenterarea_centerAreaCenterAreaCenter

See also

select_region_pointselect_region_pointSelectRegionPointselect_region_pointSelectRegionPointSelectRegionPoint

Module

Foundation


ClassesClassesClassesClasses | | | | Operators