X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkNormalizedCorrelationImageToImageMetric.txx;h=342549ee72ea276bc0cde8610221b6052cf2d768;hb=fa358ee6738c92950cd9e6c45f55dda6e9b4576e;hp=3708f103ed8391866c17db471e6b0dac444603ae;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/registration/clitkNormalizedCorrelationImageToImageMetric.txx b/registration/clitkNormalizedCorrelationImageToImageMetric.txx index 3708f10..342549e 100644 --- a/registration/clitkNormalizedCorrelationImageToImageMetric.txx +++ b/registration/clitkNormalizedCorrelationImageToImageMetric.txx @@ -251,8 +251,13 @@ NormalizedCorrelationImageToImageMetric const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint ); const RealType fixedValue = ti.Get(); +#if ITK_VERSION_MAJOR >= 4 + TransformJacobianType jacobian; + this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint, jacobian ); +#else const TransformJacobianType & jacobian = this->m_Transform->GetJacobian( inputPoint ); +#endif // Get the gradient by NearestNeighboorInterpolation: // which is equivalent to round up the point components. @@ -427,8 +432,13 @@ NormalizedCorrelationImageToImageMetric const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint ); const RealType fixedValue = ti.Get(); +#if ITK_VERSION_MAJOR >= 4 + TransformJacobianType jacobian; + this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint, jacobian ); +#else const TransformJacobianType & jacobian = this->m_Transform->GetJacobian( inputPoint ); +#endif // Get the gradient by NearestNeighboorInterpolation: // which is equivalent to round up the point components.