Skip to content

Commit

Permalink
make interpolation case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed Feb 15, 2024
1 parent 5ec8195 commit 31bca18
Showing 1 changed file with 24 additions and 2 deletions.
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

0 comments on commit 31bca18

Please sign in to comment.