]> Creatis software - clitk.git/blobdiff - registration/itkMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
itk4 Renaming
[clitk.git] / registration / itkMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
index 852583b8373c52a804e9e007b329bf07edd6c645..1b38cae012c10569ca6d8add8bcf8ab490d6fb0c 100644 (file)
@@ -1445,9 +1445,13 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
 
     // Compute the transform Jacobian.
     typedef typename TransformType::JacobianType JacobianType;
-    const JacobianType& jacobian =
-      this->m_Transform->GetJacobian(
-        m_FixedImageSamples[sampleNumber].FixedImagePointValue );
+#if ITK_VERSION_MAJOR >= 4
+      JacobianType jacobian;
+      this->m_Transform->ComputeJacobianWithRespectToParameters( m_FixedImageSamples[sampleNumber].FixedImagePointValue, jacobian );
+#else
+      const JacobianType & jacobian =
+        this->m_Transform->GetJacobian( m_FixedImageSamples[sampleNumber].FixedImagePointValue );
+#endif
 
     for ( unsigned int mu = 0; mu < m_NumberOfParameters; mu++ ) {
       double innerProduct = 0.0;
@@ -1480,8 +1484,13 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
       weights = m_BSplineTransformWeightsArray[sampleNumber];
       indices = m_BSplineTransformIndicesArray[sampleNumber];
     } else {
+#if ITK_VERSION_MAJOR >= 4
+      m_BSplineTransform->ComputeJacobianFromBSplineWeightsWithRespectToPosition(
+        m_FixedImageSamples[sampleNumber].FixedImagePointValue, m_Weights, m_Indices );
+#else
       m_BSplineTransform->GetJacobian(
         m_FixedImageSamples[sampleNumber].FixedImagePointValue, m_Weights, m_Indices );
+#endif
     }
 
     for( unsigned int dim = 0; dim < FixedImageDimension; dim++ ) {