[Insight-users] affine transformation

Atwood, Robert C r.atwood at imperial.ac.uk
Mon Jun 5 18:42:58 EDT 2006


I find the ability to obtain the transform result as a VnlMatrix to be very useful, then all the methods in the vnl library (included along with ITK, since ITK uses the library) can be used to analyze this matrix. Eric, you may find this makes more sense, check out the vnl library documentation 

http://paine.wiau.man.ac.uk/pub/doc_vxl/index.html

  typedef vnl_matrix<double> MyMatrix;
  MyMatrix matrix,smatrix;
  matrix = finalTransform->GetMatrix().GetVnlMatrix();


However, I could not find a function to place a calculated VnlMatrix into the transform, and resorted to something like this:


        TransformType::MatrixType imatrix;    
        imatrix.SetIdentity();
        imatrix *= matrix;
        finalTransform->SetMatrix(imatrix);


is there a better way to do this similar to  finalTransform->SetMatrix().SetVnlMatrix(matrix) , which would be analogous to the method of getting the vnl matrix?

Thanks
Robert




-----Original Message-----
From: insight-users-bounces+r.atwood=imperial.ac.uk at itk.org on behalf of Eric John
Sent: Mon 6/5/2006 10:23 PM
To: insight-users at itk.org
Subject: [Insight-users] affine transformation
 
Hello all,
 
Can anyone tell how to interpret the output of the affine transformation. How do I get the transformation matrix from this: Thanks
 
39  3.13147e+007 [1.00047, -0.0964019, 0.0585025, 0.993832, -12.6128, -16.0721] AffineAngle: 4.44146

Result =
 Center X      = 108.796
 Center Y      = 124.409
 Translation X = -12.6128
 Translation Y = -16.0721
 Iterations    = 40
 Metric value  = 3.13147e+007
 Scale 1         = 1.01939
 Scale 2         = 0.980914
 Angle (degrees) = 4.44146
 
 
 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060605/8b37eb9f/attachment.html


More information about the Insight-users mailing list