Skip to content

Commit

Permalink
Merge pull request #534 from ANTsX/interpolation-docs
Browse files Browse the repository at this point in the history
make interpolation case-insensitive
  • Loading branch information
Nick Cullen authored Feb 15, 2024
2 parents d61c5f9 + 31bca18 commit 445c7f5
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 445c7f5

Please sign in to comment.