prune_branches

prune_branches(skel, branch_points=None, iterations=1)[source]

Removes all dangling ends or tails of a skeleton.

Parameters
  • skel (ND-array) – A image of a full or partial skeleton from which the tails should be trimmed.

  • branch_points (ND-array, 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.

Returns

An ND-array containing the skeleton with tails removed.

Return type

array

Examples

Click here to view online example.