select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial (Operator)
Name
select_region_spatialT_select_region_spatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial — Ermitteln der Lagebeziehung von Regionen.
Signatur
void SelectRegionSpatial(const HObject& Regions1, const HObject& Regions2, const HTuple& Direction, HTuple* RegionIndex1, HTuple* RegionIndex2)
HTuple HRegion::SelectRegionSpatial(const HRegion& Regions2, const HString& Direction, HTuple* RegionIndex2) const
HTuple HRegion::SelectRegionSpatial(const HRegion& Regions2, const char* Direction, HTuple* RegionIndex2) const
HTuple HRegion::SelectRegionSpatial(const HRegion& Regions2, const wchar_t* Direction, HTuple* RegionIndex2) const
(Nur Windows)
Beschreibung
select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial wählt die Regionen aus Regions2Regions2Regions2Regions2regions2regions_2 aus, die
der Nachbarschaftsbeziehung DirectionDirectionDirectionDirectiondirectiondirection genügen.
Die zu untersuchenden Regionen sind in Regions1Regions1Regions1Regions1regions1regions_1 bzw.
Regions2Regions2Regions2Regions2regions2regions_2 zu übergeben. Regions1Regions1Regions1Regions1regions1regions_1 kann dabei auf
drei verschiedene Arten besetzt werden:
Mögliche Werte für DirectionDirectionDirectionDirectiondirectiondirection sind:
- 'left'"left""left""left""left""left":
Regions2Regions2Regions2Regions2regions2regions_2 ist links von
Regions1Regions1Regions1Regions1regions1regions_1
- 'right'"right""right""right""right""right":
Regions2Regions2Regions2Regions2regions2regions_2 ist rechts von
Regions1Regions1Regions1Regions1regions1regions_1
- 'above'"above""above""above""above""above":
Regions2Regions2Regions2Regions2regions2regions_2 ist oberhalb von
Regions1Regions1Regions1Regions1regions1regions_1
- 'below'"below""below""below""below""below":
Regions2Regions2Regions2Regions2regions2regions_2 ist unterhalb von
Regions1Regions1Regions1Regions1regions1regions_1
select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial berechnet die Schwerpunkte der zu vergleichenden
Regionen und entscheidet anhand des Winkels zwischen der Schwerpunktgeraden
und der x-Achse, ob die Richtungsbeziehung erfüllt ist.
Die Relation ist jeweils in dem Bereich von -45 Grad bis +45 Grad
um die Koordinatenachsen erfüllt.
Die Richtungsrelation ist also so zu verstehen, dass der Schwerpunkt
der zweiten Region links (bzw. rechts, oben, unten) vom
Schwerpunkt der ersten Region liegen muss.
Die Indizes der Regionen, die die Richtungsbeziehung erfüllen, stehen
an n-ter Position in RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1 und RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2,
d.h. die Region mit Index RegionIndex2RegionIndex2RegionIndex2RegionIndex2regionIndex2region_index_2[n] steht mit Region mit
Index RegionIndex1RegionIndex1RegionIndex1RegionIndex1regionIndex1region_index_1[n] in der angegebenen Relation.
Der Zugriff auf Regionen über den Index kann mit copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj
erfolgen.
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
Regions1Regions1Regions1Regions1regions1regions_1 (input_object) region(-array) → objectHRegionHObjectHRegionHobject
Ausgangsregionen
Regions2Regions2Regions2Regions2regions2regions_2 (input_object) region(-array) → objectHRegionHObjectHRegionHobject
Vergleichsregionen
DirectionDirectionDirectionDirectiondirectiondirection (input_control) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Gewünschte Nachbarschaftsbeziehung.
Defaultwert:
'left'
"left"
"left"
"left"
"left"
"left"
Werteliste: 'above'"above""above""above""above""above", 'below'"below""below""below""below""below", 'left'"left""left""left""left""left", 'right'"right""right""right""right""right"
Ergebnis
select_region_spatialselect_region_spatialSelectRegionSpatialSelectRegionSpatialSelectRegionSpatialselect_region_spatial liefert den Wert 2 (H_MSG_TRUE), falls Regions2Regions2Regions2Regions2regions2regions_2
nicht leer ist. Das Verhalten bei
leerem Parameter Regions2Regions2Regions2Regions2regions2regions_2 (keine Eingaberegionen vorhanden)
lässt sich mittels set_system('no_object_result',<Result>)set_system("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)SetSystem("no_object_result",<Result>)set_system("no_object_result",<Result>)
festlegen. Das Verhalten bei einer leeren Region (Region ist die leere Menge)
wird mit set_system('empty_region_result',<Result>)set_system("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)SetSystem("empty_region_result",<Result>)set_system("empty_region_result",<Result>) bestimmt.
Gegebenenfalls wird eine Fehlerbehandlung durchgeführt.
Vorgänger
thresholdthresholdThresholdThresholdThresholdthreshold,
regiongrowingregiongrowingRegiongrowingRegiongrowingRegiongrowingregiongrowing,
connectionconnectionConnectionConnectionConnectionconnection
Alternativen
area_centerarea_centerAreaCenterAreaCenterAreaCenterarea_center,
intersectionintersectionIntersectionIntersectionIntersectionintersection
Siehe auch
spatial_relationspatial_relationSpatialRelationSpatialRelationSpatialRelationspatial_relation,
find_neighborsfind_neighborsFindNeighborsFindNeighborsFindNeighborsfind_neighbors,
copy_objcopy_objCopyObjCopyObjCopyObjcopy_obj,
obj_to_integerobj_to_integerObjToIntegerObjToIntegerObjToIntegerobj_to_integer
Modul
Foundation