if (flag):
img_app.Update()
img_axial.DeepCopy(img_app.GetOutput())
//TODO: Code challenge (imagedata_utils.ResampleMatrix),
//it is necessary to know the new spacing.
//spacing = read.GetOutput().GetSpacing()
After Change
img_axial = vtk.vtkImageData()
if (reduce_matrix):
img_axial.DeepCopy(img_app.GetOutput())
img_axial.SetSpacing(img_axial.GetSpacing()[0],\
img_axial.GetSpacing()[1],\
spacing_z)
else: