diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx
index dd0cee047a73f46b3f846bf5fabbbb770d589818..3b2faf981e419fce40aed8700472a8558b6625b9 100644
--- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx
+++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx
@@ -27,9 +27,9 @@
 #include "itkImageLinearConstIteratorWithIndex.h"
 #include "itkImageLinearIteratorWithIndex.h"
 
-#if defined(WIN32) || defined(WIN32CE)
-#define M_PI 3.141592654
-#endif 
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
 
 
 namespace otb
diff --git a/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx b/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx
index 9f595cc6c32f212477127e29978e64bd543b46c7..f9f13e134ffdcf0c66eac73427dae0295effc3b3 100755
--- a/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx
@@ -30,7 +30,9 @@
 #include "itkProgressReporter.h"
 #include <math.h>
 
+#ifndef M_PI
 #define M_PI 3.14159265358979323846
+#endif
 
 namespace otb
 {
diff --git a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
index cc325407241a62658ceb65b2577c78ea8f563b81..2a6e93538856c736fa7bf68fdd14989bb0fb2a2d 100755
--- a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
+++ b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
@@ -31,7 +31,9 @@
 #include <math.h>
 #include "otbMacro.h"
 
+#ifndef M_PI
 #define M_PI 3.14159265358979323846
+#endif
 
 namespace otb
 {
@@ -314,8 +316,10 @@ void LineDetectorImageFilterBase< TInputImage, TOutputImage, InterpolatorType>
             
 	  Index[0] = static_cast<CoordRepType>(xout + Xc);
 	  Index[1] = static_cast<CoordRepType>(yout + Yc);
-                        
-	  PixelValues[dir][zone].push_back(static_cast<double>(interpolator->EvaluateAtContinuousIndex( Index )));
+//THOMAS
+//	  PixelValues[dir][zone].push_back(static_cast<double>(interpolator->EvaluateAtContinuousIndex( Index )));
+          double result = static_cast<double>(interpolator->EvaluateAtContinuousIndex( Index ));
+	  PixelValues[dir][zone].push_back(result );
           
           }      
 
diff --git a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx
index 870708278046833afb790a3fb513637756f463e7..34ee0caff3fb4d12587aa0cbfbb5849343e361f5 100755
--- a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx
@@ -31,7 +31,9 @@
 #include "itkProgressReporter.h"
 #include <math.h>
 
+#ifndef M_PI
 #define M_PI 3.14159265358979323846
+#endif
 
 namespace otb
 {
diff --git a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx
index 1f6e90050b9189fba2112f2029033fa45bfb5ffc..1891ca8313fae4754026b51acfdc1e479eb6836b 100755
--- a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx
+++ b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx
@@ -31,7 +31,9 @@
 #include "itkProgressReporter.h"
 #include <math.h>
 
+#ifndef M_PI
 #define M_PI 3.14159265358979323846
+#endif
 
 namespace otb
 {
diff --git a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx
index 78278dc3dd1314d957f39127e916e699d5cc294f..4701582e37a02d1afa57831cabab68ebac036028 100755
--- a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx
@@ -27,12 +27,13 @@
 #include "itkImageRegionIterator.h"
 #include "itkNeighborhoodAlgorithm.h"
 #include "itkZeroFluxNeumannBoundaryCondition.h"
-//#include "itkOffset.h"
 #include "itkProgressReporter.h"
 #include <math.h>
 #include "otbMacro.h"
 
+#ifndef M_PI
 #define M_PI 3.14159265358979323846
+#endif
 
 namespace otb
 {