Skip to content

gen_region_pointsGenRegionPointsGenRegionPointsgen_region_pointsgen_region_points🔗

Short description🔗

gen_region_pointsGenRegionPointsGenRegionPointsgen_region_pointsgen_region_points — Store individual pixels as image region.

Signature🔗

gen_region_points( out region Region, coordinates.y Rows, coordinates.x Columns )void GenRegionPoints( HObject* Region, const HTuple& Rows, const HTuple& Columns )static void HOperatorSet.GenRegionPoints( out HObject region, HTuple rows, HTuple columns )def gen_region_points( rows: MaybeSequence[Union[int, float]], columns: MaybeSequence[Union[int, float]] ) -> HObject

Herror gen_region_points( Hobject* Region, const Hlong Rows, const Hlong Columns )

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

void HRegion::GenRegionPoints( const HTuple& Rows, const HTuple& Columns )

void HRegion::GenRegionPoints( Hlong Rows, Hlong Columns )

void HRegion.GenRegionPoints( HTuple rows, HTuple columns )

void HRegion.GenRegionPoints( int rows, int columns )

Description🔗

The operator gen_region_pointsGenRegionPoints creates a region described by a number of pixels. The pixels do not have to be stored in a fixed order, but the best runtime behavior is obtained when the pixels are stored in ascending order. The order is as follows:

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

The indicated coordinates stand for two consecutive pixels in the 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 internal data level.

Parameters🔗

Regionregionregion (output_object) region → objectHObjectHRegionHObjectHobject *

Created region.

Rowsrowsrows (input_control) coordinates.y(-array) → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)MaybeSequence[Union[int, float]]Htuple (Hlong / double)

Lines of the pixels in the region.

Default: 100100
Suggested values: 0, 10, 30, 50, 100, 200, 300, 5000, 10, 30, 50, 100, 200, 300, 500
Value range: Rows (lin)
Minimum increment: 1
Recommended increment: 1

Columnscolumnscolumns (input_control) coordinates.x(-array) → (integer / real)HTuple (Hlong / double)HTuple (int / long / double)MaybeSequence[Union[int, float]]Htuple (Hlong / double)

Columns of the pixels in the region.

Number of elements: Columns == Rows
Default: 100100
Suggested values: 0, 10, 30, 50, 100, 200, 300, 5000, 10, 30, 50, 100, 200, 300, 500
Value range: Columns (lin)
Minimum increment: 1
Recommended increment: 1

Complexity🔗

F shall be the number of pixels. If the pixels are sorted in ascending order the runtime complexity is: \(O(F)\), otherwise \(O(\log(F)*F)\).

Result🔗

The operator gen_region_pointsGenRegionPoints returns the value 2 (H_MSG_TRUE) if the pixels are located within the image format. Otherwise an exception is raised. The clipping according to the current image format is set via the operator set_system('clip_region',<'true'/'false'>). If an empty region is created (by the clipping or by an empty input) the operator set_system('store_empty_region',<'true'/'false'>) determines whether the region is returned or an empty object tuple.

Combinations with other operators🔗

Combinations

Possible predecessors

get_region_pointsGetRegionPoints

Possible successors

paint_regionPaintRegion, reduce_domainReduceDomain

Alternatives

gen_region_polygonGenRegionPolygon, gen_region_runsGenRegionRuns, gen_region_lineGenRegionLine

See also

reduce_domainReduceDomain

Module🔗

Foundation