skshapes.images.filters.signed_distance_transform
- skshapes.images.filters.signed_distance_transform(mask, dilation=0, maximum_radius=10)
Computes the signed distance transform of the input mask.
The algorithm uses the fact that vessels have a small radius to compute the distance transform using a brute force approach.
- Parameters:
mask (
Mask) – The input mask on which the signed distance transform will be computed.dilation (
int) – The maximum distance of outside pixels for which the signed distance should be computed.maximum_radius (
int) – The maximum radius of a vessel in the image. The distance transform of inside pixels whose distance is greater than this radius will be set to maximum_radius.
- Returns:
The signed distance transform of the input mask.
- Return type:
MaskedImageData
Notes
The positive (resp. negative) radius values are decreased (resp. increased) by 0.5.