[Insight-users] Is there a way to get intermediate results from a registration process?

Luis Ibanez luis.ibanez at kitware.com
Thu, 18 Mar 2004 10:03:42 -0500


Hi Pablo,

The "LastTransformParameters" are by definition
the parameters of the last iteration. It is then
normal that their values are only set at the end
of the optimization.



What you might want to use is the optimizer method:

             GetCurrentPosition()


that will return to you the current array of
parameters. You can use this array for setting the
parameters of the current transform and resample
the image for an intermediate visualization.



You will find examples on the use of the method
GetCurrentPosition() in the files:


   Insight/Examples/Registration
               ImageRegistration2.cxx
               ImageRegistration3.cxx
               ImageRegistration4.cxx
               ImageRegistration5.cxx
               ImageRegistration6.cxx
               ImageRegistration7.cxx
               ImageRegistration8.cxx
               ImageRegistration9.cxx
               ModelToImageRegistration1.cxx
               MultiResImageRegistration1.cxx
               MultiResImageRegistration2.cxx
               MultiresolutionPyramidImageFilter1.cxx



Please let us know if you have further questions.


   Thanks


     Luis



---------------------------
Pablo D. Burstein wrote:

> Hi,
> 
>    I'd need to present intermediate images along a registration process, 
> i.e., be able to obtain the transform parameters AT EACH ITERATION step, 
> in order to resample and show the (processed) moving image. So far, I've 
> found the method ImageRegistrationMethod::GetLastTranformParameters(), 
> but it seems these are only updated AT THE END of the registration 
> process (after the optimizer stopped).
> 
> Thank you,
> Pablo
>