porespy.filters.prune_branches#
- porespy.filters.prune_branches(skel: numpy.typing.NDArray, branch_points=None, iterations: int = 1)#
Remove all dangling ends or tails of a skeleton
- Parameters:
skel (ndarray) – A image of a full or partial skeleton from which the tails should be trimmed.
branch_points (ndarray, optional) – An image the same size skel with True values indicating the branch points of the skeleton. If this is not provided it is calculated automatically.
iterations (int) – The number of times to recursively repeat the process. The default is 1.
- Returns:
An ndarray containing the skeleton with tails removed.
- Return type:
array
Examples
Click here to view online example.