[Insight-users] Help With Affine Transform

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 3 22:38:36 EDT 2004


Hi Huss,

Thanks for your detailed answers.

 From your description it seems that a good
way to complete your registration is to do
the following:

1) let the registration arrive to the current
    convergence.

2) Use the resulting transform for initializing
    a second registration stage.

3) Modify the parameter scaling before you
    start the second registration step.
    In the parameter scaling this time you will
    put larger values  on the translations in
    order to allow the Affine transform to follow
    larger changes on scaling.

    Note that in an Affine transform, the same
    coefficients that allow Scaling also allow
    rotation and Shearing.  I you want to really
    focus your registration on the Scaling aspect
    you could use at this point the itkScaleTransform
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ScaleTransform.html
    instead of the Affine transform.  In that way
    you will be optimizing in a space of 3 dimensions
    instead of a parametric space of 12 dimensions.

    Another transform that may be of interest to
    you is the ScaleSkewVersor3DTransform
http://www.itk.org/Insight/Doxygen/html/classitk_1_1ScaleSkewVersor3DTransform.html


Regarding your question about complexity:
The use of Affine transform is more complex than
Translation, Rotation, Scaling and Rigig transforms
but it is simpler than BSplines, Demons and FEM based
registration.



  Regards,


     Luis


Huss wrote:
> Hi Luis,
> 
> Q1) -->  The rotation and translation are working fine but its just
> the scaling I can get to work.
> 
> Q2) --> I am expecting a scaling factor within the range u specified
> thats 0.8 - 1.2
> 
> Q3) --> I have made sure that my images have correct values in their
> Image Origin
>           and Image Spacing 
> 
> The details of my Images are as follows:
> 
> Fixed Image: 
> X=192 Y=192 Z=100
> x=1.0 y=1.0, z=1.0
> 
> Moving Image:
> X=256 Y=256 Z=124
> x=0.94 y=0.94, z=1.4
> 
> Is the application of Affine really complicated for 3D volumes??
> 
> Thanks Luis for all your help
> Huss
> 
> 
> 
> 
> 
> On Tue, 03 Aug 2004 09:09:47 -0400, Luis Ibanez <luis.ibanez at kitware.com> wrote:
> 
>>Hi Huss,
>>
>>If the final transform of your registration does not
>>contains a scaling effect that you were expecting it
>>means that you should readjust the parameter scaling
>>coefficients that regulate how much translation and
>>how much rotation/shearing/scaling your Affine transform
>>will tend to do when searching for better values of the
>>metric.
>>
>>  optimizer->SetScales( optimizerScales );
>>
>>Before you go and change those coefficients. Note that
>>the process of optimizing geometric scaling is even more
>>unstable than the process of optimizing rotation.
>>
>>Therefore you probably want to let the Scaling refinement
>>for the final part of your registration.
>>
>>Question 1:
>>
>>    Is your registration, so far, solving correctly
>>    for translations and rotations ? and only missing
>>    to correct some scale ?
>>
>>Question 2:
>>
>>    How big is the scaling factor that you are expecting ?
>>    It is unlikely that a registration process will solve
>>    scaling factors smaller than 0.8 or larger than 1.2
>>
>>Question 3:
>>
>>    Did you made sure that your images have correct values
>>    in their Image Origin and Image Spacing ? This is absolutely
>>    critical for the registration process.
>>
>>    Please post to the list the details of your images (both fixed
>>    and moving  images). Let us know how many pixels they have,
>>    where is their origin and what are their pixel spacings along
>>    each dimension.
>>
>>Thanks
>>
>>   Luis
>>
>>-------------------------------
>>
>>
>>Huss wrote:
>>
>>
>>>Hi Luis
>>>the program compiles and give me the output ..
>>>the problem is that I expect scaling which doesnt take place....
>>>I have incorporated the Affine Transform and GradientDescentOptimizer
>>>and I have made the necessary changes to the MultiResMIRegistration
>>>code.
>>>Please help me with this.
>>>
>>>Thank You
>>>Huss
>>>
>>>
>>>On Mon, 02 Aug 2004 23:23:59 -0400, Luis Ibanez <luis.ibanez at kitware.com> wrote:
>>>
>>>
>>>>Hi Huss,
>>>>
>>>>Could you please be more precise and indicate what
>>>>kind of problem are you having with your code ?
>>>>
>>>>A) Is it compiling ?
>>>>  If not, please post the compilation errors.
>>>>
>>>>B) Is it crashing at run-time ?
>>>>  If so, please describe in what stage of the
>>>>  registration it crashes.
>>>>
>>>>C) Is it producing wrong registrations ?
>>>>  If so, please describe the effect that you
>>>>  observe on those registrations versus what you
>>>>  were expecting.
>>>>
>>>>Thanks
>>>>
>>>>    Luis
>>>>
>>>>-----------------
>>>>
>>>>
>>>>Huss wrote:
>>>>
>>>>
>>>>
>>>>>Hello Everyone,
>>>>>
>>>>>I am using the MultiResMIRegistration package and I am trying to
>>>>>implement the Affine Transform and gradient descent optimizer. For
>>>>>some reason I am not able to implement the scaling for which I intend
>>>>>to use the Affine Transform for. I would really appreciate if someone
>>>>>can check and let me know whats wrong and if I made the correct
>>>>>changes. I am sending you the MIMRegistration.txt and
>>>>>MIMRegistration.h files and I have indicated the changes i made to
>>>>>implement Affine.
>>>>>
>>>>
>>>>
>>>
>>
> 
> 






More information about the Insight-users mailing list