X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FitkMeanSquaresImageToImageMetricFor3DBLUTFFD.txx;h=67e4ac430e4951b129aa1c97ddddfefaaab55c15;hb=HEAD;hp=88a71c5a0060c2f82294cb64ad3ab3311d974792;hpb=573d80d0f7a17607d2ee883c21c940c0ba020282;p=clitk.git diff --git a/registration/itkMeanSquaresImageToImageMetricFor3DBLUTFFD.txx b/registration/itkMeanSquaresImageToImageMetricFor3DBLUTFFD.txx index 88a71c5..67e4ac4 100644 --- a/registration/itkMeanSquaresImageToImageMetricFor3DBLUTFFD.txx +++ b/registration/itkMeanSquaresImageToImageMetricFor3DBLUTFFD.txx @@ -40,9 +40,7 @@ // gets integrated into the main directories. #include "itkConfigure.h" -#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS #include "itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx" -#else #include "itkMeanSquaresImageToImageMetricFor3DBLUTFFD.h" #include "itkImageRegionConstIteratorWithIndex.h" @@ -171,7 +169,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD const unsigned int ParametersDimension = this->GetNumberOfParameters(); derivative = DerivativeType( ParametersDimension ); - derivative.Fill( NumericTraits::Zero ); + derivative.Fill( NumericTraits::Zero ); ti.GoToBegin(); @@ -197,9 +195,8 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) { const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint ); - const TransformJacobianType & jacobian = - this->m_Transform->GetJacobian( inputPoint ); - + TransformJacobianType jacobian; + this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint, jacobian ); const RealType fixedValue = ti.Value(); this->m_NumberOfPixelsCounted++; @@ -285,7 +282,7 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD const unsigned int ParametersDimension = this->GetNumberOfParameters(); derivative = DerivativeType( ParametersDimension ); - derivative.Fill( NumericTraits::Zero ); + derivative.Fill( NumericTraits::Zero ); ti.GoToBegin(); @@ -311,9 +308,8 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD if( this->m_Interpolator->IsInsideBuffer( transformedPoint ) ) { const RealType movingValue = this->m_Interpolator->Evaluate( transformedPoint ); - const TransformJacobianType & jacobian = - this->m_Transform->GetJacobian( inputPoint ); - + TransformJacobianType jacobian; + this->m_Transform->ComputeJacobianWithRespectToParameters( inputPoint, jacobian ); const RealType fixedValue = ti.Value(); this->m_NumberOfPixelsCounted++;