From 42ad99e255a51c2a2bb271ed2d87d16c99ed146a Mon Sep 17 00:00:00 2001
From: Cyrille Valladeau <cyrille.valladeau@c-s.fr>
Date: Wed, 16 Jan 2008 08:00:16 +0000
Subject: [PATCH] Correction sur les interpolateurs.

---
 Code/Common/otbGenericInterpolateImageFunction.txx | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/Code/Common/otbGenericInterpolateImageFunction.txx b/Code/Common/otbGenericInterpolateImageFunction.txx
index 974c728d59..5a89b1b827 100644
--- a/Code/Common/otbGenericInterpolateImageFunction.txx
+++ b/Code/Common/otbGenericInterpolateImageFunction.txx
@@ -99,7 +99,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
 ::Modified()
 {
   Superclass::Modified();
-  m_TablesHaveBeenGenerated=false;
+  m_TablesHaveBeenGenerated = false;
   
 }
 
@@ -272,22 +272,22 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
       }
     }
   if (m_NormalizeWeight == true)
-    {
-      double sum = 0.;
+    {   
       for( unsigned int dim = 0; dim < ImageDimension; dim++ )
-	{
+	{ 
+	  double sum = 0.;
 	  for( unsigned int i = 0; i < m_WindowSize; i++)
 	    {
 	      // Compute the weight for this m
+	      std::cout<<xWeight[dim][i]<<std::endl;
 	      sum += xWeight[dim][i];
 	    }
-	}
-      for( unsigned int dim = 0; dim < ImageDimension; dim++ )
-	{
+	  std::cout<<"°°°°°°°°°°°°°"<<sum<<std::endl;
 	  for( unsigned int i = 0; i < m_WindowSize; i++)
 	    {
 	      // Compute the weight for this m
 	      xWeight[dim][i] =  xWeight[dim][i]/sum;
+    std::cout<<xWeight[dim][i]<<std::endl;
 	    }
 	}
     }
-- 
GitLab