[Insight-users] THe output of MI application (MultiResMIRegistration

Luis Ibanez luis.ibanez at kitware.com
Thu Nov 18 11:51:10 EST 2004


Hi Weihua,

The reason why you see 7 parameters in the output of this
registration process is that the Transform used is a

        QuaternionRiogidTransform
http://www.itk.org/Insight/Doxygen/html/classitk_1_1QuaternionRigidTransform.html

This transforms uses

     1) One Quaternion
     2) One Vector

in order to represent a rigid transformation.


     A quaterion   has 4 parameters
     A vector (3D) has 3 parameters

so, the total is 7.   The first four parameters in the list
are for the quaternion, the last three are for the vector.




The application then converts this Rigis Transform into
an Affine Transform, and prints out the encoding as a
3x3 matrix and a 3D vector.

    That makes  Matrix ==== 9 parameters
                Vector ==== 3 parameters



You will find detailed explanations on the parameters
in the Doxygen pages

http://www.itk.org/Insight/Doxygen/html/classes.html

in particular in the "Transforms" group

http://www.itk.org/Insight/Doxygen/html/group__Transforms.html

Look at the documentation of the methods:

           GetParameters() and SetParameters()



You will also find this information in the ITK Software Guide

     http://www.itk.org/ItkSoftwareGuide.pdf

in the Registration Chapter.


---

If you need to map 3D points through the Transform, this
is quite simple, just invoke the TransformPoint() method,


like in the following code:


    typedef itk::Point<float,3> PointType;
    typedef std::vector< PointType >  PointList;
    PointList myPoints = GetYourPoints();

    PointList::const_iterator pointItr = myPoints.begin();
    while( pointItr != myPoints.end() )
      {
      PointType inputPoint = *pointItr;
      PointType transformedPoint =
         transform->TransformPoint( inputPoint );
      ++pointItr;
      }




Regards,



     Luis



--------------------------
weihuax at sfu.ca wrote:
> Hi:
> 
> 
> Thanks a lot for great help. Just I told you in the previous email, I am
> using  MultiResMIApplication application. After reading the pages you
> usggest to me, I doesnot still understand the meaning of output.
> 
> 
> 
> The 'Final Parameters' always includes	7 values, what do they represent? 
> 
> 
> 
> The 'Overall transformation matrix' includes 9 values, the 'overall
> transformation offset' include 3 values. For affine transformation, it
> should have (N+1)*N = (3+1)*3 = 12 values, are they affine transformation
> parameters?
> 
> 
> 
> If we know the affine transformation paramters, and we are given some 3D
> points location, how can we calculate the transformed points location based
> on 'affine transformation parameters'.
> 
> 
> 
> I also want to know the detailed explanation about the input parameters,
> where I can find them?
> 
> 
> 
> Sorry for asking so much questions.
> 
> 
> 
> Thanks a lot again and I am looking forward to your kindly reply.
> 
> 
> 
> Weihua
> 
> 
> 
> On Mon, 15 Nov 2004 23:15:39 -0500 luis.ibanez at kitware.com wrote:
> 
> 
> 
>>Hi Weihua,
> 
> 
> 
> 
>>By "MI application" are you referring to
> 
> 
> 
> 
>>   A) InsightApplications/
> 
> 
>>	     MultiResMIApplication
> 
> 
> 
> 
>>or to
> 
> 
> 
> 
>>   B) InsightApplications/
> 
> 
>>	 LandmarkInitializedMutualInformationRegistration
> 
> 
> 
> 
>>or to
> 
> 
> 
> 
>>   C) InsightApplications/
> 
> 
>>	     MutualinformationEuler2DRegistration
> 
> 
> 
> 
>>or to
> 
> 
> 
> 
>>   D) InsightApplications/
> 
> 
>>		 MRIRegistration
> 
> 
> 
> 
> 
> 
>>	    Please be more specific...
> 
> 
> 
> 
> 
>>---------------------------------------------
> 
> 
> 
>>If you are referring to MultiResMIApplication, the Matrix is already
> 
> 
>>printed out directly from the file
> 
> 
> 
> 
>>     InsightApplications/
> 
> 
>>		MultiResMIApplication/
> 
> 
>>				 Common/
> 
> 
>>				     MIMApplicationBase.txx
> 
> 
> 
> 
>>in line 157.
> 
> 
> 
> 
>>----------------------------------------------
> 
> 
> 
>>For an explanation of what the "Final Parameters" mean, please
> 
> 
>>read the ITK Software Guide
> 
> 
> 
> 
>>	http://www.itk.org/ItkSoftwareGuide.pdf
> 
> 
> 
> 
>>In particular the Chapter on Image Registration.  You will
> 
> 
>>find the description of the parameters for the AffineTransform
> 
> 
>>in section 8.7.12, pdf-page 304.
> 
> 
> 
>>The AffineTransform is internally represented by a Matrix
> 
> 
>>and a Vector. The Matrix is not only a rotation matrix, because
> 
> 
>>an Affine Transform can also represent anisotropic scaling
> 
> 
>>and Shearing.
> 
> 
> 
> 
>>In order to understand the conversions done during the registration
> 
> 
>>process you *must* read the chapter on image resampling from the
> 
> 
>>ITK Software Guide. This is Section 6.7.1, pdf-page 199.
> 
> 
> 
>>Reading this section will save you a lot of time and unnecessary
> 
> 
>>suffering.
> 
> 
> 
> 
> 
> 
>>     Regards,
> 
> 
> 
> 
> 
>>	  Luis
> 
> 
> 
> 
> 
>>--------------------------
> 
> 
>>weihuax at sfu.ca wrote:
> 
> 
> 
>>>Hi:
> 
> 
> 
>>>I tried to use MI application for my own 3-D images. I know that the 
> 
> 
>>regular
> 
> 
>>>output is the Registered image. But I want to get the 'Transformation
> 
> 
>>>Matrix'.HOw can I get them?
> 
> 
> 
>>>What does 'Final PArameters' mean?
> 
> 
> 
>>>What does 'overall transform matrix' mean in the output display? Is it
> 
> 
>>>'Rotation Matrix'?
> 
> 
> 
>>>What does 'overall transform offset' mean in the output display?Is it
> 
> 
>>>'Translation Vector'? If it is 'Translation Vector', when I use two same
> 
> 
>>>images as input, why does the output of it is not [0 0 0] but [-12.885
> 
> 
>>>0.530406 -26.3213]? Who can explain it to me?
> 
> 
> 
>>>Thanks
> 
> 
> 
>>>Weihua
> 
> 
> 
> 
>>>_______________________________________________
> 
> 
>>>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