euler_numbereuler_numberEulerNumberEulerNumbereuler_number (Operator)

Name

euler_numbereuler_numberEulerNumberEulerNumbereuler_number — Calculate the Euler number.

Signature

euler_number(Regions : : : EulerNumber)

Herror euler_number(const Hobject Regions, Hlong* EulerNumber)

Herror T_euler_number(const Hobject Regions, Htuple* EulerNumber)

void EulerNumber(const HObject& Regions, HTuple* EulerNumber)

HTuple HRegion::EulerNumber() const

static void HOperatorSet.EulerNumber(HObject regions, out HTuple eulerNumber)

HTuple HRegion.EulerNumber()

def euler_number(regions: HObject) -> Sequence[int]

def euler_number_s(regions: HObject) -> int

Description

The operator euler_numbereuler_numberEulerNumberEulerNumberEulerNumbereuler_number calculates the Euler number, i.e., the difference between the number of connection components and the number of holes.

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

If more than one region is passed the results are stored in tuples, the index of a value in the tuple corresponding to the index of a region in the input.

Execution Information

Parameters

RegionsRegionsRegionsRegionsregionsregions (input_object)  region(-array) objectHRegionHObjectHRegionHobject

Region(s) to be examined.

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

Calculated Euler number.

Result

The operator euler_numbereuler_numberEulerNumberEulerNumberEulerNumbereuler_number 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>). If necessary an exception is raised.

Possible Predecessors

thresholdthresholdThresholdThresholdThresholdthreshold, regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing, connectionconnectionConnectionConnectionConnectionconnection

Alternatives

connect_and_holesconnect_and_holesConnectAndHolesConnectAndHolesConnectAndHolesconnect_and_holes

Module

Foundation