porespy.filters.find_disconnected_voxels#
- porespy.filters.find_disconnected_voxels(im: numpy.typing.NDArray, inlets: numpy.typing.NDArray = None, conn: Literal['min', 'max'] = 'max')#
Identifies all voxels that are not connected to specified inlets
- Parameters:
im (ndarray) – A Boolean image, with True values indicating the phase for which disconnected voxels are sought.
inlets (ndarray or tuple of indices) – The locations of the inlets. Can either be a boolean mask the same shape as im, or a tuple of indices such as that returned by the np.where function. Any voxels not connected directly to the inlets will be trimmed.
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:
image – An ndarray the same size as im, with True values indicating voxels of the phase of interest that are not connected to the given inlets.
- Return type:
ndarray
See also
Examples
Click here to view online example.