[Insight-users] Q. re Affine transformations

Siddharth Srivastava siddys at gmail.com
Tue Nov 15 12:35:54 EST 2011


Hi all,
      I had earlier asked some help regarding some issues I am having in
affine transforms, I I sincerely
hope this time around someone may be able to advice.

1) How do I make the "change in metric per iteration" as a convergence
criteria? Currently I specify the
     number of iterations, and i think it preempts on the minimum step
length. I can see in the output
of the observer, that for some image pairs, the metric actually reached the
minimum earlier than the
stipulated number of iterations. Is there a StopRegistration() method that
I can use, for all types of registration? What
are my options?

2) After getting the final transform, I want to be able to apply it by
external routines (IPP based). For affine transform,
firstly, I wanted to confirm a) the parameters are the elements of the
matrix, and not the physical parameters (rotation,
scaling, skew etc), ie, GetLastTransformParameters gives [a11,a12;a21,a22]
+ [Tx,Ty]' ?
 b) Do I have to utilize the optimizer scales etc. to scale them in some
way before applying them to the floating image?

My images are registered by and large to a good degree, but I consistently
observe that the alignment is good on one end
of the image plane, but gradually worsens as i move to the other end. Much
like some skew has not been either optimized
for, or missed in the resampling process.

//My optimizer is
typedef itk::RegularStepGradientDescentOptimizer OptimizerType;
//and the parameters are:


    double affineScale = 1.0;
    const double translationScale = 1e-006;
    typedef OptimizerType::ScalesType       OptimizerScalesType;
    OptimizerScalesType optimizerScales( transform->GetNumberOfParameters()
);
    optimizerScales[0] =  affineScale;
    optimizerScales[1] =  affineScale;                    // Scale in x
    optimizerScales[2] =  affineScale;
    optimizerScales[3] =  affineScale ;
    optimizerScales[4] =  translationScale / ( (double) subspacing[0] );

    optimizerScales[5] =  translationScale / ( (double) subspacing[1] );
    optimizer->SetScales( optimizerScales );
    optimizer->SetInitialPosition( P0);
    optimizer->SetRelaxationFactor( 0.8);


Thanks,
Sid.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111115/b3a726cb/attachment.htm>


More information about the Insight-users mailing list