blobs

blobs(shape: List[int], porosity: float = 0.5, blobiness: int = 1, divs: int = 1)[source]

Generates an image containing amorphous blobs

Parameters
  • shape (list) – The size of the image to generate in [Nx, Ny, Nz] where N is the number of voxels

  • porosity (float) – If specified, this will threshold the image to the specified value prior to returning. If None is specified, then the scalar noise field is converted to a uniform distribution and returned without thresholding.

  • blobiness (int or list of ints(default = 1)) – Controls the morphology of the blobs. A higher number results in a larger number of small blobs. If a list is supplied then the blobs are anisotropic.

  • divs (int or array_like) – The number of times to divide the image for parallel processing. If 1 then parallel processing does not occur. 2 is equivalent to [2, 2, 2] for a 3D image. The number of cores used is specified in porespy.settings.ncores and defaults to all cores.

Returns

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

Return type

ND-array

See also

norm_to_uniform

Examples

Click here to view online example.