]> Creatis software - clitk.git/blobdiff - registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx
Add code for computing FuzzyMap only (without threshold)
[clitk.git] / registration / clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx
index 0ee3e6ef635a287086b9f4d9386e535c45eff332..643b8020f751979f3a6abd5ebf5e4d2cbe2d8fca 100644 (file)
@@ -381,7 +381,12 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<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++)
 //            {
@@ -457,16 +462,16 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<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