gen_grid_regiongen_grid_regionGenGridRegionGenGridRegion (Operator)
Name
gen_grid_regiongen_grid_regionGenGridRegionGenGridRegion
— Erzeugen einer Region aus Linien oder Punkten.
Signatur
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)
Beschreibung
gen_grid_regiongen_grid_regionGenGridRegionGenGridRegionGenGridRegion
erzeugt ein Raster,
das aus Linien (TypeTypeTypeTypetype
= 'lines') oder
Punkten (TypeTypeTypeTypetype
= '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
(HeightHeightHeightHeightheight
-1,WidthWidthWidthWidthwidth
-1) wird das Raster in der
Schrittweite RowStepsRowStepsRowStepsRowStepsrowSteps
in Zeilenrichtung und
ColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps
in Spaltenrichtung aufgebaut.
Die Schrittweiten müssen grösser als 1 sein.
Ausnahmen sind im Modus 'lines', in dem RowStepsRowStepsRowStepsRowStepsrowSteps
bzw.
ColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps
auf 0 gesetzt werden kann.
In diesem Fall werden nur Spalten bzw. Zeilen erzeugt.
Achtung
Wird das Muster sehr klein gewählt
(RowStepsRowStepsRowStepsRowStepsrowSteps
< 4 or ColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps
< 4), so benötigt die erzeugte Region viel Speicher.
Im Modus 'points' dürfen RowStepsRowStepsRowStepsRowStepsrowSteps
und ColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps
nicht auf 0 gesetzt werden.
Ausführungsinformationen
- Multithreading-Typ: reentrant (läuft parallel zu nicht-exklusiven Operatoren).
- Multithreading-Bereich: global (kann von jedem Thread aufgerufen werden).
- Wird ohne Parallelisierung verarbeitet.
Parameter
RegionGridRegionGridRegionGridRegionGridregionGrid
(output_object) region →
objectHRegionHRegionHobject *
Erzeugte Linien/Punkte-Region.
RowStepsRowStepsRowStepsRowStepsrowSteps
(input_control) extent.y →
HTupleHTupleHtuple (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: 0
≤
RowSteps
RowSteps
RowSteps
RowSteps
rowSteps
≤
512
(lin)
Minimale Schrittweite: 1
Empfohlene Schrittweite: 10
Restriktion: RowSteps > 1 || RowSteps == 0
ColumnStepsColumnStepsColumnStepsColumnStepscolumnSteps
(input_control) extent.x →
HTupleHTupleHtuple (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: 0
≤
ColumnSteps
ColumnSteps
ColumnSteps
ColumnSteps
columnSteps
≤
512
(lin)
Minimale Schrittweite: 1
Empfohlene Schrittweite: 10
Restriktion: ColumnSteps > 1 || ColumnSteps == 0
TypeTypeTypeTypetype
(input_control) string →
HTupleHTupleHtuple (string) (string) (HString) (char*)
Art des erzeugten Musters.
Defaultwert:
'lines'
"lines"
"lines"
"lines"
"lines"
Werteliste: 'lines'"lines""lines""lines""lines", 'points'"points""points""points""points"
WidthWidthWidthWidthwidth
(input_control) extent.x →
HTupleHTupleHtuple (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
≤
1024
(lin)
Minimale Schrittweite: 1
Empfohlene Schrittweite: 10
Restriktion: Width >= 1
HeightHeightHeightHeightheight
(input_control) extent.y →
HTupleHTupleHtuple (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
≤
1024
(lin)
Minimale Schrittweite: 1
Empfohlene Schrittweite: 10
Restriktion: Height >= 1
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_regionGenGridRegionGenGridRegionGenGridRegion
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">)
festgelegt.
Nachfolger
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain
,
paint_regionpaint_regionPaintRegionPaintRegionPaintRegion
Alternativen
gen_region_linegen_region_lineGenRegionLineGenRegionLineGenRegionLine
,
gen_region_polygongen_region_polygonGenRegionPolygonGenRegionPolygonGenRegionPolygon
,
gen_region_pointsgen_region_pointsGenRegionPointsGenRegionPointsGenRegionPoints
,
gen_region_runsgen_region_runsGenRegionRunsGenRegionRunsGenRegionRuns
Siehe auch
gen_checker_regiongen_checker_regionGenCheckerRegionGenCheckerRegionGenCheckerRegion
,
reduce_domainreduce_domainReduceDomainReduceDomainReduceDomain
Modul
Foundation