MantisBT - ITK
View Issue Details
0003264ITKpublic2006-05-21 19:282010-10-21 12:31
Simon Warfield 
Luis Ibanez 
highmajoralways
closedfixed 
 
 
0003264: CenteredVersorTransformInitializer fails
The CenteredVersorTransformInitializer never computes the versor.


The class aims to do the following:
> CenteredVersorTransformInitializer <http://www.itk.org/Doxygen/html/classitk_1_1CenteredVersorTransformInitializer.html> [^] is a helper class intended to initialize the center of rotation, versor, and translation of the VersorRigid3DTransform <http://www.itk.org/Doxygen/html/classitk_1_1VersorRigid3DTransform.html>. [^]
>
> This class derived from the CenteredTransformInitializer <http://www.itk.org/Doxygen/html/classitk_1_1CenteredTransformInitializer.html> [^] and uses it in a more constrained context. It always uses the Moments mode, and also takes advantage of the second order moments in order to initialize the Versor <http://www.itk.org/Doxygen/html/classitk_1_1Versor.html> [^] representing rotation.
>

The code for initialization computes principal axes, but does not appear to actually compute a versor.
> template < class TFixedImage, class TMovingImage >
> void
> CenteredVersorTransformInitializer<TFixedImage, TMovingImage >
> ::InitializeTransform() const
> {
>
> // Compute moments and initialize center of rotaion and translation
> this->Superclass::InitializeTransform();
>
> typedef typename Superclass::FixedImageCalculatorType::MatrixType FixedMatrixType;
> typedef typename Superclass::MovingImageCalculatorType::MatrixType MovingMatrixType;
>
> FixedMatrixType fixedPrincipalAxis = this->GetFixedCalculator()->GetPrincipalAxes();
> MovingMatrixType movingPrincipalAxis = this->GetMovingCalculator()->GetPrincipalAxes();
>
> }

When I use this on my data, I do not get an initialized versor. It doesn't work with my data and it doesn't work with the brainweb test data described in the software guide. Should there be code added that initializes the versor ?
No tags attached.
Issue History
2010-02-12 19:04Luis IbanezNote Added: 0019524
2010-02-12 19:08Luis IbanezNote Added: 0019525
2010-02-12 19:08Luis IbanezStatusacknowledged => resolved
2010-02-12 19:08Luis IbanezResolutionopen => fixed
2010-10-21 12:31Gabe HartStatusresolved => closed

Notes
(0004119)
Luis Ibanez   
2006-05-23 13:17   
add code to the .txx for computing the versor based on the principal axis of both images.
(0019524)
Luis Ibanez   
2010-02-12 19:04   
This was fixed on August 2009 with the following commits:

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkCenteredVersorTransformInitializer.txx?root=Insight&r1=1.5&r2=1.8 [^]

http://public.kitware.com/cgi-bin/viewcvs.cgi/Code/Common/itkCenteredVersorTransformInitializer.h?root=Insight&r1=1.4&r2=1.6 [^]
(0019525)
Luis Ibanez   
2010-02-12 19:08   
The correct behavior of this class is now verified by the tests:

http://public.kitware.com/cgi-bin/viewcvs.cgi/Testing/Code/Common/itkCenteredVersorTransformInitializerTest.cxx?root=Insight&r1=1.5&r2=1.8 [^]

which is passing in the Dashboard