porespy.filters.find_invalid_pores#

porespy.filters.find_invalid_pores(im: numpy.typing.NDArray, axis=None, conn: Literal['max', 'min'] = 'min')#

Finds invalid pores which are either closed or do not span the domain

Parameters:
  • im (ndarray) – A boolean array with True indicating the phase of interest

  • axis (int) – The direction which defines the surfaces of interest. By default all directions are considered.

  • conn (str) – Can be either ‘min’ or ‘max’ and controls the shape of the structuring element used to determine voxel connectivity. The default if ‘min’ which imposes the strictest criteria, so that voxels must share a face to be considered connected.

Returns:

invalid – An array containing 1 indicating closed pores and 2 indicating surface-connected nonpercolating pores, including tunnels with multiple boundary openings. Solid voxels and percolating pores are 0.

Return type:

ndarray

Notes

Unlike find_surface_pores, this function includes nonpercolating clusters with multiple boundary openings, so fill_invalid_pores removes all pores that do not span the domain along the requested axes.

Examples

Click here to view online example.