[Insight-users] MattesMutualInformationImageToImageMetric Joint PDF update

TienGarry gjtian at hotmail.com
Fri Jul 25 08:12:31 EDT 2008


Dear All, I read the code of itkMattesMutualInformationImageToImageMetric.txx, I notice thatwhen the joint pdf is updated the affected bins are pdfMovingIndex-1, pdfMovingIndex , and pdfMovingIndex+1, while the fixedimage pdf is updated the affected bin is the FixedImageParzenWindowIndex.The reason is the 3-order and zero-order BSpline kenel is used respectively.Anyone can explain why the joint pdf is affected by 3 bins?Thank you so much. 00764// Since a zero-order BSpline (box car) kernel is used for
00765       // the fixed image marginal pdf, we need only increment the
00766       // fixedImageParzenWindowIndex by value of 1.0.
00767       m_FixedImageMarginalPDF[(*fiter).FixedImageParzenWindowIndex] += 
00768         static_cast<PDFValueType>( 1 );
00769         
00783       // Pointer to affected bin to be updated
00784       JointPDFValueType *pdfPtr = m_JointPDF->GetBufferPointer() +
00785                                    ( (*fiter).FixedImageParzenWindowIndex 
00786                                      * m_JointPDF->GetOffsetTable()[1] );
00787  
00788       // Move the pointer to the first affected bin
00789       int pdfMovingIndex = static_cast<int>( movingImageParzenWindowIndex ) - 1;
00790       pdfPtr += pdfMovingIndex;
00791 
00792       for (; pdfMovingIndex <= static_cast<int>( movingImageParzenWindowIndex )
00793                                 + 2;
00794             pdfMovingIndex++, pdfPtr++ )
00795         {
00796 
00797         // Update PDF for the current intensity pair
00798         double movingImageParzenWindowArg = 
00799           static_cast<double>( pdfMovingIndex ) - 
00800           static_cast<double>( movingImageParzenWindowTerm );
00801 
00802         *(pdfPtr) += static_cast<PDFValueType>( 
00803           m_CubicBSplineKernel->Evaluate( movingImageParzenWindowArg ) );
00804 
00805         }  //end parzen windowing for loop
00806 
00807       } //end if-block check sampleOk
00808     } // end iterating over fixed image spatial sample container for loop
_________________________________________________________________
MSN史诗巨片横空出世,精彩抢先看!
http://im.msn.cn/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20080725/96cbf637/attachment.htm>


More information about the Insight-users mailing list