voronoi_edges

voronoi_edges(shape: List[int], r: int, ncells: int, flat_faces: bool = True)[source]

Create an image from the edges of a Voronoi tessellation.

Parameters
  • shape (array_like) – The size of the image to generate in [Nx, Ny, Nz] where Ni is the number of voxels in each direction.

  • radius (int) – The radius to which Voronoi edges should be dilated in the final image.

  • ncells (int) – The number of Voronoi cells to include in the tesselation.

  • flat_faces (bool) – Whether the Voronoi edges should lie on the boundary of the image (True), or if edges outside the image should be removed (False).

Returns

image – A boolean array with True values denoting the pore space

Return type

ndarray

Examples

Click here to view online example.