[vtkusers] [Gdcm2] Matching CT and RT dose coordinates
Jothy
jothybasu at gmail.com
Tue Mar 1 07:02:35 EST 2011
Thanks for all your help!
I am getting close to what I need.
As Bill suggested I uesd same (GDCM) reader for reading CT and dose with
FileLowerLeftOn().Now they both seem to be in the same coordinate system,
but the images are upside down.CT is rotated 180 in the Y direction (becomes
FFP).
As David G suggested I should use a vtkMatrix4x4 to do the rotations along
with the ImageOrientationPatient.
But I am confused of using these vtkmatrix4x4
I have
Image position: -275 -524 -122.441
ImageOrient: 1 0 -1.22465e-16 0 1 0
now how to create a vtk4x4 matrix to flip these images upsideDown. (I tried
vtkImageFlip, but it invalidates the dicom coordinate system as David G
pointed out).
Can I use this amtrix in the vtkImageReslice itself?
Thanks
Jothy
On Fri, Feb 25, 2011 at 4:49 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110301/caa530a3/attachment.htm>
More information about the vtkusers
mailing list