Yet another VTK, DICOM and Orientation problem

Romain LEGUAY <[email protected]>
Newsgroups gmane.comp.lib.vtk.user
Message-ID <CAE8ee6n7Ccm6v2zUCA5Nf4FnCsKJbD_nyRZrnr7i6NRe2iCe0A@mail.gmail.com>
Hello everyone,

I'm trying to create a viewer of dicom with anatomical views (axial,
sagittal and coronal) from a radiologist point of view.

As starting point, I use the example provided in vtkDICOM module :
testDicomDisplay
<https://github.com/dgobbi/vtk-dicom/blob/master/Examples/TestDICOMDisplay.cxx>
.
It uses vtkDICOMReader with SetMemoryRowOrderToFileNative activated.

When I try to display an axial CT scan, I don't obtain expected orientation
as you can see in pic1: the sagittal view is in Posterior -> Anterior
direction.
[image: pic1.png]

When I try to display a sagittal CT scan, I have different orientations:
[image: pic2.png]

To fix this orientation problem, I tried to create some transformation
matrices that converts
Patient Coordinates (DICOM) to World Coordinate (VTK coordinates).

To do this, I follow those steps:
* get the patient matrix (Pm) using the method
vtkDICOMReader::GetPatientMatrix (if I understand correctly, this matrix is
in DICOM space)
* create the rotation (Rm) from DICOM space to VTK space (rotation on VTK
X-axis around the origin point):
1 0 0 0
0 -1 0 0
0 0 -1 0
0 0 0 1
* Multiply Pm by Rm to obtain the matrix PRm to go from Patient Coordinates
to VTK Coordinates.
* Use the Matrix PRm with a point in IJK coordinates (voxel coordinates)
multiplied by the spacing.

I know I made a mistake because I don't have the result expected but I
don't know what I did wrong...

Can someone provide me some tips please?

Thank you,

Romain
pic1.png (image/png, 559.4 KB) - not displayed
pic2.png (image/png, 182.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.