[Insight-users] VersorRigid3dTransform

Martin Urschler martin at urschler.info
Tue Jul 5 06:43:51 EDT 2005


Hi Karthik,

Karthik Krishnan wrote:
> 
> It does bring up one minor point concerning transforms like the 
> VersorRigidTransform and other transforms that contain the center (they 
> derive from the MatrixOffSetTransformBase). If you were to copy the 
> transform parameters over into another transform, you will also need to 
> explicitly copy the center otherwise your new transform will be 
> incorrect.  ie....
> 
>  TransformType::Pointer finalTransform = TransformType::New();
>  copiedTransform->SetCenter( originalTransform->GetCenter() );
>  copiedTransform->SetParameters( originalTransform->GetParameters() );
> 
> Maybe this info should be put in the Doxygen ...... ? ?


Coming back to this issue we discussed a while ago. If I use the 
GetInverse method of a class derived from MatrixOffsetTransformBase then 
the inverse transform is returned but the center of rotation is set to 0 
in the returned transformation.

I.e. in

Rigid3DTransformType::Pointer initialTransform =
    someTransformFromARegistration();

Rigid3DTransformType::Pointer inverseInitialTransform =
    Rigid3DTransformType::New();
initialTransform->GetInverse( inverseInitialTransform );


the center of rotation of inverseInitialTransform is [0,0,0] no matter 
what the center in initialTransform is

This is consistent with the documentation which states that the center 
of rotation of the inverse is centered at the origin.


My question:
Is it now sufficient to simply apply
inverseInitialTransform->SetCenter( initialTransform->GetCenter() );

to update the center? Or do I have to call another member function that 
updates the internal matrix and offset accordingly?

regards,
Martin


More information about the Insight-users mailing list