skshapes.images.filters.skeletonize

skshapes.images.filters.skeletonize(mask)

Computes a 1-voxel wide skeletonized mask of the input mask, following the method of ‘Palágyi, K., & Kuba, A. (1998). A 3D 6-subiteration thinning algorithm for extracting medial lines.’

At each iteration of the algorithm, the thinning is performed in one of the six oriented 3D directions. The bounding pixels from this directions are candidates for deletion. If the neighborhood of a candidate falls in one of the valid patterns, the pixel is deleted. The procedure continues until no more pixel can be deleted.

Parameters:

mask (Mask) – The input mask to perform the skeletonization on.

Returns:

The skeletonized mask.

Return type:

Mask