[Insight-users] Speed of Mutual Information calculation

Mathieu De Craene decraene at tele.ucl.ac.be
Tue May 16 13:43:42 EDT 2006


Le mardi 16 mai 2006 à 12:00 -0400, Karthik Krishnan a écrit :
> Markus Weigert wrote:
> 
> > Hi Luis,
> >
> > thanks for your response.
> > I use the Viola - Wells implementation.
> > Strangely, the Mattes implementation is much faster.
> 
> That is strange. Is this for the same number of spatial samples in
> both 
> Viola-Wells and Mattes and for the same number of iterations in both 
> cases. I would think *one iteration* of Mattes should be slower than 
> *one iteration* of Viola-wells cause of the BSpline based parzen
> windowing.
> 

In Viola-Wells implementation, the joint probability of fixed and moving
images intensities is not represented by a joint histogram. There is a
double summation over the two sets of samples for computing the
measure :

[ see line 228 in itkMutualInformationImageToImageMetric.txx (in the
GetValue() method) ]

        for( biter = m_SampleB.begin() ; biter != bend; ++biter )
        {
         (...)
         for( aiter = m_SampleA.begin() ; aiter != aend; ++aiter )
            {
         (...)



Since Mattes uses a joint histogram, a single loop runs over all samples
for estimating the joint probability. Once this joint probability is
known, the computation of the measure is really fast.



This algorithmic difference might explain significant computation times
between the two metrics ...


HTH,


Math.
        
> > I compiled for release with dbg. information on VC6
> > and used GradientDescentOptimizer, not 
> > RegularStepGradientDescentOptimizer.
> > I plot the progress from a Command Observer and currently don't use 
> > multiresolution
> > (only on the original resolution).
> >
> > Cheers,
> > Markus
> >
> >
-- 
Mathieu De Craene <decraene at tele.ucl.ac.be>
010 47 93 53 (lab) - 0478 51 54 54 (cell) - 010 47 20 89 (fax)
http://www.tele.ucl.ac.be/~decraene



More information about the Insight-users mailing list