connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesconnect_and_holes(算子)

名称

connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesconnect_and_holes — 连接组合和孔的数量。

签名

connect_and_holes(Regions : : : NumConnected, NumHoles)

Herror connect_and_holes(const Hobject Regions, Hlong* NumConnected, Hlong* NumHoles)

Herror T_connect_and_holes(const Hobject Regions, Htuple* NumConnected, Htuple* NumHoles)

void ConnectAndHoles(const HObject& Regions, HTuple* NumConnected, HTuple* NumHoles)

HTuple HRegion::ConnectAndHoles(HTuple* NumHoles) const

Hlong HRegion::ConnectAndHoles(Hlong* NumHoles) const

static void HOperatorSet.ConnectAndHoles(HObject regions, out HTuple numConnected, out HTuple numHoles)

HTuple HRegion.ConnectAndHoles(out HTuple numHoles)

int HRegion.ConnectAndHoles(out int numHoles)

def connect_and_holes(regions: HObject) -> Tuple[Sequence[int], Sequence[int]]

def connect_and_holes_s(regions: HObject) -> Tuple[int, int]

描述

算子 connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesConnectAndHolesconnect_and_holes calculates the number of connection components and the number of holes of each region of RegionsRegionsRegionsRegionsregionsregions

In the documentation of this chapter (Regions / Features), you can find an image illustrating regions which vary in the number of their connection components and the number of their holes.

If more than one region is passed the numerical values of the output control parameters NumConnectedNumConnectedNumConnectedNumConnectednumConnectednum_connected and NumHolesNumHolesNumHolesNumHolesnumHolesnum_holes are each stored in a tuple, the position of a value in the tuple corresponding to the position of the region in the input tuple.

执行信息

参数

RegionsRegionsRegionsRegionsregionsregions (输入对象)  region(-array) objectHRegionHObjectHRegionHobject

待检查的区域。

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

Number of connection components of a region.

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

Number of holes of a region.

结果

算子 connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesConnectAndHolesconnect_and_holes 在输入不为空时返回值 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>)。空区域(区域是空集)的情况下的可设置行为通过 set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>)

可能的前趋

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

替代

euler_numbereuler_numberEulerNumberEulerNumberEulerNumbereuler_number

另见

connectionconnectionConnectionConnectionConnectionconnection, fill_upfill_upFillUpFillUpFillUpfill_up, fill_up_shapefill_up_shapeFillUpShapeFillUpShapeFillUpShapefill_up_shape, union1union1Union1Union1Union1union1

模块

基础