]> Creatis software - clitk.git/blobdiff - registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
Debug RTStruct conversion with empty struc
[clitk.git] / registration / itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
index 96e8f0a125bf4d10df79bc2553d6ec33b75b0fb7..9f717668e4d79e068e67099dc7a432aa68847953 100644 (file)
@@ -183,7 +183,11 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 template <class TFixedImage, class TMovingImage>
 void
 MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
+#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 ))
+::Initialize(void)
+#else
 ::Initialize(void) throw ( ExceptionObject )
+#endif
 {
   this->Superclass::Initialize();
   this->Superclass::MultiThreadingInitialize();
@@ -764,9 +768,9 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
       // check for non-zero bin contribution
       if( jointPDFValue > 1e-16 &&  movingImagePDFValue > 1e-16 ) {
 
-        double pRatio = vcl_log(jointPDFValue / movingImagePDFValue );
+        double pRatio = std::log(jointPDFValue / movingImagePDFValue );
         if( fixedImagePDFValue > 1e-16) {
-          sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue ) );
+          sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue ) );
         }
 
       }  // end if-block to check non-zero bin contribution
@@ -1089,10 +1093,10 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
       // check for non-zero bin contribution
       if( jointPDFValue > 1e-16 &&  movingImagePDFValue > 1e-16 ) {
 
-        double pRatio = vcl_log(jointPDFValue / movingImagePDFValue );
+        double pRatio = std::log(jointPDFValue / movingImagePDFValue );
 
         if( fixedImagePDFValue > 1e-16) {
-          sum += jointPDFValue * ( pRatio - vcl_log(fixedImagePDFValue ) );
+          sum += jointPDFValue * ( pRatio - std::log(fixedImagePDFValue ) );
         }
 
         if( this->m_UseExplicitPDFDerivatives ) {