gen_grid_regionπ
Short descriptionπ
gen_grid_region β Create a region from lines or pixels.
Signatureπ
gen_grid_region( out region RegionGrid, extent.y RowSteps, extent.x ColumnSteps, string Type, extent.x Width, extent.y Height )
Descriptionπ
The operator gen_grid_region creates a grid constructed
of lines (Type = βlinesβ) or pixels
(Type = βpointsβ).
In case of βlinesβ continuous lines are returned, in case of
βpointsβ only the intersections of the lines.
Starting from the pixel (0,0) to the pixel
(Height-1,Width-1) the grid is
built up at stepping width RowSteps in row
direction and ColumnSteps in column direction.
The step widths have to be greater than 1.
Exceptions are in βlinesβ mode RowSteps, where
RowSteps or ColumnSteps can be set equal to 0.
In such a case, only columns, rows respectively, are created.
Attentionπ
If a very small pattern is chosen
(RowSteps \(<\) 4 or ColumnSteps
\(<\) 4) the created region requires much storage.
In the βpointsβ mode RowSteps and
ColumnSteps must not be set to zero.
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π
RegionGrid (output_object) region β object
Created lines/pixel region.
RowSteps (input_control) extent.y β (integer / real)
Step width in line direction or zero.
Default: 10
Suggested values: 0, 2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 100
Value range: RowSteps (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: RowSteps > 1 || RowSteps == 0
ColumnSteps (input_control) extent.x β (integer / real)
Step width in column direction or zero.
Default: 10
Suggested values: 0, 2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 100
Value range: ColumnSteps (lin)
Minimum increment: 1
Recommended increment: 10
Restriction: ColumnSteps > 1 || ColumnSteps == 0
Type (input_control) string β (string)
Type of created pattern.
Default: 'lines'
List of values: 'lines', 'points'
Width (input_control) extent.x β (integer)
Maximum width of pattern.
Default: 512
Suggested values: 128, 256, 512, 1024
Value range: 1 β€ Width (lin)
Minimum increment: 1
Recommended increment: 10
Height (input_control) extent.y β (integer)
Maximum height of pattern.
Default: 512
Suggested values: 128, 256, 512, 1024
Value range: 1 β€ Height (lin)
Minimum increment: 1
Recommended increment: 10
Exampleπ
(HDevelop)
read_image(Image,'fabrik')
gen_grid_region(Raster,10,10,'lines',512,512)
reduce_domain(Image,Raster,Mask)
sobel_amp(Mask,GridSobel,'sum_abs',3)
dev_display(GridSobel)
read_image(&Image,"fabrik")\;
gen_grid_region(&Raster,10,10,"lines",512,512)\;
reduce_domain(Image,Raster,&Mask)\;
sobel_amp(Mask,GridSobel,"sum_abs",3)\;
T_disp_image(GridSobel,WindowHandle)\;
Complexityπ
The necessary storage (in bytes) for the region is:
\(O((ImageWidth / ColumnSteps) * (ImageHeight / RowSteps))\)
Resultπ
If the parameter values are correct the operator gen_grid_region
returns the value 2 (H_MSG_TRUE).
Otherwise an exception is raised.
The clipping according to the current image format is set via the operator
set_system('clip_region',<'true'/'false'>).
Combinations with other operatorsπ
Combinations
Possible successors
Alternatives
gen_region_line, gen_region_polygon, gen_region_points, gen_region_runs
See also
Moduleπ
Foundation