-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support sampling
kwarg for distance_transform_edt
(take pixel/voxel sizes into account)
#407
Support sampling
kwarg for distance_transform_edt
(take pixel/voxel sizes into account)
#407
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @grlee77 ! Looks good to me.
support user-provided output arrays for distances and indices arrays
avoid duplicate shape/dtype checking code
@gigony, I added two commits here after your prior review. These were to support the remaining two keyword arguments allowing the user to specify a pre-allocated output array for |
@gpucibot merge |
related to #419 These are based on the distance transform and are a faster way of computing binary morphological operations for large diameter disk or ball footprints. Unlike the sequence footprint decomposition methods, the footprint is exactly circular (spherical). One test case `test_isotropic_erosion_spacing` will require #407 to be merged first. #406 will also improve the performance of this implementation Authors: - Gregory Lee (https://github.com/grlee77) Approvers: - Gigon Bae (https://github.com/gigony) URL: #421
Please review/merge #406 before this one as those changes are also present here.
This PR adds support for anisotropic pixel/voxel shape to
distance_transform_edt
via thesampling
kwarg. The changes involve just making variants of the kernels involving distance computations that do floating-point instead of integer-valued computations so that scaling by the sample spacings can be taken into account.