Hi all,<br>      I want the affine transform to converge on the change on metric value across iterations. <br>The various components in my registration are defined as below:<br><br>     typedef itk::AffineTransform&lt;coordRepType, 2&gt; TransformType;<br>
    typedef itk::RegularStepGradientDescentOptimizer OptimizerType;<br>    typedef itk::MeanSquaresImageToImageMetric&lt; BFrameType, BFrameType &gt; MetricType;<br>    typedef itk::LinearInterpolateImageFunction&lt; BFrameType, coordRepType &gt; InterpolatorType;<br>
    typedef itk::ImageRegistrationMethod&lt;BFrameType, BFrameType&gt; RegistrationType;<br><br>I looked at the examples available on the net with similar approaches, but the closest examples I <br>could find was specifying the minimum step length as the stopping criterion. I already have a Command<br>
Observer attached to the filter to observe the metric value per iteration, so I can calculate the change<br>as the registration progresses. I was wondering how I can <br>1) specify the change in metric value as a stopping criterion, and <br>
2) send a terminate (or equivalent) command to the<br>registration process when metric_previous - metric_current attains a certain threshold, after which it should<br>return the current parameters? <br><br>If someone can point me to a good example on the net, that would be great too. Or maybe a mail thread on <br>
a similar topic which I missed.... <br><br>I am still struggling why my release version crashes with a SystemAccessViolation while definine a SmartPointer<br>to the registration object (my earlier mail, using ITK 3.20.0), but for now, to maintain continuity, I wanted to move forward with the<br>
rest of the implementation...<br><br>Thanks for all the help,<br>Sid.<br>