[Insight-users] question about MultiResMIRegistration

Luis Ibanez luis.ibanez@kitware.com
Thu, 20 Feb 2003 08:05:25 -0500


Hi Dongrong,


1) The Matrix and Offset that you obtain are the two components
    of the AffineTransform.  This transform is fully described in the
    SoftwareGuide. Please take a look at the explanation of the
    coefficients that is presented Section 7.7 of the  Registration chapter.

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

2)  In order to understand the mechanism of registration in ITK, you
     are encouraged to read the section on  the ResampleImageFilter
     Starting on Section 5.7, pages 137.

3)  Once your registration is done, you simply take the parameters from
      the optimizer, initialize a transform with them and pass this 
transform
      to a ResampleImageFilter.  This filter will be able to map the
      moving image into the fixed image space.

      Examples of this procedure are available in 
Insight/Examples/Registration

      ImageRegistration1.cxx
      ImageRegistration2.cxx
      ImageRegistration3.cxx
      ImageRegistration4.cxx
      ImageRegistration5.cxx
      ImageRegistration6.cxx
      ImageRegistration7.cxx
      ImageRegistration8.cxx
      ImageRegistration9.cxx

4)  All the registration process and the resample process in ITK are
     done in millimiters, not in pixels. Please make sure that the
     origin and spacing of your images are consistent. This should be
     clear once you read the Section 5.7 of the SoftwareGuide.

5)  The center of rotation in the AffineTransform is located on
     the corner of the image (by default). In practice the origin
     is the one provided by the GetOrigin method of the FixedImage.

      An extended version of the affine transform is the 
CenteredAffineTransform,
     which allow you to provide an arbitrary center for the transformation.
      The best way to use this transform is in conjunction with the
       "CenteredTransformInitializer".  This is illustrated in the example

      ImageRegistration9.cxx

     and the associated section in the SoftwareGuide : Section 7.5.3

6)  As a lateral observation, the offsets reported as result of your 
registration
     seem to be too large (4cm....). It may be possible that your 
process is not
    converging.  You may wan  to try using the MattesMutualInformation 
metric
    and the RegularStepGradientDescent.  These component will result in a
    more stable optimization process, at some price in computation time.



Please let us know if you have further questions,


Thanks


    Luis



-------------------------------------------------------------------
XU, Dongrong wrote:

> HI, there,
>
>  
>
> I am a beginner using ITK, especially the part of mutual information. 
> I need to register PET images to MRI images. I use 
> MultiResMIRegistration, which results in the following:
>
>   Overall transform matrix: (R)
>
>     0.995239 -0.0614973 -0.0756162
>
>     0.0611396 0.998104 -0.00703878
>
>     0.0759057 0.00238212 0.997112
>
>  
>
>   Overall transform offset:
>
>     -39.3246  -4.51031  35.7883  (Tx, Ty, Tz)
>
>  
>
> I suppose the first is a rotation matrix R, and the latter is a 
> translation vector. Suppose I am using the PET image as the moving 
> image, and the MRI image as the fixed image, if I need to apply the 
> above mentioned matrices to another PET image to warp it to the MRI 
> space, how should I use them?
>
>  
>
> What is the center of that rotation matrix? And are they in the unit 
> of mili-meter?
>
>  
>
> If the MRI space is 256x256x124, and resolution is Rx Ry Rz
>
> The PET space is 128x128x15 and resolution is rx, ry, rz
>
>  
>
> I am doing the following
>
>  
>
> For each grid point (x,y,z) in MRI space (256x256x124)
>
>    Let V=(x*Rx, y*Ry, z*Rz)
>
>    Let V = V- (Tx, Ty, Tz)
>
>    Map V to the coordinates in PET space by : V1 = R * V = (x1, y1, z1)
>
>    Calculate the coordinates (a,b,c) in PET by
>
>      a = x1/rx
>
>      b = y1/ry
>
>      c = z1/rz
>
>    get value H at (a,b,c) in the PET volume using trilinear interpolation
>
>  
>
>    so that grid point (x,y,z) in MRI space should have the value H
>
>  
>
> Is there anything wrong in this procedure? Would anybody please kindly 
> point out any potential error? My result seems not correct.
>
>  
>
> Thank you very much for your time and help!
>
>  
>
> -Dongrong
>
>  
>
>   
>
>  
>
>  
>