[Insight-users] Cost function value over a region

Luis Ibanez luis.ibanez at kitware.com
Mon Dec 20 18:45:09 EST 2004


Hi Martin,


Some questions:


A)  What "GetNumberOfPixels()" method are you exactly calling ?
     I don't think there is a method with this name on the
     Image metrics...


B)  The number of samples used shouldn't be the full number
     of pixels in the image. That will be a killer for the
     performance of the metric. The number of samples should
     be in the range of 2%-10% of the total number of pixels.


C)  What specific implementation of Mutual Information are you using ?
     There are 4 of them in ITK:

        - Viola & Wells
        - Mattes
        - KullbackLiebler
        - NormalizedMutualInformation

http://www.itk.org/Insight/Doxygen/html/group__RegistrationMetrics.html




Please let us know,



   Thanks



      Luis



----------------------------
kavec at messi.uku.fi wrote:

> Hi Luis.
> 
> thanks for your message.
> 
> Quoting Luis Ibanez <luis.ibanez at kitware.com>:
> 
> 
>>Hi Martin,
>>
>>Your code seems to be ok.
> 
> 
> Wow. This really makes me happy.
> :)
> 
> 
>>How small is the region in your mask ?
> 
> 
> It is maybe a 1/4 to 1/3 of moving image. I used metric's function 
> "GetNumberOfPixels" to find out how many pixels were considered for metric 
> calculation and no matter if I use the mask or not, I always get the same number 
> equaled to total number of pixels in the image. Is this correct.
> 
> 
>>Note that Mutual Information is actually computed by
>>selecting a small number of pixel samples from your
>>image. That number is typically as low as 50.  In your
>>case it may be happening that the 50 samples are still
>>falling inside the region of your mask, and therefore
>>there is no difference between using the mask or not.
>>
>>
>>If you only want to compute the Mutual Information
>>between two images, you should rather use the example
>>in the Statistics directory:
>>
>>     Insight/Examples/Statistics/
>>                ImageMutualInformation1.cxx
>>
> 
> 
> Great! I didn't know about this one. I'll give it a try.
> 
> 
>>In this example, Mutual Information is computed from the
>>full joint histogram without attemting to do estimation
>>from a subset of samples.  This approach is not efficient
>>for registration because the computational time is too
>>long.   However, for your application, time doesn't seem
>>to be a critical factor.
>>
>>
>>Please let us know if you have further questions,
>>
>>
>>
>>      Thanks
>>
>>
>>          Luis
> 
> 
> Thanks,
> 
> Martin
> 
> 






More information about the Insight-users mailing list