[Insight-users] VTK to ITK Transform
Luis Ibanez
luis.ibanez at kitware.com
Wed Jul 11 12:35:40 EDT 2007
Hi Neilson,
1) ITK and VTK image should be flipped along the "Y" axis,
not the "X" axis.
What file format are you using ?
In order to work consistenty between ITK and VTK you
should "think" on physical space. That includes to
be aware of the position and orientation of the
vtkCamera. You want to put the vtkCamera in the location
and orientation of the physician that is looking at the
images. (a neurosurgeon will be above the patient head
looking down to the patients' feet, a radiologist will
be at the patient's feet, looking towards the patient's
head, .. in both cases the patient will be lying on his
back on a horizontal table.
If you are actually developing a medical application
you probably should use the DICOM default coordinate
system in order to organize the scene visualization.
2) Transforms in VTK are applied to actors, and they
*actually* move the image in space. Transforms in ITK
map from the original space to the space of the image,
so, most of the time, the ITK transform that you use
in a resample image filter should be the inverse of
the VTK transform that you want for visualization
purposes.
Regards,
Luis
----------------------
Neilson Mackay wrote:
> Hello,
>
> I am having some difficulty using the same transform in VTK and ITK. I
> have two problems:
> 1. Images read in VTK and ITK are flipped along the 'X' axis.
> 2. The transforms I use to translate a image in VTK doesn't seem
> to position the image in the same position in ITK.
>
> Has anyone else ran into similar difficulties? I assume the 2nd
> problem of mine has something to do with how rotation is applied in VTK
> vs ITK.
>
> As a reference I am using "vtkTransform" in vtk and "Euler3DTransform"
> in ITK. Also, the images I am comparing are of different spacing. To
> confirm where Image A is on image B in itk I am using the
> "ResampleImageFilter".
>
> I could go on with more code if it would help shed some light.
>
> I am open to any suggestion,
> Cheers,
> Neilson
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list