You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The current implementation of Hausdorff distance and other surface distance metrics only works for images with isotropic spacing.
Describe the solution you'd like
Consider adding a new parameter spacing to the metric call in order to pass it as sampling=spacing to both distance_transform_edt and distance_transform_cdt functions inside the get_surface_distance function (
Fixes#6137 .
### Description
A user can now pass a `spacing` parameter to surface distance metrics
(Hausdorff distance, surface distance, surface dice), so that correct
results can be obtained for images with non-isotropic spacing (e.g.
(0.5, 0.5, 2) mm).
If `spacing` is a sequence, it must be of length equal to the image
dimensions; if a single number, this spacing is used for all axes. If
``None``, spacing of unity is used. Defaults to ``None``so that current
behaviour is preserved.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [x] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [x] In-line docstrings updated.
- [x] Documentation updated, tested `make html` command in the `docs/`
folder.
---------
Signed-off-by: gasperp <[email protected]>
Is your feature request related to a problem? Please describe.
The current implementation of Hausdorff distance and other surface distance metrics only works for images with isotropic spacing.
Describe the solution you'd like
Consider adding a new parameter
spacing
to the metric call in order to pass it assampling=spacing
to bothdistance_transform_edt
anddistance_transform_cdt
functions inside theget_surface_distance function
(MONAI/monai/metrics/utils.py
Line 175 in a8302ec
The same is done in DeepMind's implementation (https://github.com/deepmind/surface-distance/blob/master/surface_distance/metrics.py#L254).
The text was updated successfully, but these errors were encountered: