test_region_pointstest_region_pointsTestRegionPointsTestRegionPointstest_region_points (Operator)
Name
test_region_pointstest_region_pointsTestRegionPointsTestRegionPointstest_region_points
— Test if points are contained in regions.
Signature
def test_region_points(regions: HObject, row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]]) -> Sequence[int]
def test_region_points_s(regions: HObject, row: MaybeSequence[Union[int, float]], column: MaybeSequence[Union[int, float]]) -> int
Description
test_region_pointstest_region_pointsTestRegionPointsTestRegionPointstest_region_points
tests if points (RowRowRowrowrow
,ColumnColumnColumncolumncolumn
)
are contained in the regions RegionsRegionsRegionsregionsregions
.
This operator supports parameter broadcasting.
This means that each parameter can be given as a tuple or object array
of length 1 or N.
Parameters with length 1 will be repeated internally
such that the number of computed tests is always N.
In all cases, for each performed test, IsInsideIsInsideIsInsideisInsideis_inside
is set to
TRUE (1) if the point is contained in the region and to
FALSE (0) otherwise.
If (RowRowRowrowrow
,ColumnColumnColumncolumncolumn
) are real-valued, rounding is
performed internally since regions are pixel precise.
Attention
Test pixels are not contained in an empty region.
Execution Information
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on internal data level.
Parameters
RegionsRegionsRegionsregionsregions
(input_object) region(-array) →
objectHRegionHObjectHObjectHobject
Region(s) to be examined.
RowRowRowrowrow
(input_control) point.y(-array) →
HTupleMaybeSequence[Union[int, float]]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Row index of the test pixel(s).
Default:
100
ColumnColumnColumncolumncolumn
(input_control) point.x(-array) →
HTupleMaybeSequence[Union[int, float]]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)
Column index of the test pixel(s).
Number of elements:
Row == Column
Default:
100
IsInsideIsInsideIsInsideisInsideis_inside
(output_control) integer(-array) →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Boolean result value.
Result
The operator test_region_pointstest_region_pointsTestRegionPointsTestRegionPointstest_region_points
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>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)
.
If necessary, an exception is raised.
Possible Predecessors
thresholdthresholdThresholdThresholdthreshold
,
regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing
,
connectionconnectionConnectionConnectionconnection
Alternatives
intersectionintersectionIntersectionIntersectionintersection
,
area_centerarea_centerAreaCenterAreaCenterarea_center
,
test_region_pointtest_region_pointTestRegionPointTestRegionPointtest_region_point
See also
select_region_pointselect_region_pointSelectRegionPointSelectRegionPointselect_region_point
,
test_region_pointtest_region_pointTestRegionPointTestRegionPointtest_region_point
Module
Foundation