[Insight-developers] itkOptMattesMutualInformationImageToImageMetric.txx question

Luis Ibanez luis.ibanez at kitware.com
Mon Mar 9 19:18:16 EDT 2009


Hi Andrei,

As part of the MattesMutualInformation metric refactoring that was
performed in the Insight/Code/Review directory, the functionality
of sampling pixels from the FixedImage was moved to the parent class:

                itkOptImageToImageMetric.h
                itkOptImageToImageMetric.txx

In that class,
you want to look at the methods:

         SetNumberOfFixedImageSamples( unsigned int N )
         SetNumberOfMovingImageSamples( unsigned int N )


The default number of Fixed samples is 50000.
(see the file itkOptImageToImageMetric.txx, line 35).


The internal variables that you are looking for in
itkOptMattesMutualInformationImageToImageMetric.txx
are

       this->m_NumberOfMovingImageSamples
       this->m_NumberOfFixedImageSamples


---


I'm confused as to why you seem to be expecting the JointPDFSum
number to be an integer, and to be related to the number of samples.


Can you elaborate on why you are expecting that to be the case ?


    Thanks


      Luis


---------------------------------------
Danilchenko, Andrei Viktorovich wrote:
> Hello, developers.
> 
> I need some help understanding how
> itkOptMattesMutualInformationImageToImageMetric.txx works. I need to know
> the number of samples used for computing MI in GetValue() function. In
> itkMattesMutualInformationImageToImageMetric.txx variable nSamples is used
> for this purpose. But in
> itkOptMattesMutualInformationImageToImageMetric.txx there is no such
> variable. Logically, m_JointPDFSum should contain the number of samples
> used to compute MI. Is that right?
> 
> I tried running a program using these two implementations of Mattes MI and
> output nSamples and m_JointPDFSum. For the same images nSamples was about
> 6 000 000, but m_JointPDFSum was just about 40 000 (moreover, in some
> cases it was not an integer). So, I guess my assumption that m_JointPDFSum
> shows the number of samples used to compute MI is not right. In this case
> could you give me a hint how to find this number?
> 
> Thanks,
> Andrei.
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.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-developers
> 


More information about the Insight-developers mailing list