locan.data.regions.region.RegionND¶
- class locan.data.regions.region.RegionND[source]¶
Bases:
RegionAbstract Region class to define the interface for n-dimensional Region classes.
Methods
__init__()buffer(distance, **kwargs)Extend the region perpendicular by a distance.
contains(points)Return list of indices for all points that are inside the region of interest.
from_intervals(intervals)Constructor for instantiating a line or axis-oriented, box-like Region from list of (min, max) bounds.
intersection(other)Returns a region representing the intersection of this region with
other.symmetric_difference(other)Returns the union of the two regions minus any areas contained in the intersection of the two regions.
union(other)Returns a region representing the union of this region with
other.Attributes
bounding_boxA region describing the minimum axis-aligned bounding box that encloses the original region.
boundsRegion bounds min_x, min_y, ..., max_x, max_y, .
centroidPoint coordinates for region centroid.
dimensionThe region dimension.
elongationA measure between 0 and 1 for how elongated the object is.
extentThe extent (max_x - min_x), (max_y - min_y), .
intervalsProvide bounds in a tuple (min, max) arrangement.
max_distanceThe maximum distance between any two points within the region.
radial_distanceAverage of all absolute distances between vertices and centroid.
region_measureRegion measure, i.e. area (for 2d) or volume (for 3d).
subregion_measureMeasure of the sub-dimensional region, i.e. perimeter length (for 2d) or surface area (for 3d).
vertices0 - dimensional elements that define the region; also called points.
- intersection(other)[source]¶
Returns a region representing the intersection of this region with
other.