ClassesClassesClassesClasses | | | | Operators

gen_grid_regiongen_grid_regionGenGridRegiongen_grid_regionGenGridRegionGenGridRegion (Operator)

Name

gen_grid_regiongen_grid_regionGenGridRegiongen_grid_regionGenGridRegionGenGridRegion — Create a region from lines or pixels.

Signature

gen_grid_region( : RegionGrid : RowSteps, ColumnSteps, Type, Width, Height : )

Herror gen_grid_region(Hobject* RegionGrid, const Hlong RowSteps, const Hlong ColumnSteps, const char* Type, const Hlong Width, const Hlong Height)

Herror T_gen_grid_region(Hobject* RegionGrid, const Htuple RowSteps, const Htuple ColumnSteps, const Htuple Type, const Htuple Width, const Htuple Height)

Herror gen_grid_region(Hobject* RegionGrid, const HTuple& RowSteps, const HTuple& ColumnSteps, const HTuple& Type, const HTuple& Width, const HTuple& Height)

HRegion HRegion::GenGridRegion(const HTuple& RowSteps, const HTuple& ColumnSteps, const HTuple& Type, const HTuple& Width, const HTuple& Height)

void GenGridRegion(HObject* RegionGrid, const HTuple& RowSteps, const HTuple& ColumnSteps, const HTuple& Type, const HTuple& Width, const HTuple& Height)

void HRegion::GenGridRegion(const HTuple& RowSteps, const HTuple& ColumnSteps, const HString& Type, Hlong Width, Hlong Height)

void HRegion::GenGridRegion(Hlong RowSteps, Hlong ColumnSteps, const HString& Type, Hlong Width, Hlong Height)

void HRegion::GenGridRegion(Hlong RowSteps, Hlong ColumnSteps, const char* Type, Hlong Width, Hlong Height)

void HOperatorSetX.GenGridRegion(
[out] IHUntypedObjectX*RegionGrid, [in] VARIANT RowSteps, [in] VARIANT ColumnSteps, [in] VARIANT Type, [in] VARIANT Width, [in] VARIANT Height)

void HRegionX.GenGridRegion(
[in] VARIANT RowSteps, [in] VARIANT ColumnSteps, [in] BSTR Type, [in] Hlong Width, [in] Hlong Height)

static void HOperatorSet.GenGridRegion(out HObject regionGrid, HTuple rowSteps, HTuple columnSteps, HTuple type, HTuple width, HTuple height)

void HRegion.GenGridRegion(HTuple rowSteps, HTuple columnSteps, string type, int width, int height)

void HRegion.GenGridRegion(int rowSteps, int columnSteps, string type, int width, int height)

Description

The operator gen_grid_regiongen_grid_regionGenGridRegiongen_grid_regionGenGridRegionGenGridRegion creates a grid constructed of lines (TypeTypeTypeTypeTypetype = 'lines') or pixels (TypeTypeTypeTypeTypetype = '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 (HeightHeightHeightHeightHeightheight-1,WidthWidthWidthWidthWidthwidth-1) the grid is built up at stepping width RowStepsRowStepsRowStepsRowStepsRowStepsrowSteps in line direction and ColumnStepsColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps in column direction. In the 'lines' mode RowStepsRowStepsRowStepsRowStepsRowStepsrowSteps, ColumnStepsColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps respectively, can be set to zero. In this case only columns, lines respectively, are created.

Attention

If a very small pattern is chosen (RowStepsRowStepsRowStepsRowStepsRowStepsrowSteps < 4 or ColumnStepsColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps < 4) the created region requires much storage.

In the 'points' mode RowStepsRowStepsRowStepsRowStepsRowStepsrowSteps and ColumnStepsColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps must not be set to zero.

Parallelization

Parameters

RegionGridRegionGridRegionGridRegionGridRegionGridregionGrid (output_object)  region objectHRegionHRegionHRegionHRegionXHobject *

Created lines/pixel region.

RowStepsRowStepsRowStepsRowStepsRowStepsrowSteps (input_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Step width in line direction or zero.

Default value: 10

Suggested values: 0, 2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 100

Typical range of values: 0 ≤ RowSteps RowSteps RowSteps RowSteps RowSteps rowSteps ≤ 512 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: RowSteps > 1 || RowSteps == 0

ColumnStepsColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps (input_control)  extent.x HTupleHTupleHTupleVARIANTHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double) (Hlong / double) (Hlong / double)

Step width in column direction or zero.

Default value: 10

Suggested values: 0, 2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 100

Typical range of values: 0 ≤ ColumnSteps ColumnSteps ColumnSteps ColumnSteps ColumnSteps columnSteps ≤ 512 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: ColumnSteps > 1 || ColumnSteps == 0

TypeTypeTypeTypeTypetype (input_control)  string HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Type of created pattern.

Default value: 'lines' "lines" "lines" "lines" "lines" "lines"

List of values: 'lines'"lines""lines""lines""lines""lines", 'points'"points""points""points""points""points"

WidthWidthWidthWidthWidthwidth (input_control)  extent.x HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Maximum width of pattern.

Default value: 512

Suggested values: 128, 256, 512, 1024

Typical range of values: 1 ≤ Width Width Width Width Width width ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: Width >= 1

HeightHeightHeightHeightHeightheight (input_control)  extent.y HTupleHTupleHTupleVARIANTHtuple (integer) (int / long) (Hlong) (Hlong) (Hlong) (Hlong)

Maximum height of pattern.

Default value: 512

Suggested values: 128, 256, 512, 1024

Typical range of values: 1 ≤ Height Height Height Height Height height ≤ 1024 (lin)

Minimum increment: 1

Recommended increment: 10

Restriction: Height >= 1

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)
disp_image(GridSobel,WindowHandle)

Example (C)

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);
disp_image(GridSobel,WindowHandle);

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)
disp_image(GridSobel,WindowHandle)

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)
disp_image(GridSobel,WindowHandle)

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)
disp_image(GridSobel,WindowHandle)

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)
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_regiongen_grid_regionGenGridRegiongen_grid_regionGenGridRegionGenGridRegion 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'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">).

Possible Successors

reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain, paint_regionpaint_regionPaintRegionpaint_regionPaintRegionPaintRegion

Alternatives

gen_region_linegen_region_lineGenRegionLinegen_region_lineGenRegionLineGenRegionLine, gen_region_polygongen_region_polygonGenRegionPolygongen_region_polygonGenRegionPolygonGenRegionPolygon, gen_region_pointsgen_region_pointsGenRegionPointsgen_region_pointsGenRegionPointsGenRegionPoints, gen_region_runsgen_region_runsGenRegionRunsgen_region_runsGenRegionRunsGenRegionRuns

See also

gen_checker_regiongen_checker_regionGenCheckerRegiongen_checker_regionGenCheckerRegionGenCheckerRegion, reduce_domainreduce_domainReduceDomainreduce_domainReduceDomainReduceDomain

Module

Foundation


ClassesClassesClassesClasses | | | | Operators