It would be great to implement the skimage.filters.sato filter in pyclesperanto.
the filter takes an image and a range of sigmas (by default range(1,10,2))
It then calculates the hessian matrix eigenvalues for each sigma in descending order. For each sigma, it computes normalized tubeness (eqs. (9) and (22), ref. [1]_) as the geometric mean of eigvals other than the lowest one, clipped to 0, multiplied by sigma^2. Then it returns the maximum tubeness from all the different sigmas for each pixel (->source.
Could we try to implement this using cle.hessian_eigenvalues()?
cle.hessian_eigenvalues() does not support a sigma parameter. Can we circumvent this by scaling the image according to the sigma before calculating the eigenvalues?
roughly like this:
tubeness = cle.zeros_like(image)
for sigma in sigmas:
blurred = cle.gaussian_blur(image, sigma_z=sigma/2, sigma_y=sigma/2, sigma_x=sigma/2)
cle.scale(blurred, scale_z=1/sigma,scale_y=1/sigma,scale_x=1/sigma)
# calculate geometric mean of middle and large eigenvalues returned by cle.hessian_eigenvalues(),
# clip to 0 and multiply by sigma ** 2
mean_eigenvalues = ...
mean_eigenvalues = cle.scale(mean_eigenvalues, scale=sigma)
tubeness = cle.max_images(mean_eigenvalues, tubeness)
return tubeness
do we do the gaussian blur with sigma/2 or do we scale by 1/(sigma * 2)?
It would be great to implement the skimage.filters.sato filter in pyclesperanto.
the filter takes an image and a range of sigmas (by default
range(1,10,2)
) It then calculates the hessian matrix eigenvalues for each sigma in descending order. For each sigma, it computes normalized tubeness (eqs. (9) and (22), ref. [1]_) as the geometric mean of eigvals other than the lowest one, clipped to 0, multiplied by sigma^2. Then it returns the maximum tubeness from all the different sigmas for each pixel (->source.Could we try to implement this using
cle.hessian_eigenvalues()
? cle.hessian_eigenvalues() does not support a sigma parameter. Can we circumvent this by scaling the image according to the sigma before calculating the eigenvalues?roughly like this:
do we do the gaussian blur with sigma/2 or do we scale by 1/(sigma * 2)?