[Insight-users] How to make NMI faster?

Sean Ziegeler sean.ziegeler at nrlssc.navy.mil
Mon Dec 17 13:16:57 EST 2012


I tried the same approach once.  I did indeed get NMI output as the 
metric in the text output of the modified filter as it iterated through 
the registration.  However, it did not change the transform results at all.

I suspect that was because I was using an optimizer that converges to a 
solution using the gradient (LBFGSB, conjugate-gradient, etc.).  To fix 
this, my guess is that one also needs to modify the metric *gradient* 
calculation of the Mattes MI filter.

An alternative approach would be to use an optimizer that ignores the 
gradient (like One-Plus-One Evolutionary or SPSA).  However, the 
convergence would likely be MUCH slower.

Unfortunately, NMI was never much of a priority for my work, so I didn't 
get any farther than speculating on how to fix it.

-Sean

On 12/11/12 16:53, Josem wrote:
> Hello I am looking for ways on how to make NMI run faster; the implementation
> in :
> "itkNormalizedMutualInformationHistogramImageToImageMetric.h"
> is slow and we need something that could run  faster.
>
> This is a follow up of this earlier thread:
> http://itk-users.7.n7.nabble.com/Modifying-Mattes-MI-to-provide-a-Normalized-MI-td30155.html#a30166
>
> I found this post earlier:
> http://public.kitware.com/pipermail/insight-users/2006-May/017911.html
> but it seems outdated, It says that I should modify the lines 815-832, but
> in today's implementation the code is different.
>
> So I am modifying Mattes MI by changing the following line:
>   //sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue) );
>
> with this one:
> sum +=
> vcl_log(fixedImagePDFValue*movingImagePDFValue)/vcl_log(jointPDFValue);
>
> This modification looks like a good practical way of calculating the
> normalized mutual information, using the
> itkMattesMutualInformationImageToImageMetric.hxx implementation.
>
> Please feel free to share any thoughts or suggestions.
> thanks in advance.
> Jose
>
>
>
> --
> View this message in context: http://itk-users.7.n7.nabble.com/How-to-make-NMI-faster-tp30350.html
> Sent from the ITK - Users mailing list archive at Nabble.com.
> _____________________________________
> 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.php
>
> 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
>


More information about the Insight-users mailing list