Skip to content

Commit 1c46cfb

Browse files
committed
changed to sitk.GetArrayFromImage
1 parent eec406c commit 1c46cfb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SimpleITK/utilities/vtk.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def sitk2vtk(image: sitk.Image) -> vtk.vtkImageData:
7777
vtk_image.SetDirectionMatrix(direction)
7878

7979
# Set pixel data
80-
depth_array = vtknp.numpy_to_vtk(sitk.GetArrayViewFromImage(image).ravel())
80+
depth_array = vtknp.numpy_to_vtk(sitk.GetArrayFromImage(image).ravel())
8181
depth_array.SetNumberOfComponents(ncomp)
8282
vtk_image.GetPointData().SetScalars(depth_array)
8383

0 commit comments

Comments
 (0)