[vtkusers] Yet another VTK, DICOM and Orientation problem
Romain LEGUAY
romain.leguay at gmail.com
Tue Dec 11 08:12:15 EST 2018
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181211/11484347/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic1.png
Type: image/png
Size: 572778 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181211/11484347/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pic2.png
Type: image/png
Size: 544089 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/vtkusers/attachments/20181211/11484347/attachment-0003.png>
More information about the vtkusers
mailing list