ibip#

ibip(im, inlets=None, dt=None, maxiter=10000)[source]#

Performs invasion percolation on given image using iterative image dilation

Parameters:
  • im (ND-array) – Boolean array with True values indicating void voxels

  • inlets (ND-array) – Boolean array with True values indicating where the invading fluid is injected from. If None, all faces will be used.

  • dt (ND-array (optional)) – The distance transform of im. If not provided it will be calculated, so supplying it saves time.

  • maxiter (scalar) – The number of steps to apply before stopping. The default is to run for 10,000 steps which is almost certain to reach completion if the image is smaller than about 250-cubed.

Returns:

results – A custom object with the following two arrays as attributes:

’inv_sequence’

An ndarray the same shape as im with each voxel labelled by the sequence at which it was invaded.

’inv_size’

An ndarray the same shape as im with each voxel labelled by the inv_size at which was filled.

Return type:

Results object

See also

porosimetry

Examples

Click here to view online example.