get_region_indexget_region_indexGetRegionIndexGetRegionIndexget_region_index(算子)

名称

get_region_indexget_region_indexGetRegionIndexGetRegionIndexget_region_index — 包含给定像素的所有区域的索引。

签名

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

描述

算子 get_region_indexget_region_indexGetRegionIndexGetRegionIndexGetRegionIndexget_region_index returns the index of all regions in RegionsRegionsRegionsRegionsregionsregions (range of values: 1 to n) containing the test pixel (RowRowRowRowrowrow,ColumnColumnColumnColumncolumncolumn), i.e.: The returned indices can be used, e.g., in select_objselect_objSelectObjSelectObjSelectObjselect_obj to select the regions containing the test pixel.

注意

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.

执行信息

参数

RegionsRegionsRegionsRegionsregionsregions (输入对象)  region-array objectHRegionHObjectHRegionHobject

Regions to be examined.

RowRowRowRowrowrow (输入控制)  point.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Line index of the test pixel.

默认值: 100

值范围: Row Row Row Row row row (lin)

ColumnColumnColumnColumncolumncolumn (输入控制)  point.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Column index of the test pixel.

默认值: 100

值范围: Column Column Column Column column column (lin)

IndexIndexIndexIndexindexindex (输出控制)  integer(-array) HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Index of the regions containing the test pixel.

复杂度

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).

结果

算子 get_region_indexget_region_indexGetRegionIndexGetRegionIndexGetRegionIndexget_region_index 在参数正确时返回值 2 ( H_MSG_TRUE )。 当输入为空(无可用输入区域)时,可设置行为通过算子 set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)。如有必要,则抛出异常。

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

替代

select_region_pointselect_region_pointSelectRegionPointSelectRegionPointSelectRegionPointselect_region_point

另见

get_mbuttonget_mbuttonGetMbuttonGetMbuttonGetMbuttonget_mbutton, get_mpositionget_mpositionGetMpositionGetMpositionGetMpositionget_mposition, test_region_pointtest_region_pointTestRegionPointTestRegionPointTestRegionPointtest_region_point

模块

基础