[Insight-users] pb with Versor3DRigidTransform

Luis Ibanez luis.ibanez at kitware.com
Mon Sep 12 08:43:23 EDT 2005


Hi Vincent,


Something is suspicious in your installation.

I just verified the following code:

-----------------------------------------------------------
#include <iostream>
#include "itkVersorRigid3DTransform.h"

int main()
{
   typedef itk::VersorRigid3DTransform<double> TransformType;
   TransformType::Pointer transform = TransformType::New();

   transform->SetIdentity();

   TransformType::OutputVectorType t;
   t[0] = 5.0;
   t[1] = 5.0;
   t[2] = 5.0;

   transform->SetTranslation( t );
   transform->Print( std::cout );

   std::cout << transform->GetVersor() << std::endl;

   return 0;
}
-----------------------------------------------------------

and produces the following output:



-----------------------------------------------------------
VersorRigid3DTransform (0x4f02b0)
   RTTI typeinfo:   itk::VersorRigid3DTransform<double>
   Reference Count: 1
   Modified Time: 5
   Debug: Off
   Observers:
     none
   Matrix:
     1 0 0
     0 1 0
     0 0 1
   Offset: [5, 5, 5]
   Center: [0, 0, 0]
   Translation: [5, 5, 5]
   Inverse:
     1 0 0
     0 1 0
     0 0 1
   Singular: 0
   Versor: [ 0, 0, 0, 1 ]

[ 0, 0, 0, 1 ]
-----------------------------------------------------------

As you can see, there are no NaN on the final print out.



Please try the code above in your installation
and let us know what you find.


   Thanks



      Luis


----------------------
Vincent Daanen wrote:
> Luis Ibanez a écrit :
> 
>>
>> Hi Vincent,
>>
>> You can easily solve this problem by invoking the method
>>
>>             transform->SetIdentity()
>>
> That's what I'm doing
> 
>> before you initialize the translation of the transform.
> 
> 
> 
>> I assume that you are setting the translation by invoking
>> the method "Translate()", is this how you did it ?
>>
> No, I'm intializing a Versor3DRigidTransform::OutputVectorType and then 
> use SetTranslation to set it.
> but it's working. The resampled volume is a translation of the input volume
> 
>> Also... what version of ITK are you using ?
> 
> 
> I'm using Itk 2.0.1
> 
> May be it's just a display pb (or with the << operator) because it works 
> well ...
> 
> Thanks for your responses
> 
> Vince
> _______________________________________________
> 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