X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=registration%2FclitkCorrelationRatioImageToImageMetric.txx;h=1454539c8183b24d2d56a8239d027061076732d9;hb=0a6ce0aedf87be56afa381561b8d5b7b7822fa15;hp=e7133ca69da81d03113c216b952f4ffc6b1a829c;hpb=765020625fbc092d283e221e36c83e60a1844cb7;p=clitk.git diff --git a/registration/clitkCorrelationRatioImageToImageMetric.txx b/registration/clitkCorrelationRatioImageToImageMetric.txx index e7133ca..1454539 100644 --- a/registration/clitkCorrelationRatioImageToImageMetric.txx +++ b/registration/clitkCorrelationRatioImageToImageMetric.txx @@ -51,7 +51,11 @@ CorrelationRatioImageToImageMetric template void CorrelationRatioImageToImageMetric +#if ( ( ITK_VERSION_MAJOR == 4 ) && ( ITK_VERSION_MINOR > 12 ) || ( ITK_VERSION_MAJOR > 4 )) +::Initialize(void) +#else ::Initialize(void) throw ( ExceptionObject ) +#endif { this->Superclass::Initialize(); @@ -227,7 +231,7 @@ CorrelationRatioImageToImageMetric FixedImageType> FixedIteratorType; typedef itk::ImageRegionConstIteratorWithIndex< - ITK_TYPENAME Superclass::GradientImageType> GradientIteratorType; + typename Superclass::GradientImageType> GradientIteratorType; FixedIteratorType ti( fixedImage, this->GetFixedImageRegion() ); @@ -240,7 +244,7 @@ CorrelationRatioImageToImageMetric const unsigned int ParametersDimension = this->GetNumberOfParameters(); derivative = DerivativeType( ParametersDimension ); - derivative.Fill( itk::NumericTraits::Zero ); + derivative.Fill( itk::NumericTraits::Zero ); ti.GoToBegin(); @@ -266,9 +270,8 @@ CorrelationRatioImageToImageMetric 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++; @@ -343,7 +346,7 @@ CorrelationRatioImageToImageMetric FixedImageType> FixedIteratorType; typedef itk::ImageRegionConstIteratorWithIndex< - ITK_TYPENAME Superclass::GradientImageType> GradientIteratorType; + typename Superclass::GradientImageType> GradientIteratorType; FixedIteratorType ti( fixedImage, this->GetFixedImageRegion() ); @@ -358,7 +361,7 @@ CorrelationRatioImageToImageMetric const unsigned int ParametersDimension = this->GetNumberOfParameters(); derivative = DerivativeType( ParametersDimension ); - derivative.Fill( NumericTraits::Zero ); + derivative.Fill( NumericTraits::Zero ); ti.GoToBegin(); @@ -384,9 +387,8 @@ CorrelationRatioImageToImageMetric 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++;