Skip to content

get_region_runsGetRegionRunsGetRegionRunsget_region_runsT_get_region_runsπŸ”—

Short descriptionπŸ”—

get_region_runsGetRegionRunsGetRegionRunsget_region_runsT_get_region_runs β€” Access the runlength coding of a region.

SignatureπŸ”—

get_region_runs( region Region, out chord.y Row, out chord.x1 ColumnBegin, out chord.x2 ColumnEnd )void GetRegionRuns( const HObject& Region, HTuple* Row, HTuple* ColumnBegin, HTuple* ColumnEnd )static void HOperatorSet.GetRegionRuns( HObject region, out HTuple row, out HTuple columnBegin, out HTuple columnEnd )def get_region_runs( region: HObject ) -> Tuple[Sequence[int], Sequence[int], Sequence[int]]

Herror T_get_region_runs( const Hobject Region, Htuple* Row, Htuple* ColumnBegin, Htuple* ColumnEnd )

void HRegion::GetRegionRuns( HTuple* Row, HTuple* ColumnBegin, HTuple* ColumnEnd ) const

void HRegion.GetRegionRuns( out HTuple row, out HTuple columnBegin, out HTuple columnEnd )

DescriptionπŸ”—

The operator get_region_runsGetRegionRuns returns the region data in the form of chord tuples. The chord representation is caused by examining a region line by line with ascending line number (= from β€œtop” to β€œbottom”). Every line is passed from left to right (ascending column number); storing all starting and ending points of region segments (= chords). Thus a region can be described by a sequence of chords, a chord being defined by line number, starting and ending points (column number). The operator get_region_runsGetRegionRuns returns the three components of the chords in the form of tuples. In case of an empty region three empty tuples are returned.

AttentionπŸ”—

Only one region may be passed.

Execution informationπŸ”—

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

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

  • Processed without parallelization.

ParametersπŸ”—

Regionregionregion (input_object) region β†’ objectHObjectHRegionHObjectHobject

Output region.

Rowrowrow (output_control) chord.y-array β†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Line numbers of the chords.

ColumnBegincolumnBegincolumn_begin (output_control) chord.x1-array β†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Column numbers of the starting points of the chords.

Number of elements: ColumnBegin == Row

ColumnEndcolumnEndcolumn_end (output_control) chord.x2-array β†’ (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Column numbers of the ending points of the chords.

Number of elements: ColumnEnd == Row

ResultπŸ”—

The operator get_region_runsGetRegionRuns normally returns the value 2 (H_MSG_TRUE). If more than one region is passed an exception is raised. The behavior in case of empty input (no input regions available) is set via the operator set_system('no_object_result',<Result>).

Combinations with other operatorsπŸ”—

Combinations

Possible predecessors

thresholdThreshold, connectionConnection

Alternatives

get_region_pointsGetRegionPoints

See also

copy_objCopyObj, gen_region_runsGenRegionRuns

ModuleπŸ”—

Foundation