]> Creatis software - clitk.git/blobdiff - registration/clitkOptNormalizedCorrelationImageToImageMetric.txx
Sync changes with RTK
[clitk.git] / registration / clitkOptNormalizedCorrelationImageToImageMetric.txx
index ea5d9a5d048dfb88824865a53700ef3f8a6e39a0..e8d4c271316e9b735b1657cfec59203a65222fe8 100644 (file)
@@ -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;