Skip to content

get_region_pointsGetRegionPointsGetRegionPointsget_region_pointsT_get_region_points🔗

Short description🔗

get_region_pointsGetRegionPointsGetRegionPointsget_region_pointsT_get_region_points — Access the pixels of a region.

Signature🔗

get_region_points( region Region, out coordinates.y Rows, out coordinates.x Columns )void GetRegionPoints( const HObject& Region, HTuple* Rows, HTuple* Columns )static void HOperatorSet.GetRegionPoints( HObject region, out HTuple rows, out HTuple columns )def get_region_points( region: HObject ) -> Tuple[Sequence[int], Sequence[int]]

Herror T_get_region_points( const Hobject Region, Htuple* Rows, Htuple* Columns )

void HRegion::GetRegionPoints( HTuple* Rows, HTuple* Columns ) const

void HRegion.GetRegionPoints( out HTuple rows, out HTuple columns )

Description🔗

The operator get_region_pointsGetRegionPoints returns the region data in the form of coordinate lists. The coordinates are sorted in the following order:

\[\begin{eqnarray*} (r_{1},c_{1}) \le (r_{2},c_{2}) := (r_{1} < r_{2}) \hspace{2mm} \vee \hspace{2mm} (r_{1} = r_{2}) \wedge (c1 \le c2) \end{eqnarray*}\]

get_region_pointsGetRegionPoints returns the coordinates in the form of tuples. An empty region is passed as empty tuple.

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

This region is accessed.

Rowsrowsrows (output_control) coordinates.y-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Line numbers of the pixels in the region

Columnscolumnscolumns (output_control) coordinates.x-array → (integer)HTuple (Hlong)HTuple (int / long)Sequence[int]Htuple (Hlong)

Column numbers of the pixels in the region.

Number of elements: Columns == Rows

Result🔗

The operator get_region_pointsGetRegionPoints normally returns the value 2 (H_MSG_TRUE). If more than one connection component 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

sobel_ampSobelAmp, thresholdThreshold, connectionConnection

Alternatives

get_region_runsGetRegionRuns

See also

copy_objCopyObj, gen_region_pointsGenRegionPoints

Module🔗

Foundation