Hi Luis,<div>Adding the method GetMetric() to itkMIRegistrationFunction.h seems to be working for me.</div><div><br></div><div>Thanks,</div><div>Somi<br>
<br><br><div class="gmail_quote">On Wed, Dec 1, 2010 at 9:57 PM, Luis Ibanez <span dir="ltr">&lt;<a href="mailto:luis.ibanez@kitware.com">luis.ibanez@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi Somi,<br>
<br>
After comparing<br>
<br>
itkMIRegistrationFunction.txx<br>
itkSymmetricForcesDemonsRegistrationFunction.txx<br>
<br>
It seems that you are right, simply adding the<br>
method GetMetric() to itkMIRegistrationFunction.h<br>
<br>
should do the trick.<br>
<br>
<br>
Note that the internal member variable that<br>
GetMetric() should return is &quot;m_MetricTotal&quot;<br>
as computed in line:535 of itkMIRegistrationFunction.txx<br>
<br>
<br>
Please let us know if that works for you.<br>
<br>
The ITK registration framework is being refactored<br>
for ITKv4, and this may be something that we may<br>
want to include.<br>
<br>
<br>
     Thanks<br>
<br>
<br>
          Luis<br>
<br>
<br>
---------------------------------------------<br>
<div><div></div><div class="h5">On Mon, Nov 29, 2010 at 10:18 AM, somi &lt;<a href="mailto:seesomi@gmail.com">seesomi@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt; I am trying to use different finite difference functions as listed at<br>
&gt;  <a href="http://www.itk.org/Doxygen/html/group__FiniteDifferenceFunctions.html" target="_blank">http://www.itk.org/Doxygen/html/group__FiniteDifferenceFunctions.html</a><br>
&gt; in itk::CurvatureRegistrationFilter .<br>
&gt; However, itk::CurvatureRegistrationFilter requires a GetMetric() function<br>
&gt; which is implemented only in few finite difference functions<br>
&gt; (e.g. itk::FastSymmetricForcesDemonsRegistrationFunction ).<br>
&gt; Is there any way I could use Mutual Information function<br>
&gt; with itk::CurvatureRegistrationFilter ? Do I have to implement a<br>
&gt; GetMetric()<br>
&gt; in itk::MIRegistrationFunction&lt; TFixedImage, TMovingImage, TDeformationField<br>
&gt;&gt; ?<br>
&gt; Thanks,<br>
&gt; Somi<br>
</div></div>&gt; _____________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Kitware offers ITK Training Courses, for more information visit:<br>
&gt; <a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the ITK FAQ at:<br>
&gt; <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br></div>