Skip to content

eliminate_runseliminate_runsEliminateRunsEliminateRunseliminate_runseliminate_runs🔗

Short description🔗

eliminate_runseliminate_runsEliminateRunsEliminateRunseliminate_runseliminate_runs — Eliminate runs of a given length.

Signature🔗

eliminate_runs( region Region, out region RegionClipped, integer ElimShorter, integer ElimLonger )eliminate_runs( Region : RegionClipped : ElimShorter, ElimLonger : )void EliminateRuns( const HObject& Region, HObject* RegionClipped, const HTuple& ElimShorter, const HTuple& ElimLonger )static void HOperatorSet.EliminateRuns( HObject region, out HObject regionClipped, HTuple elimShorter, HTuple elimLonger )def eliminate_runs( region: HObject, elim_shorter: int, elim_longer: int ) -> HObject

Herror eliminate_runs( const Hobject Region, Hobject* RegionClipped, const Hlong ElimShorter, const Hlong ElimLonger )

Herror T_eliminate_runs( const Hobject Region, Hobject* RegionClipped, const Htuple ElimShorter, const Htuple ElimLonger )

HRegion HRegion::EliminateRuns( Hlong ElimShorter, Hlong ElimLonger ) const

HRegion HRegion.EliminateRuns( int elimShorter, int elimLonger )

Description🔗

eliminate_runsEliminateRuns eliminates all runs of the run length encoding of the input regions which are shorter than ElimShorterelimShorterelim_shorter or longer as ElimLongerelimLongerelim_longer.

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🔗

Regionregionregion (input_object) region(-array) → objectobjectHObjectHRegionHObjectHobject

Region to be clipped.

RegionClippedregionClippedregion_clipped (output_object) region(-array) → objectobjectHObjectHRegionHObjectHobject *

Clipped regions.

ElimShorterelimShorterelim_shorter (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

All runs which are shorter are eliminated.

Default: 33
Suggested values: 2, 3, 4, 5, 6, 8, 10, 12, 152, 3, 4, 5, 6, 8, 10, 12, 15
Value range: 1 ≤ ElimShorter ≤ 500 (lin)
Minimum increment: 1
Recommended increment: 1

ElimLongerelimLongerelim_longer (input_control) integer → (integer)(integer)HTuple (Hlong)HTuple (int / long)intHtuple (Hlong)

All runs which are longer are eliminated.

Default: 10001000
Suggested values: 50, 100, 200, 500, 1000, 200050, 100, 200, 500, 1000, 2000
Value range: 1 ≤ ElimLonger ≤ 10000 (lin)
Minimum increment: 1
Recommended increment: 10

Result🔗

eliminate_runsEliminateRuns returns 2 (H_MSG_TRUE) if all parameters are correct. The behavior in case of empty input (no regions given) can be set via set_system('no_object_result',<Result>) and the behavior in case of an empty input region via set_system('empty_region_result',<Result>). If necessary, an exception is raised.

Combinations with other operators🔗

Combinations

Possible predecessors

thresholdThreshold, connectionConnection, regiongrowingRegiongrowing, pouringPouring

Possible successors

erosion1Erosion1, dilation1Dilation1, disp_regionDispRegion

Alternatives

shape_transShapeTrans

Module🔗

Foundation