Why reader.GetPixelSpacing() return (0.83, 0.83, 0)?

I want to use vtk to obtain the pixel spacing of image, and the code is:

        reader = vtk.vtkDICOMImageReader()
        reader.SetDirectoryName(tempFolder)
        reader.Update()
        spacing = reader.GetPixelSpacing()

Then, the spacing is: (0.83, 0.83, 0). However, if I use RadiAnt to review the image, and the spacing is:

Why the vtk obtained spacing is: (0.83, 0.83, 0)? Is there anything wrong with my code?

(0018,0088) field must not be used for determining position of image slices. DICOM specifies position and orientation of each image slice. If all slices are parallel and spaced equally then you can simply load the voxel array and set that spacing value. If slice normals are not orthogonal to slice offset vector (not uncommon), spacing is varying (rare) or slices are not parallel (very rare) then there is no prescribed spacing but you need to reconstruct the image using vtkImageReslice, with any spacing that you choose.

You need to at least read all position and orientation values, sort them, analyze if they are all oarael, equally spaces, orthogonal, and if they are then use the spacing that you computed from them. As far as I know @dgobbi’s vtkDICOM library does all this, but VTK’s built-in DICOM reader does not.

If you need to be able to read any kind of 3D or 4D DICOM image geometry then I would recommend to use 3D Slicer or dcm2niix.

My spacing is (0.83, 0.83, 0), and the reason is that the spacing is varying or slices are not parallel? If so, how VTK deal with this problem? Can vtkImageReslice handle this problem? If the spacing is varying, how can vtkImageData record it?

I can understand the slice normals, but I don’t know what’s the slice offset vector. Could you please give me more details about the slice offset vector?

There can be many ways of how a DICOM reader can fail to determine slice spacing. What kind of images are you trying to load? Do you use @dgobbi’s vtkDICOM library?

By slice offset vector I mean the vector that connects origins of neighbor slices.

Thank you very much, and I will try vtkDicom.