Skip to content
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

make interpolation case-insensitive #534

Merged
merged 1 commit into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions ants/core/ants_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,17 @@ def apply_to_image(self, image, reference=None, interpolation='linear'):
target space for transforming image

interpolation : string
type of interpolation to use
type of interpolation to use. Options are:
linear
nearestneighbor
multilabel
gaussian
bspline
cosinewindowedsinc
welchwindowedsinc
hammingwindoweddinc
lanczoswindowedsinc
genericlabel

Returns
-------
Expand All @@ -171,6 +181,8 @@ def apply_to_image(self, image, reference=None, interpolation='linear'):
"""
if reference is None:
reference = image.clone()

interpolation = interpolation.lower()

tform_fn = utils.get_lib_fn('transformImage%s%s' % (self._libsuffix, image._libsuffix))
reference = reference.clone(image.pixeltype)
Expand Down Expand Up @@ -317,7 +329,17 @@ def apply_ants_transform_to_image(transform, image, reference, interpolation='li
reference image

interpolation : string
type of interpolation to use
type of interpolation to use. Options are:
linear
nearestneighbor
multilabel
gaussian
bspline
cosinewindowedsinc
welchwindowedsinc
hammingwindoweddinc
lanczoswindowedsinc
genericlabel

Returns
-------
Expand Down