From 05999c440737dfc61402bf9b2002b2b1db95f3aa Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Thu, 22 Feb 2024 13:43:04 -0500 Subject: [PATCH] Update for SimpleITKUtilities v0.3.0 --- requirements.txt | 4 ++-- tests/test_sitk2vtk.py | 4 ++-- tests/test_vtk2sitk.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/requirements.txt b/requirements.txt index d367085..cd84893 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ numpy>=1.24.0 -SimpleITK>=2.2 +SimpleITK>=2.2.1 vtk>=9.2.0 pydicom>=2.3 -simpleitkutilities>=0.2.2 +simpleitkutilities>=0.3.0 diff --git a/tests/test_sitk2vtk.py b/tests/test_sitk2vtk.py index 6159da1..b0ebd33 100755 --- a/tests/test_sitk2vtk.py +++ b/tests/test_sitk2vtk.py @@ -3,7 +3,7 @@ import unittest import vtk import SimpleITK as sitk -import SimpleITK.utilities as sitkutils +from SimpleITK.utilities.vtk import sitk2vtk import platform @@ -15,7 +15,7 @@ def test_sitk2vtk(self): direction = [0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, -1.0] img.SetDirection(direction) - vol = sitkutils.sitk2vtk(img) + vol = sitk2vtk(img) self.assertTupleEqual(vol.GetDimensions(), tuple(dims)) print("\nAccessing VTK image") val = vol.GetScalarComponentAsFloat(5, 5, 5, 0) diff --git a/tests/test_vtk2sitk.py b/tests/test_vtk2sitk.py index 00c4081..e925256 100755 --- a/tests/test_vtk2sitk.py +++ b/tests/test_vtk2sitk.py @@ -5,7 +5,7 @@ import SimpleITK as sitk import vtk from tests import compare_stats -import SimpleITK.utilities as sitkutils +from SimpleITK.utilities.vtk import vtk2sitk def printStats(stats): @@ -31,7 +31,7 @@ def test_vtk2sitk(self): print(img.GetDirectionMatrix()) print("\nConverting VTK to SimpleITK") - sitkimg = sitkutils.vtk2sitk(img) + sitkimg = vtk2sitk(img) print("\nResulting SimpleITK Image") print(type(sitkimg)) @@ -58,7 +58,7 @@ def test_vtk2sitk(self): # Convert the short image to SimpleITK print("\nConverting short VTK to SimpleITK") - sitkimg2 = sitkutils.vtk2sitk(img2) + sitkimg2 = vtk2sitk(img2) print("\nSimpleITK short image") print(type(sitkimg2)) print(sitkimg2.GetPixelIDTypeAsString())