[Insight-users] writing my own registration metric

Luis Ibanez luis.ibanez at kitware.com
Tue Aug 29 12:58:22 EDT 2006


Hi Grace,


It is relatively easy to write a new ITK metric. Indeed
the registration framework was designed in order to make
easy for users to add their own components into the
framework {optimizer, metrics, interpolators, transforms}.


The simplest way to write a new Image Metric for ITK
is to take the MeanSquaresImageToImageMetric, rename it
and then modify its code.


You may want to start with the GetValue() method, and
once this is working, add also the GetDerivative() and
GetValueAndDerivative() methods.


Note that these two last methods are optional. They are
needed only in case you use this metric with optimizers
that requires cost-function derivatives such as the
GradientDescent optimizer.

Metrics that only have GetValue() methods can still be
used with optimizers such as the OnePlusOneEvolutionary
optimizer or the AmoebaOptimizer.


Once you get your new ITK metric to work you should
consider submitting it as a paper to the Insight Journal



    Regards,


       Luis



-------------------
Grace Chen wrote:
> Hi there,
>  
> Does anyone has any experience writing his/her own metric to plugin into 
> the registration framework?  I can't find instruction on how to do 
> that....is it feasible?  Can you tell me things to watch out for?
>  
> Grace
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users




More information about the Insight-users mailing list