]> Creatis software - clitk.git/blobdiff - registration/clitkCorrelationRatioImageToImageMetric.txx
Add AffineRegistration library to avoid compilation error
[clitk.git] / registration / clitkCorrelationRatioImageToImageMetric.txx
index e7133ca69da81d03113c216b952f4ffc6b1a829c..685a0435e6b619154bb5de6b3e69864f579e5777 100644 (file)
@@ -51,7 +51,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
 template <class TFixedImage, class TMovingImage>
 void
 CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
-::Initialize(void) throw ( ExceptionObject )
+::Initialize(void)
 {
 
   this->Superclass::Initialize();
@@ -227,7 +227,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
   FixedImageType> FixedIteratorType;
 
   typedef  itk::ImageRegionConstIteratorWithIndex<
-  ITK_TYPENAME Superclass::GradientImageType> GradientIteratorType;
+  typename Superclass::GradientImageType> GradientIteratorType;
 
 
   FixedIteratorType ti( fixedImage, this->GetFixedImageRegion() );
@@ -240,7 +240,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
 
   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 );
 
   ti.GoToBegin();
 
@@ -266,9 +266,8 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
     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 +342,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
   FixedImageType> FixedIteratorType;
 
   typedef  itk::ImageRegionConstIteratorWithIndex<
-  ITK_TYPENAME Superclass::GradientImageType> GradientIteratorType;
+  typename Superclass::GradientImageType> GradientIteratorType;
 
 
   FixedIteratorType ti( fixedImage, this->GetFixedImageRegion() );
@@ -358,7 +357,7 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
 
   const unsigned int ParametersDimension = this->GetNumberOfParameters();
   derivative = DerivativeType( ParametersDimension );
-  derivative.Fill( NumericTraits<ITK_TYPENAME DerivativeType::ValueType>::Zero );
+  derivative.Fill( NumericTraits<typename DerivativeType::ValueType>::Zero );
 
   ti.GoToBegin();
 
@@ -384,9 +383,8 @@ CorrelationRatioImageToImageMetric<TFixedImage,TMovingImage>
     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++;