Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dyollb committed Nov 9, 2024
1 parent e4f5327 commit fdaee69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ants/utils/sitk_to_ants.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def image_to_ants(sitk_image: "SimpleITK.Image") -> ants.ANTsImage:
return ants_img


def image_fron_ants(ants_image: ants.ANTsImage) -> "SimpleITK.Image":
def image_from_ants(ants_image: ants.ANTsImage) -> "SimpleITK.Image":
"""
Converts a given ANTsPy image into an SimpleITK image
Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1029,14 +1029,14 @@ def test_image_to_ants(self):
nptest.assert_almost_equal(self.img.GetDirection(), img.GetDirection())

def test_image_from_ants(self):
from ants.utils.sitk_to_ants import image_fron_ants
from ants.utils.sitk_to_ants import image_from_ants

with TemporaryDirectory() as temp_dir:
temp_fpath = os.path.join(temp_dir, "img.nrrd")
sitk.WriteImage(self.img, temp_fpath)
ants_img = ants.image_read(temp_fpath)

img = image_fron_ants(ants_img)
img = image_from_ants(ants_img)

nptest.assert_equal(
sitk.GetArrayViewFromImage(self.img), sitk.GetArrayViewFromImage(img)
Expand Down

0 comments on commit fdaee69

Please sign in to comment.