porespy.filters.trim_small_clusters#
- porespy.filters.trim_small_clusters(im: numpy.typing.NDArray, min_size: int = 1)#
Removes clusters voxel of a given size or smaller
- Parameters:
im (ndarray) – The binary image from which voxels are to be removed.
min_size (scalar) – The threshold size of clusters to trim. As clusters with this many voxels or fewer will be trimmed. The default is 1 so only single voxels are removed.
- Returns:
im – A copy of im with clusters of voxels smaller than the given size removed.
- Return type:
ndarray
Examples
Click here to view online example.