Skip to content

connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesconnect_and_holesconnect_and_holes🔗

Short description🔗

connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesconnect_and_holesconnect_and_holes — Number of connection components and holes

Signature🔗

connect_and_holes( region Regions, out integer NumConnected, out integer NumHoles )connect_and_holes( Regions : : : NumConnected, NumHoles )void ConnectAndHoles( const HObject& Regions, HTuple* NumConnected, HTuple* NumHoles )static void HOperatorSet.ConnectAndHoles( HObject regions, out HTuple numConnected, out HTuple numHoles )def connect_and_holes( regions: HObject ) -> Tuple[Sequence[int], Sequence[int]]

def connect_and_holes_s( regions: HObject ) -> Tuple[int, int]Herror connect_and_holes( const Hobject Regions, Hlong* NumConnected, Hlong* NumHoles )

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

HTuple HRegion::ConnectAndHoles( HTuple* NumHoles ) const

Hlong HRegion::ConnectAndHoles( Hlong* NumHoles ) const

HTuple HRegion.ConnectAndHoles( out HTuple numHoles )

int HRegion.ConnectAndHoles( out int numHoles )

Description🔗

The operator connect_and_holesConnectAndHoles calculates the number of connection components and the number of holes of each region of Regionsregionsregions.

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 NumConnectednumConnectednum_connected and NumHolesnumHolesnum_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.

Execution information🔗

Execution information
  • Multithreading type: reentrant (runs in parallel with non-exclusive operators).

  • Multithreading scope: global (may be called from any thread).

  • Automatically parallelized on tuple level.

Parameters🔗

Regionsregionsregions (input_object) region(-array) → objectobjectHObjectHRegionHObjectHobject

Region(s) to be examined.

NumConnectednumConnectednum_connected (output_control) integer(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Number of connection components of a region.

NumHolesnumHolesnum_holes (output_control) integer(-array) → (integer)(integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Number of holes of a region.

Result🔗

The operator connect_and_holesConnectAndHoles 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>). The behavior in case of empty region (the region is the empty set) is set via set_system('empty_region_result',<Result>).

Combinations with other operators🔗

Combinations

Possible predecessors

thresholdThreshold, regiongrowingRegiongrowing, connectionConnection

Alternatives

euler_numberEulerNumber

See also

connectionConnection, fill_upFillUp, fill_up_shapeFillUpShape, union1Union1

Module🔗

Foundation