Hi all,<br> I had earlier asked some help regarding some issues I am having in affine transforms, I I sincerely<br>hope this time around someone may be able to advice.<br><br>1) How do I make the "change in metric per iteration" as a convergence criteria? Currently I specify the <br>
number of iterations, and i think it preempts on the minimum step length. I can see in the output<br>of the observer, that for some image pairs, the metric actually reached the minimum earlier than the <br>stipulated number of iterations. Is there a StopRegistration() method that I can use, for all types of registration? What<br>
are my options? <br><br>2) After getting the final transform, I want to be able to apply it by external routines (IPP based). For affine transform,<br>firstly, I wanted to confirm a) the parameters are the elements of the matrix, and not the physical parameters (rotation, <br>
scaling, skew etc), ie, GetLastTransformParameters gives [a11,a12;a21,a22] + [Tx,Ty]' ?<br> b) Do I have to utilize the optimizer scales etc. to scale them in some way before applying them to the floating image? <br><br>
My images are registered by and large to a good degree, but I consistently observe that the alignment is good on one end<br>of the image plane, but gradually worsens as i move to the other end. Much like some skew has not been either optimized<br>
for, or missed in the resampling process. <br><br>//My optimizer is <br>typedef itk::RegularStepGradientDescentOptimizer OptimizerType;<br>//and the parameters are:<br><br><br> double affineScale = 1.0;<br> const double translationScale = 1e-006; <br>
typedef OptimizerType::ScalesType OptimizerScalesType;<br> OptimizerScalesType optimizerScales( transform->GetNumberOfParameters() );<br> optimizerScales[0] = affineScale;<br> optimizerScales[1] = affineScale; // Scale in x<br>
optimizerScales[2] = affineScale;<br> optimizerScales[3] = affineScale ;<br> optimizerScales[4] = translationScale / ( (double) subspacing[0] ); <br> optimizerScales[5] = translationScale / ( (double) subspacing[1] );<br>
optimizer->SetScales( optimizerScales );<br> optimizer->SetInitialPosition( P0);<br> optimizer->SetRelaxationFactor( 0.8);<br><br><br>Thanks,<br>Sid.<br><br><br><br>