Why the origin of vtkImageData is zero?

I find a stranger thing. I read a dicom file with vtkDICOMImageReader, and then obtain the origin point. My code is:

img2 = vtk.vtkDICOMImageReader()
img2.SetFileName('xxx')
img2.Update()
image2 = img2.GetOutput()
print('img2: ', image2.GetOrigin())

The result is (0, 0, 0), but the image position (0020, 0032) is not (0, 0, 0).

  1. I wonder whether the vtkDICOMImageReader.GetOutput.GetOrigin always return (0, 0, 0)?

  2. In vtk 9.0.1 (python), the vtkDICOMImageReader.GetOutput.GetDirectionMatrix return a identify matrix even the Image Orientation (0020, 0037) is not a identfiy matrix.

  3. I guess that the reason why vtkDICOMImageReader.GetOutput.GetOrigin return (0, 0, 0) and vtkDICOMImageReader.GetOutput.GetDirectionMatrix return a identify matrix is that the vtkImageData has its own coordinate system, and for this coordinate system, the origin is (0, 0, 0) and the orientation matrix is a identify matrix. Am I right?

  4. If I want to make the coordiante system of vtkImageData to be the world coordinate system, I need to adjust the origin point of vtkDICOMImageReader.GetOutput to Image Position (0020,0032), and the orientation of vtkDICOMImageReader.GetOutput to Image Orientation (0020, 0037) by SetDirectionMatrix. Am I right?

Thank you for your suggestion!

The DICOM image reader in VTK has many issues. I would recommend to use vtk-dicom package instead.

I think the plan is to replace VTK’s current DICOM image reader by vtk-dicom anyway, so by switching to vtk-dicom now you can avoid changes in your code later.

Note that while vtk-dicom is very good quality image reader/writer, it cannot read/write other essential DICOM information objects, such as segmentations, structured reports. Therefore, for implementing real-world clinical applications you often need to use higher-level VTK-based application frameworks, such as 3D Slicer or MITK, which can handle many more data types.

I suggest you use gdcm. Enable the vtk integration when building it. Then you have proper vtk style readers. I only use the current vtk dicom reader for pure image visualization (.e.g. preview window), while gdcm in case I need complete space information (world space).