[Insight-users] composition of transformations

Nicolas Toussaint nicolas.toussaint at kcl.ac.uk
Wed Jul 13 08:24:39 EDT 2011


Hi Anja,


We have done some work in that sense at the vtkINRIA3D team 
(www.inria.fr/sophia/asclepios/software/vtkINRIA3D) and we may have an 
possible solution.
In vtkINRIA3D there are several classes that might be useful for you. In 
particular, there is the so called itk::GeneralTransform class. It takes 
subclasses of itk::Transform as inputs and stack them. You can therefore 
append several Transforms to it. One nice property of this class is that 
it behaves as a single Transform which will apply all those appended in 
the stack. For instance, you can use this class directly to apply a list 
of transformations to an image through a classical 
itk::ResampleImageFilter. If all inputs are linear transformation, you 
can export the corresponding global affine transformation. See the 
doxygen of this class:

http://www-sop.inria.fr/asclepios/software/vtkINRIA3D/dashboard/Doxygen/html/classitk_1_1GeneralTransform.html 


Note that the API has changed a bit and I'm unsure the doxygen is very 
up to date anymore.
An example of this class being used is provided in the code : 
itk::ImageRegistrationFactory.


about your question on the image spacing.
The fact that your 3 images have different voxel size doesn't matter here.
In fact, all ITK transformations share the system of coordinates : the 
world coordinates.
For instance, and itk::AffineTransform doesn't have any information on 
the voxel size.
It is just an object that can transform point from one space to the very 
same space.
For this reason, we are able to stack all different kind of 
transformation computed from differents pairs of images (different 
resolutions, spacings, etc.) into a single object of type 
itk::GeneralTransform class.

We are also developing a registration API based on ITK object 
(seehttp://www-sop.inria.fr/asclepios/software/RPI).
We had exactely the same problem as yours. Thanks to the 
itk::GeneralTransform class, we have been able to create a simple 
executable that is able to fuse a list of transformation into a unique 
transformation.


Hope this helps
Nicolas Toussaint




----- Forwarded Message -----

 >  From: "Anja Ende"<anja.ende at googlemail.com>
 >  To: "insight-users"<insight-users at itk.org>
 >  Sent: Monday, 4 July, 2011 4:00:29 PM
 >  Subject: [Insight-users] composition of transformations
 >  Hello,
 > >  I have the following scenario. I have 3 images (say A, B, C) and all
 >  three of different resolutions and different in terms of spacing, and
 >  number of voxels.
 > >  A is registered to B and B is registered to C.
 > >  So, I have a transformation that takes me from C to B and another
 >  which takes me from B to A and what I would like to do is generate one
 >  transformation that takes me from C to A.
 > >  Just wondering how to do this in ITK when the images are also of
 >  different resolution and spacing.
 > >  Many thanks,
 > >  Anja
 >  _____________________________________
 >  Powered bywww.kitware.com
 > >  Visit other Kitware open-source projects at
 > http://www.kitware.com/opensource/opensource.html
 > >  Kitware offers ITK Training Courses, for more information visit:
 > http://www.kitware.com/products/protraining.html
 > >  Please keep messages on-topic and check the ITK FAQ at:
 > http://www.itk.org/Wiki/ITK_FAQ
 > >  Follow this link to subscribe/unsubscribe:
 > http://www.itk.org/mailman/listinfo/insight-users


More information about the Insight-users mailing list