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

Create an image from the edges of a Voronoi tessellation.

  • 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).


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

Return type



Click here to view online example.