]> Creatis software - clitk.git/blobdiff - registration/clitkCorrelationRatioImageToImageMetric.txx
itk4 Renaming
[clitk.git] / registration / clitkCorrelationRatioImageToImageMetric.txx
index e7133ca69da81d03113c216b952f4ffc6b1a829c..aac2a786560e270580faafdee5155b488b327fde 100644 (file)
@@ -266,8 +266,13 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
     if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) {
       const RealType movingValue  = this->m_Interpolator->Evaluate( transformedPoint );
 
+#if ITK_VERSION_MAJOR >= 4
+      TransformJacobianType jacobian;
+      this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint , jacobian);
+#else
       const TransformJacobianType & jacobian =
         this->m_Transform->GetJacobian( inputPoint );
+#endif
 
 
       const RealType fixedValue     = ti.Value();
@@ -384,8 +389,13 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
     if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) {
       const RealType movingValue  = this->m_Interpolator->Evaluate( transformedPoint );
 
+#if ITK_VERSION_MAJOR >= 4
+      TransformJacobianType jacobian;
+        this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint, jacobian );
+#else
       const TransformJacobianType & jacobian =
         this->m_Transform->GetJacobian( inputPoint );
+#endif
 
 
       const RealType fixedValue     = ti.Value();