locan.data.hulls.alpha_shape.AlphaShape#

class locan.data.hulls.alpha_shape.AlphaShape(alpha, points=None, alpha_complex=None, delaunay=None)[source]#

Bases: object

Class for the alpha shape of points for a specific alpha value.

Here the alpha complex is the simplicial subcomplex of the Delaunay triangulation for a given alpha value. The alpha shape is the union of all simplexes of the alpha complex, specified by the boundary points of the alpha complex.

In order to update an existing AlphaShape object to a different alpha reset AlphaShape.alpha.

Parameters:
  • alpha (float) – Alpha parameter specifying a unique alpha complex.

  • points (npt.ArrayLike | None) – Coordinates of input points with shape (npoints, ndim). Either points or alpha_complex have to be specified but not both.

  • alpha_complex (AlphaComplex | None) – The unfiltered alpha complex with computed interval values.

  • delaunay (scipy.spatial.Delaunay | None) – Object with attribute simplices specifying a list of indices in the array of points that define the simplexes in the Delaunay triangulation. Also, an attribute neighbor is required that specifies indices of neighboring simplices. If None, scipy.stat.Delaunay(points) is computed.

Variables:
  • alpha_complex (AlphaComplex) – The unfiltered alpha complex with computed interval values.

  • alpha_shape (npt.NDArray) – The list of k-simplices (edges) from the alpha complex that make up the alpha shape. Or: Simplicial subcomplex of the Delaunay triangulation with regular simplices from the alpha complex.

  • region (Region) – Region object.

  • connected_components (list[Region]) – Connected components, i.e. a list of the individual unconnected polygons that together make up the alpha shape.

  • dimension (int) – Spatial dimension of the hull as determined from the dimension of points

  • vertices (npt.NDArray) – Coordinates of points that make up the hull with shape (n_points, 2). (regular alpha_shape line-simplices).

  • vertex_indices (list[int]) – Indices identifying a polygon of all points that make up the hull (regular alpha_shape line-simplices).

  • vertices_alpha_shape (npt.NDArray) – Coordinates of points with shape (n_points, 2) that make up the interior and boundary of the hull (regular, singular and interior alpha_shape line-simplices).

  • vertex_alpha_shape_indices (list[int]) – Indices to all points that make up the interior and boundary of the hull. (regular, singular and interior alpha_shape line-simplices).

  • vertices_connected_components_indices (list[list[int]]) – Indices to the points for each connected component of the alpha shape.

  • n_points_on_boundary (float) – The number of points on the hull (regular and singular alpha_shape simplices).

  • n_points_on_boundary_rel (float) – The number of points on the hull (regular and singular alpha_shape simplices) relative to all alpha_shape points.

  • n_points_alpha_shape (int) – Absolute number of points that are part of the alpha_shape (regular, singular and interior alpha_shape simplices).

  • n_points_alpha_shape_rel (int) – Absolute number of points that are part of the alpha_shape relative to all input points (regular, singular and interior alpha_shape simplices).

  • region_measure (float) – Hull measure, i.e. area or volume.

  • subregion_measure (float) – Measure of the sub-dimensional region, i.e. circumference or surface.

Methods

__init__(alpha[, points, alpha_complex, ...])

Attributes

property alpha: float#
property alpha_shape: list[list[int]]#
property connected_components: list[Region]#
property region: Region#
property vertex_alpha_shape_indices: list[int]#
property vertex_indices: list[int]#
property vertices: ndarray[Any, dtype[float64]]#
property vertices_alpha_shape: ndarray[Any, dtype[float64]]#
property vertices_connected_components_indices: list[list[int]]#