[Insight-users] Question about transforming voxel position from vtk to itk

Anja Ende anja.ende at googlemail.com
Wed Apr 9 11:02:39 EDT 2008


I am using ITK for reading and orienting the image data and VTK for
visualization. I am mostly dealing with DCE (3D + time) data.

My pipeline is as follows:

- I have an object that is responsible for reading the image data.
- This connects to an itk::ExtractImageFilter that extracts the volume
that we will display in VTK.
- This connects to an itk::OrientImageFilter that orients the image to
the desired orientation.
- This connects to the itk::VTKImageExport object

Now, I set up all the VTK call back objects with vtkImageImport.

- The output of the vtkImageImport connects to a
vtkImageChangeInformation object that shifts the origin to the center
of the volume.

Now, what I need to do is go from the image space as seen by VTK to
the ITK object. So, the user selects a voxel on the screen and I
transform this to get the voxel position in mms (in the VTK image
space). Now, my question is how can I transform this voxel position so
that I can actually access the corresponding voxel in the image reader
object.

The transformations I guess that are happening are:

- Shift of origin due to the vtkImageChangeInformation object. I guess
this is easy to compensate for. I can subtract the (current origin -
old origin) quantity from the voxel coordinates.
- Transformation due to the OrientImageFilter. I am not sure how I can
undo this. I somehow have to apply the inverse transform on the input
point.

I hope I have been able to express my problem clearly. I would really
appreciate any help from you guys.

Cheers,
Anja


More information about the Insight-users mailing list