gen_grid_regiongen_grid_regionGenGridRegionGenGridRegiongen_grid_region (Operator)

Name

gen_grid_regiongen_grid_regionGenGridRegionGenGridRegiongen_grid_region — Erzeugen einer Region aus Linien oder Punkten.

Signatur

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)

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 HRegion::GenGridRegion(Hlong RowSteps, Hlong ColumnSteps, const wchar_t* Type, Hlong Width, Hlong Height)   (Nur Windows)

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)

def gen_grid_region(row_steps: Union[float, int], column_steps: Union[float, int], type: str, width: int, height: int) -> HObject

Beschreibung

gen_grid_regiongen_grid_regionGenGridRegionGenGridRegionGenGridRegiongen_grid_region erzeugt ein Raster, das aus Linien (TypeTypeTypeTypetypetype = 'lines') oder Punkten (TypeTypeTypeTypetypetype = 'points') aufgebaut ist. Bei 'lines' werden durchgezogene Linien bei 'points' nur die Schnittpunkte der Linien ausgegeben. Ausgehend von dem Punkt (0,0) bis zum Punkt (HeightHeightHeightHeightheightheight-1,WidthWidthWidthWidthwidthwidth-1) wird das Raster in der Schrittweite RowStepsRowStepsRowStepsRowStepsrowStepsrow_steps in Zeilenrichtung und ColumnStepsColumnStepsColumnStepsColumnStepscolumnStepscolumn_steps in Spaltenrichtung aufgebaut. Die Schrittweiten müssen größer als 1 sein. Ausnahmen sind im Modus 'lines', in dem RowStepsRowStepsRowStepsRowStepsrowStepsrow_steps bzw. ColumnStepsColumnStepsColumnStepsColumnStepscolumnStepscolumn_steps auf 0 gesetzt werden kann. In diesem Fall werden nur Spalten bzw. Zeilen erzeugt.

Achtung

Wird das Muster sehr klein gewählt (RowStepsRowStepsRowStepsRowStepsrowStepsrow_steps < 4 or ColumnStepsColumnStepsColumnStepsColumnStepscolumnStepscolumn_steps < 4), so benötigt die erzeugte Region viel Speicher.

Im Modus 'points' dürfen RowStepsRowStepsRowStepsRowStepsrowStepsrow_steps und ColumnStepsColumnStepsColumnStepsColumnStepscolumnStepscolumn_steps nicht auf 0 gesetzt werden.

Ausführungsinformationen

Parameter

RegionGridRegionGridRegionGridRegionGridregionGridregion_grid (output_object)  region objectHRegionHObjectHRegionHobject *

Erzeugte Linien/Punkte-Region.

RowStepsRowStepsRowStepsRowStepsrowStepsrow_steps (input_control)  extent.y HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Schrittweite in Zeilenrichtung oder Null.

Defaultwert: 10

Wertevorschläge: 0, 2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 100

Typischer Wertebereich: RowSteps RowSteps RowSteps RowSteps rowSteps row_steps (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

Restriktion: RowSteps > 1 || RowSteps == 0

ColumnStepsColumnStepsColumnStepsColumnStepscolumnStepscolumn_steps (input_control)  extent.x HTupleUnion[float, int]HTupleHtuple (integer / real) (int / long / double) (Hlong / double) (Hlong / double)

Schrittweite in Spaltenrichtung oder Null.

Defaultwert: 10

Wertevorschläge: 0, 2, 3, 4, 5, 7, 10, 15, 20, 30, 50, 100

Typischer Wertebereich: ColumnSteps ColumnSteps ColumnSteps ColumnSteps columnSteps column_steps (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

Restriktion: ColumnSteps > 1 || ColumnSteps == 0

TypeTypeTypeTypetypetype (input_control)  string HTuplestrHTupleHtuple (string) (string) (HString) (char*)

Art des erzeugten Musters.

Defaultwert: 'lines' "lines" "lines" "lines" "lines" "lines"

Werteliste: 'lines'"lines""lines""lines""lines""lines", 'points'"points""points""points""points""points"

WidthWidthWidthWidthwidthwidth (input_control)  extent.x HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximale Breite des Musters.

Defaultwert: 512

Wertevorschläge: 128, 256, 512, 1024

Typischer Wertebereich: 1 ≤ Width Width Width Width width width (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

HeightHeightHeightHeightheightheight (input_control)  extent.y HTupleintHTupleHtuple (integer) (int / long) (Hlong) (Hlong)

Maximale Höhe des Musters.

Defaultwert: 512

Wertevorschläge: 128, 256, 512, 1024

Typischer Wertebereich: 1 ≤ Height Height Height Height height height (lin)

Minimale Schrittweite: 1

Empfohlene Schrittweite: 10

Beispiel (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)

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

Beispiel (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)

Beispiel (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)

Beispiel (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)

Komplexität

Der benötigte Speicher (in Byte) für die Region ist:

O((ImageWidth / ColumnSteps) * (ImageHeight / RowSteps))

Ergebnis

Sind die Parameterwerte korrekt, dann liefert gen_grid_regiongen_grid_regionGenGridRegionGenGridRegionGenGridRegiongen_grid_region den Wert 2 (H_MSG_TRUE). Andernfalls wird eine Fehlerbehandlung durchgeführt. Das Clipping am aktuellen Bildformat wird durch set_system('clip_region',<'true'/'false'>)set_system("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)SetSystem("clip_region",<"true"/"false">)set_system("clip_region",<"true"/"false">) festgelegt.

Nachfolger

reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain, paint_regionpaint_regionPaintRegionPaintRegionPaintRegionpaint_region

Alternativen

gen_region_linegen_region_lineGenRegionLineGenRegionLineGenRegionLinegen_region_line, gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygongen_region_polygon, gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPointsgen_region_points, gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRunsgen_region_runs

Siehe auch

gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegionGenCheckerRegiongen_checker_region, reduce_domainreduce_domainReduceDomainReduceDomainReduceDomainreduce_domain

Modul

Foundation