[Insight-users] Finding the inverse of a Transformation

N.E. Mackenzie Mackay 9nem at qlink.queensu.ca
Mon Jun 21 13:56:02 EDT 2004


Hi,

	I have been able to register two images together successfully.  Right 
now I am trying to find the inverse of the Transformation between the 
two but having problems.  I am using CenteredRigid2DTansform as my 
transformation.

	Two questions:

		First, how do I get the inverse of the transform.  I tried this:

			TransformType::Pointer finalTransform = TransformType::New();
			finalTransform->SetParameters ( finalParameters );

			TransformType::Pointer finalTrasnformInvers = TransformType::New();
			finalTransformInverse = finalTransform->Inverse();

		When I compile this code I get a compile error :
			binary '=' operator defined which takes a right-hand operand of type 
'class itk::SmartPointer<class itk::Rigid3DTransform<double> >' (or 
there is no acceptable conversion)

		I tried changing my code to:

			TransformType::Pointer finalTransform = TransformType::New();
			finalTransform->SetParameters ( finalParameters );
		
			finalTransform->Inverse();

			TransformType::Pointer finalTrasnformInvers = TransformType::New();
			finalTransformInverse = finalTransform;

		This compiled but didn't give the actual inverse.  I gave the 
original one.

	My second question is (and probably answered before) how do I output 
the transform as a 4x4 matrix.  My goal is to eventually use it in vtk.

Thanks for all the help,
Neilson

	



More information about the Insight-users mailing list