I create a NIFTI image file by using SimpleITK
and saved as .nii.gz
file.
However, when I load it by vtkNIFTIImageReader
, the origin of the output vtkImageData
turns out to be (0, 0, 0)
, which is not what I had set in SimpleITK
’s method.
I tried to load the .nii.gz
file in other ways like 3DSlicer
and SimpleITK
, they all read the right origin
parameters.
Why does vtkNIFTIImageReader
cannot get the right infomation?
The vtkNIFTIImageReader stores that information in SFormMatrix
and QFormMatrix
.
For more information see vtkNIFTIImageReader.h and vtkNIFTIImageReader.cxx