]> Creatis software - clitk.git/blobdiff - registration/clitkGenericMetric.txx
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
[clitk.git] / registration / clitkGenericMetric.txx
index 58e681aeda3d6f2110d6bd1c86fb0e28b62146b0..cbbcaa04a81ed6a02e088a4f364a7f7c0292c36f 100644 (file)
@@ -35,7 +35,7 @@ GenericMetric<args_info_type, FixedImageType, MovingImageType>::GenericMetric()
   m_Maximize=false;
   m_Verbose=false;
   m_FixedImageRegionGiven=false;
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
   m_FixedImageSamplesIntensityThreshold=0;
   m_UseFixedImageSamplesIntensityThreshold=false;
 #endif
@@ -274,7 +274,7 @@ GenericMetric<args_info_type,FixedImageType, MovingImageType>::GetMetricPointer(
   //m_Metric->SetFixedImageRegion(mask_region);
 
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 
   //============================================================================
   // Set the lower intensity threshold
@@ -402,13 +402,13 @@ GenericMetric<args_info_type,FixedImageType, MovingImageType>::GetMetricPointer(
           }
 
           // Intensity?
-          if( m_UseFixedImageSamplesIntensityThreshold &&
-              randIter.Get() < m_FixedImageSamplesIntensityThreshold ) {
-            ++randIter;
-              //if (m_Verbose) std::cout << "not in threshold" << std::endl;
-              count_not_thres++;
-            continue;
-          }
+//           if( m_UseFixedImageSamplesIntensityThreshold &&
+//               randIter.Get() < m_FixedImageSamplesIntensityThreshold ) {
+//             ++randIter;
+//               //if (m_Verbose) std::cout << "not in threshold" << std::endl;
+//               count_not_thres++;
+//             continue;
+//           }
 
           // Add point to the numbers
           fiic.push_back(index);