Skip to content

Commit

Permalink
Update for SimpleITKUtilities v0.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dave3d committed Feb 22, 2024
1 parent a0de6ff commit 05999c4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions tests/test_sitk2vtk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand All @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions tests/test_vtk2sitk.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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))
Expand All @@ -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())
Expand Down

0 comments on commit 05999c4

Please sign in to comment.