Search direct neighbours.
The operator neighbour determines neighbouring regions with Regions1and Regions2 conatining the regions to be examined. Regions1 can have three different states:
- Regions1 is empty: In this case all regions in Regions2 are permutatively checked for neighbourhood. - Regions1 consists of one region: The regions of Regions1 are compared to all regions in Regions2. - Regions1 consists of the same number of regions as Regions2: In this case all regions in the n-th position in Regions1 and Regions2 are checked for a neighbouring relation.The operator neighbour uses the 4- or 8-neighbourhood, respectively (see set_system(::'neighbourhood',<4/8>:)). Neighbouring regions are located at the n-th position in RegionIndex1 and RegionIndex2, i.e. the region with index RegionIndex1[n] from Regions1 is the neighbour of the region with index RegionIndex2[n] from Regions2.
Covered regions are not found!
Regions1 (input_object) |
region(-array) -> object |
Starting regions |
Regions2 (input_object) |
region(-array) -> object |
Comparative regions |
RegionIndex1 (output_control) |
integer-array -> integer |
Indices of the found regions from Regions1. |
RegionIndex2 (output_control) |
integer-array -> integer |
Indices of the found regions from Regions2. |
The operator neighbour returns the value TRUE if the input is not empty. The behavior in case of empty input (no input regions available) is set via the operator set_system(::'no_object_result',<Result>:). The behavior in case of empty region (the region is the empty set) is set via set_system(::'empty_region_result',<Result>:). If necessary an exception is raised.
threshold__, regiongrowing__, connection
direction1, direction2, set_system, expand, interjacent, boundary