diff --git a/Wrappers/Python/ccpi/viewer/utils/conversion.py b/Wrappers/Python/ccpi/viewer/utils/conversion.py index 62636169..2860cb02 100644 --- a/Wrappers/Python/ccpi/viewer/utils/conversion.py +++ b/Wrappers/Python/ccpi/viewer/utils/conversion.py @@ -112,7 +112,6 @@ def numpy2vtkImage(nparray, spacing=(1., 1., 1.), origin=(0, 0, 0), deep=0, outp vtkarray = numpy_support.numpy_to_vtk(num_array=nparray, deep=deep, array_type=numpy_support.get_vtk_array_type(nparray.dtype)) - if output is None: img_data = vtk.vtkImageData() @@ -135,8 +134,7 @@ def numpy2vtkImage(nparray, spacing=(1., 1., 1.), origin=(0, 0, 0), deep=0, outp #img_data.GetPointData().SetActiveScalars('vtkarray') img_data.SetOrigin(origin) img_data.SetSpacing(spacing) - - + point_data = img_data.GetPointData() # Print available scalar arrays