]> Creatis software - clitk.git/blobdiff - registration/clitkOptNormalizedCorrelationImageToImageMetric.txx
Order stations, remove debug, correct structures names
[clitk.git] / registration / clitkOptNormalizedCorrelationImageToImageMetric.txx
index 41a1af00916f0766c60c1361d19817bb1483f831..e8d4c271316e9b735b1657cfec59203a65222fe8 100644 (file)
@@ -3,7 +3,7 @@
 
   Authors belong to:
   - University of LYON              http://www.universite-lyon.fr/
-  - Léon Bérard cancer center       http://oncora1.lyon.fnclcc.fr
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
   - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
 
   This software is distributed WITHOUT ANY WARRANTY; without even
@@ -14,7 +14,7 @@
 
   - BSD        See included LICENSE.txt file
   - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
-======================================================================-====*/
+===========================================================================**/
 
 #ifndef __clitkOptNormalizedCorrelationImageToImageMetric_txx
 #define __clitkOptNormalizedCorrelationImageToImageMetric_txx
@@ -381,8 +381,13 @@ NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
   }
 
   // Jacobian should be evaluated at the unmapped (fixed image) point.
+#if ITK_VERSION_MAJOR >= 4
+  TransformJacobianType jacobian;
+  transform->ComputeJacobianWithRespectToParameters(fixedImagePoint, jacobian);
+#else
   const TransformJacobianType & jacobian = transform
       ->GetJacobian( fixedImagePoint );
+#endif
 
   for(unsigned int par=0; par<this->m_NumberOfParameters; par++) {
     RealType sumF = itk::NumericTraits< RealType >::Zero;
@@ -433,16 +438,16 @@ NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
   }
   memset( derivative.data_block(),
           0,
-          this->m_NumberOfParameters * sizeof(ITK_TYPENAME DerivativeType::ValueType) );
+          this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
 
   for( unsigned int threadID = 0; threadID<this->m_NumberOfThreads; threadID++ ) {
     memset( m_ThreaderDerivativeF[threadID].data_block(),
             0,
-            this->m_NumberOfParameters * sizeof(ITK_TYPENAME DerivativeType::ValueType) );
+            this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
 
     memset( m_ThreaderDerivativeM[threadID].data_block(),
             0,
-            this->m_NumberOfParameters * sizeof(ITK_TYPENAME DerivativeType::ValueType) );
+            this->m_NumberOfParameters * sizeof(typename DerivativeType::ValueType) );
   }
 
   // MUST BE CALLED TO INITIATE PROCESSING