get_region_indexget_region_indexGetRegionIndexGetRegionIndexget_region_index (Operator)

Name

get_region_indexget_region_indexGetRegionIndexGetRegionIndexget_region_index — Index of all regions containing a given pixel.

Signature

get_region_index(Regions : : Row, Column : Index)

Herror get_region_index(const Hobject Regions, const Hlong Row, const Hlong Column, Hlong* Index)

Herror T_get_region_index(const Hobject Regions, const Htuple Row, const Htuple Column, Htuple* Index)

void GetRegionIndex(const HObject& Regions, const HTuple& Row, const HTuple& Column, HTuple* Index)

HTuple HRegion::GetRegionIndex(Hlong Row, Hlong Column) const

static void HOperatorSet.GetRegionIndex(HObject regions, HTuple row, HTuple column, out HTuple index)

HTuple HRegion.GetRegionIndex(int row, int column)

def get_region_index(regions: HObject, row: int, column: int) -> Sequence[int]

def get_region_index_s(regions: HObject, row: int, column: int) -> int

Description

The operator get_region_indexget_region_indexGetRegionIndexGetRegionIndexget_region_index returns the index of all regions in RegionsRegionsRegionsregionsregions (range of values: 1 to n) containing the test pixel (RowRowRowrowrow,ColumnColumnColumncolumncolumn), i.e.: The returned indices can be used, e.g., in select_objselect_objSelectObjSelectObjselect_obj to select the regions containing the test pixel.

Attention

If the regions overlap more than one region might contain the pixel. In this case all these regions are returned. If no region contains the indicated pixel the empty tuple (= no region) is returned.

Execution Information

Parameters

RegionsRegionsRegionsregionsregions (input_object)  region-array objectHRegionHObjectHObjectHobject

Regions to be examined.

RowRowRowrowrow (input_control)  point.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line index of the test pixel.

Default: 100

Value range: Row Row Row row row (lin)

ColumnColumnColumncolumncolumn (input_control)  point.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column index of the test pixel.

Default: 100

Value range: Column Column Column column column (lin)

IndexIndexIndexindexindex (output_control)  integer(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the regions containing the test pixel.

Complexity

If F is the area of the region and N is the number of regions the mean runtime complexity is O(ln(sqrt(F)) * N).

Result

The operator get_region_indexget_region_indexGetRegionIndexGetRegionIndexget_region_index returns the value 2 ( H_MSG_TRUE) if the parameters are correct. 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>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>). If necessary an exception is raised.

Possible Predecessors

thresholdthresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionconnection

Alternatives

select_region_pointselect_region_pointSelectRegionPointSelectRegionPointselect_region_point

See also

get_mbuttonget_mbuttonGetMbuttonGetMbuttonget_mbutton, get_mpositionget_mpositionGetMpositionGetMpositionget_mposition, test_region_pointtest_region_pointTestRegionPointTestRegionPointtest_region_point

Module

Foundation