]> Creatis software - clitk.git/blobdiff - registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx
itk4 Remove ITK_USE_OPTIMIZED_REGISTRATION_METHODS
[clitk.git] / registration / itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx
index dcc98f6bdb07bb797180306bee54974dd9a6fd47..feaeaaff1f0370ad233ac40c18e79daccbe3c1f2 100644 (file)
@@ -213,7 +213,12 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   }
 
   // Jacobian should be evaluated at the unmapped (fixed image) point.
+#if ITK_VERSION_MAJOR >= 4
+  TransformJacobianType jacobian;
+  transform->ComputeJacobianWithRespectToParameters(this->m_FixedImageSamples[fixedImageSample].point, jacobian);
+#else
   const TransformJacobianType & jacobian = transform ->GetJacobian( this->m_FixedImageSamples[fixedImageSample].point );
+#endif
   //double sum;
   unsigned int par, dim;
   for( par=0; par<this->m_NumberOfParameters; par+=3) {