skshapes.images.filters.frangi_filter
- skshapes.images.filters.frangi_filter(image, alpha=0.2, beta=0.5, gamma=0.5, smoothing=1.0)
Computes the Frangi mask of the input image, following ‘Frangi, A. F., Niessen, W. J., Vincken, K. L., & Viergever, M. A. (1998). Multiscale vessel enhancement filtering.’
At each voxel, given l1, l2, l3 the absolute value of the tree eigenvalues of hessian image at this pixel (in increasing value), the method first computes the following parameters:
ra = l1 / sqrt(l2 * l3), rb = l2 / l3, s = sqrt(l1**2 + l2**2 + l3**2).
Then, the vesselness value is defined as:
vesselness_value = (1 - exp(- ra**2 / (2 * alpha ** 2))) * exp(- rb**2 / (2 * beta ** 2)) * (1 - exp(- s**2 / (2 * gamma ** 2)))
A thresholding is finally performed to only retain the voxels with the largest vesselness value. In practice, we use an Otsu thresholding to choose the threshold.
- Parameters:
image (
SparseImage) – The image to compute the mask from.alpha (
float) – Selectivity parameter for circular structuresbeta (
float) – Selectivity parameter for elongate structures.gamma (
float) – Selectivity parameter for foreground voxels.smoothing (
float) – Radius for the gaussian blur performed as preprocessing of the Frangi method.
- Return type: