[vtkusers] [Gdcm2] Matching CT and RT dose coordinates
David Gobbi
david.gobbi at gmail.com
Fri Feb 25 11:49:03 EST 2011
On Fri, Feb 25, 2011 at 8:50 AM, Mathieu Malaterre
<mathieu.malaterre at gmail.com> wrote:
>
> You have to turn the FileLowerLeft before calling update to preserve
> DICOM coordinate system. eg.
>
> reader->FileLowerLeftOn();
> reader->Update();
I just want to emphasize this. The first step in matching VTK to patient
coords is setting FileLowerLeftOn() in the reader. It isn't the only the
only step, but it is certain that if you leave FileLowerLeft=Off then
everything becomes much more difficult.
Then the Origin will be equal to ImagePositionPatient and the only thing left to
worry about is the ImageOrientationPatient. One way to deal with orientation is
to take the direction cosines matrix, and use it to generate a 4x4 matrix
that performs a rotation around the ImagePositionPatient (x0,y0,z0) point.
This matrix can then be used whenever you want to go back and forth between
vtkImageData coords and DICOM patient coords.
VTK itself is agnostic about coordinate systems, except for vtkActor2D, which
most people never use, and the image readers, which have the unfortunate
default behaviour of flipping the images.
- David
More information about the vtkusers
mailing list