[Insight-users] Changing the objective function

Luis Ibanez luis.ibanez at kitware.com
Sun Apr 25 17:12:52 EDT 2010


HI Abhik,

You certainly have to write a new Metric
class for implementing this.

The easy option that comes to mind,  is to
create a metric that internally uses both the Metrics:

itkMattesMutualInformationImageToImageMetric.h
itkGradientDifferenceImageToImageMetric.h


In your new class, you implement a GetValue()
method that calls the GetValue() method of each
one of the two metrics and compose them with
a linear combination.

Ideally the two internal metrics could be instantiated
as member variables, so that you only need to
initialize them once.

You are strongly encouraged to contribute this
new class to the Insight Journal.    :-)

         http://www.insight-journal.org


    Regards,


          Luis


---------------------------------------------------------------------
On Sun, Apr 25, 2010 at 12:29 PM, Abhik Datta <findabhik at gmail.com> wrote:

> Hi All,
>
> I am using Mattes Mutual Information registration to register PET / CT data
> and in my research I am trying to find the effect of adding two terms to my
> objective function which controls the effect of the gradient matching.
>
> My question is how do I create the new metric class?
>
> If you can point me to some example code it will be really helpful. The
> metric itself is very easy to calculate, since I have the implementation for
> calculating the three terms already. I just need the new metric to be say:
>
> Mattes_MI + x +y instead of just Mattes_MI
>
> also is there any easier way of doing this? any suggestions will be
> helpful.
>
> Thanks & Regards,
> Abhik.
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100425/8d12af15/attachment.htm>


More information about the Insight-users mailing list