connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesconnect_and_holes (算子名称)
名称
connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesconnect_and_holes
— Number of connection components and holes
参数签名
def connect_and_holes(区域: HObject) -> Tuple[Sequence[int], Sequence[int]]
def connect_and_holes_s(区域: HObject) -> Tuple[int, int]
描述
The operator connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesConnectAndHolesconnect_and_holes
calculates the number of
connection components and the number of holes of
each region of 区域区域区域区域区域区域
.
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.
运行信息
- Multithreading type: reentrant (runs in parallel with non-exclusive operators).
- Multithreading scope: global (may be called from any thread).
- Automatically parallelized on tuple level.
参数表
区域区域区域区域区域区域
(input_object) region(-array) →
objectHRegionHObjectHRegionHobject
Region(s) to be examined.
NumConnectedNumConnectedNumConnectedNumConnectednumConnectednum_connected
(output_control) integer(-array) →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of connection components of a region.
NumHolesNumHolesNumHolesNumHolesnumHolesnum_holes
(output_control) integer(-array) →
HTupleSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
Number of holes of a region.
结果
The operator connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesConnectAndHolesconnect_and_holes
returns the value 2 (
H_MSG_TRUE)
if the input is not empty.
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>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)
.
The behavior in case of empty region (the region is the empty set) is set via
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
模块
Foundation