porespy.filters.find_surface_pores#
- porespy.filters.find_surface_pores(im: numpy.typing.NDArray, axis: int = None, conn: Literal['max', 'min'] = 'min')#
Finds pores with one connected opening on the image boundary
- 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:
surface – A array containing boolean values indicating voxels which belong to surface pores.
- Return type:
ndarray
Notes
A surface pore has exactly one connected component when restricted to the exterior faces of the image, and does not span opposite faces along any of the requested axes. The same connectivity is used in the full image and on its boundary. This allows a single opening to wrap around an edge or corner. A tunnel with separate openings is not a surface pore, even if its openings lie on adjacent faces or on the same face. Closed pores are also excluded.
All exterior faces are used to count openings. The
axisargument only controls which directions are checked for spanning paths.Examples
Click here to view online example.