// gets integrated into the main directories.
#include "itkConfigure.h"
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
#include "clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx"
#else
const unsigned int ParametersDimension = this->GetNumberOfParameters();
derivative = DerivativeType( ParametersDimension );
- derivative.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivative.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
DerivativeType derivativeF = DerivativeType( ParametersDimension );
- derivativeF.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivativeF.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
DerivativeType derivativeM = DerivativeType( ParametersDimension );
- derivativeM.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivativeM.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
ti.GoToBegin();
// First compute the sums
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.
const unsigned int ParametersDimension = this->GetNumberOfParameters();
derivative = DerivativeType( ParametersDimension );
- derivative.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivative.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
DerivativeType derivativeF = DerivativeType( ParametersDimension );
- derivativeF.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivativeF.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
DerivativeType derivativeM = DerivativeType( ParametersDimension );
- derivativeM.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivativeM.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
DerivativeType derivativeM1 = DerivativeType( ParametersDimension );
- derivativeM1.Fill( itk::NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+ derivativeM1.Fill( itk::NumericTraits<typename DerivativeType::ValueType>::Zero );
ti.GoToBegin();
// First compute the sums
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.