diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8eca7bdb2323a4b05cb5f3c00a3d50a3ddeb84d0..14387a26a02c2c967648b7148c348fc1b850d5fe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,7 +1,7 @@
 # This is the root OTB CMakeLists file.
 # $Id$
 #
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
 IF(COMMAND CMAKE_POLICY)
   CMAKE_POLICY(SET CMP0003 NEW)
 ENDIF(COMMAND CMAKE_POLICY)
@@ -587,7 +587,7 @@ IF(OTB_USE_EXTERNAL_GDAL)
   ENDIF (NOT JPEG_LIBRARY)
   ENDIF(GDAL_HAS_JPEG)
 
-  # Check if ${GDAL_LIBRARY} has jpeg library
+  # Check if ${GDAL_LIBRARY} has ogr library
   TRY_COMPILE(GDAL_HAS_OGR
   ${CMAKE_CURRENT_BINARY_DIR}/CMake
   ${CMAKE_CURRENT_SOURCE_DIR}/CMake/TestGDALHasOGR.cxx
diff --git a/Code/Common/otbDrawPathListFilter.h b/Code/Common/otbDrawPathListFilter.h
index bf56ce8d31b37d341fd6a6322f5a56ffd5dcb497..b9c4ed284115bbf23b76eae43ef0aa4b81b09bc4 100644
--- a/Code/Common/otbDrawPathListFilter.h
+++ b/Code/Common/otbDrawPathListFilter.h
@@ -31,9 +31,9 @@ namespace otb
  * It then uses the otb::PolyLineImageIterator to draw each polyline. This iterator uses
  * the general Bresenham algorithm known to be efficient in segment drawing.
  *
- * If the UsePathInternalValue is toggled, the filter check if the metadata dictionnary of the input path has a "Value" key.
- * If it is the case, it will use this value to draw the Path instead of the default value. If not, it will use the default
- * value.
+ * If the UsePathInternalValue is toggled, the filter check if the metadata dictionnary of
+ * the input path has a "Value" key. If it is the case, it will use this value to draw the
+ * Path instead of the default value. If not, it will use the default value.
  *
  * \sa PolyLineParametricPathWithValue
  * \sa MetaDataDictionary
@@ -47,10 +47,10 @@ class ITK_EXPORT DrawPathListFilter : public itk::ImageToImageFilter<TInputImage
 {
 public:
   /** Standard class typedefs. */
-  typedef DrawPathListFilter                Self;
+  typedef DrawPathListFilter                                   Self;
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage>    Superclass;
-  typedef itk::SmartPointer<Self>           Pointer;
-  typedef itk::SmartPointer<const Self>     ConstPointer;
+  typedef itk::SmartPointer<Self>                              Pointer;
+  typedef itk::SmartPointer<const Self>                        ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
@@ -59,19 +59,19 @@ public:
   itkTypeMacro(DrawPathListFilter,ImageToImageFilter);
 
   /** Some convenient typedefs. */
-  typedef          TInputImage                    InputImageType;
-  typedef typename InputImageType::Pointer        InputImagePointerType;
-  typedef typename InputImageType::ConstPointer   InputImageConstPointerType;
-  typedef typename InputImageType::RegionType     InputImageRegionType;
-  typedef typename InputImageType::PixelType      InputImagePixelType;
-  typedef typename InputImageType::SizeType       InputImageSizeType;
-  typedef typename InputImageType::ValueType      InputImageValueType;
-
-  typedef TInputPath InputPathType;
-  typedef typename InputPathType::Pointer InputPathPointerType;
-  typedef otb::ObjectList<InputPathType> InputPathListType;
+  typedef          TInputImage                     InputImageType;
+  typedef typename InputImageType::Pointer         InputImagePointerType;
+  typedef typename InputImageType::ConstPointer    InputImageConstPointerType;
+  typedef typename InputImageType::RegionType      InputImageRegionType;
+  typedef typename InputImageType::PixelType       InputImagePixelType;
+  typedef typename InputImageType::SizeType        InputImageSizeType;
+  typedef typename InputImageType::ValueType       InputImageValueType;
+
+  typedef          TInputPath                      InputPathType;
+  typedef typename InputPathType::Pointer          InputPathPointerType;
+  typedef otb::ObjectList<InputPathType>           InputPathListType;
   typedef typename InputPathListType::ConstPointer InputPathListConstPointerType;
-  typedef typename InputPathListType::Pointer InputPathListPointerType;
+  typedef typename InputPathListType::Pointer      InputPathListPointerType;
 
   typedef          TOutputImage                    OutputImageType;
   typedef typename OutputImageType::Pointer        OutputImagePointerType;
@@ -116,9 +116,11 @@ protected:
 private:
   DrawPathListFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
+
   /** Default value to draw */
   OutputImagePixelType m_PathValue;
-  /** If set to true, the algorithm try to use path internal metadatadictionnary value */
+
+  /** If set to true, the algorithm try to use path internal metadata dictionnary value */
   bool m_UseInternalPathValue;
 
   bool m_AddValue;
@@ -131,4 +133,3 @@ private:
 #endif
 
 #endif
-
diff --git a/Code/Common/otbDrawPathListFilter.txx b/Code/Common/otbDrawPathListFilter.txx
index bde5aabde73b3f0125263d370b2bec13393993ed..63d92e6502b4a4fc74ae974aeee4a729094c4a4b 100644
--- a/Code/Common/otbDrawPathListFilter.txx
+++ b/Code/Common/otbDrawPathListFilter.txx
@@ -42,7 +42,6 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
   m_AddValue = false;
 }
 
-
 template <class TInputImage, class TInputPath,class TOutputImage>
 void
 DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
@@ -62,6 +61,7 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
   }
   return static_cast<const InputPathListType *>(this->ProcessObjectType::GetInput(1));
 }
+
 /**
  * Main computation method
  */
@@ -78,9 +78,9 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
   outputPtr->FillBuffer(itk::NumericTraits<OutputImagePixelType>::Zero);
 
   // First, we copy input to output
-  typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
-  typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
-  typedef typename InputPathListType::ConstIterator PathListIteratorType;
+  typedef itk::ImageRegionIterator<OutputImageType>            OutputIteratorType;
+  typedef itk::ImageRegionConstIterator<InputImageType>        InputIteratorType;
+  typedef typename InputPathListType::ConstIterator            PathListIteratorType;
   typedef PolyLineImageIterator<OutputImageType,InputPathType> PolyLineIteratorType;
 
   OutputIteratorType outIt(outputPtr,outputPtr->GetLargestPossibleRegion());
@@ -94,7 +94,7 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
   }
 
   // Then we use otb::PolyLineImageIterator to draw polylines
-  for (PathListIteratorType plIt = pathListPtr->Begin(); plIt!=pathListPtr->End();++plIt)
+  for (PathListIteratorType plIt = pathListPtr->Begin(); plIt != pathListPtr->End(); ++plIt)
   {
     OutputImagePixelType value = itk::NumericTraits<OutputImagePixelType>::Zero;
     if (m_UseInternalPathValue && plIt.Get()->GetMetaDataDictionary().HasKey("Value"))
@@ -119,6 +119,7 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
     }
   }
 }
+
 /**
  * Printself method
  */
@@ -129,7 +130,7 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
 {
   Superclass::PrintSelf(os, indent);
 }
+
 } // end namespace otb
 
 #endif
-
diff --git a/Code/Common/otbPolyLineImageConstIterator.h b/Code/Common/otbPolyLineImageConstIterator.h
index d7d41585c6d51dcdb18ad3cdb828468e3933fa3a..ed5c5f95937bc4925e4e65fa6a78aba0c26b6587 100644
--- a/Code/Common/otbPolyLineImageConstIterator.h
+++ b/Code/Common/otbPolyLineImageConstIterator.h
@@ -7,12 +7,12 @@
 
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-See OTBCopyright.txt for details.
+  See OTBCopyright.txt for details.
 
 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE,  See the above copyright notices for more information.
+     PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
 #ifndef __otbPolyLineImageConstIterator_h
@@ -105,13 +105,16 @@ public:
   virtual ~PolyLineImageConstIterator() {};
 
 protected: //made protected so other iterators can access
+
   /** Smart pointer to the source image. */
   typename ImageType::ConstWeakPointer m_Image;
+
   /** Smart pointer to the path */
   typename PathType::ConstPointer m_Path;
-  InternalImageIteratorType m_InternalImageIterator;
-  VertexIteratorType m_InternalVertexIterator;
+  InternalImageIteratorType       m_InternalImageIterator;
+  VertexIteratorType              m_InternalVertexIterator;
 };
+
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbPolyLineImageConstIterator.txx"
diff --git a/Code/Common/otbPolyLineImageConstIterator.txx b/Code/Common/otbPolyLineImageConstIterator.txx
index ce929f350d4d54cc67de1eb2b04c98bbb04f4b04..8891ad00b1a4ab3689e67444a1f95d3cd73b14e7 100644
--- a/Code/Common/otbPolyLineImageConstIterator.txx
+++ b/Code/Common/otbPolyLineImageConstIterator.txx
@@ -7,12 +7,12 @@
 
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-See OTBCopyright.txt for details.
+  See OTBCopyright.txt for details.
 
 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE,  See the above copyright notices for more information.
+     PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
 #ifndef __otbPolyLineImageConstIterator_txx
@@ -36,29 +36,27 @@ PolyLineImageConstIterator<TImage, TPath>
   m_Image = imagePtr;
   m_Path = pathPtr;
   m_InternalVertexIterator = m_Path->GetVertexList()->Begin();
-  IndexType source,target;
-  for (unsigned int i = 0;i<ImageType::ImageDimension;++i)
+  IndexType source, target;
+  for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
   {
-    source[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
+    source[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
   }
   ++m_InternalVertexIterator;
-  if (m_InternalVertexIterator!=m_Path->GetVertexList()->End())
+  if (m_InternalVertexIterator != m_Path->GetVertexList()->End())
   {
 
-    for (unsigned int i = 0;i<ImageType::ImageDimension;++i)
+    for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
     {
-      target[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
+      target[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
     }
   }
   else
   {
     target = source;
   }
-  m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *>(m_Image.GetPointer()),source,target);
+  m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *> (m_Image.GetPointer()), source, target);
 }
-/**
- * Constructor
- */
+
 template <class TImage, class TPath>
 typename PolyLineImageConstIterator<TImage,TPath>
 ::Self&
@@ -77,25 +75,25 @@ PolyLineImageConstIterator<TImage, TPath>
 ::GoToBegin(void)
 {
   m_InternalVertexIterator = m_Path->GetVertexList()->Begin();
-  IndexType source,target;
-  for (unsigned int i = 0;i<ImageType::ImageDimension;++i)
+  IndexType source, target;
+  for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
   {
-    source[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
+    source[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
   }
   ++m_InternalVertexIterator;
-  if (m_InternalVertexIterator!=m_Path->GetVertexList()->End())
+  if (m_InternalVertexIterator != m_Path->GetVertexList()->End())
   {
 
-    for (unsigned int i = 0;i<ImageType::ImageDimension;++i)
+    for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
     {
-      target[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
+      target[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
     }
   }
   else
   {
     target = source;
   }
-  m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *>(m_Image.GetPointer()),source,target);
+  m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *> (m_Image.GetPointer()), source, target);
 }
 
 template <class TImage, class TPath>
@@ -103,32 +101,34 @@ void
 PolyLineImageConstIterator<TImage,TPath>
 ::operator++()
 {
-//  otbMsgDebugMacro(<<this->GetIndex());
+  //  otbMsgDebugMacro(<<this->GetIndex());
   ++m_InternalImageIterator;
   if (m_InternalImageIterator.IsAtEnd())
   {
-    if (m_InternalVertexIterator!=m_Path->GetVertexList()->End())
+    if (m_InternalVertexIterator != m_Path->GetVertexList()->End())
     {
       IndexType source;
-      for (unsigned int i = 0;i<ImageType::ImageDimension;++i)
+      for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
       {
-        source[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
+        source[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
       }
       // otbMsgDebugMacro(<<"Source: "<<source);
       ++m_InternalVertexIterator;
-      if (m_InternalVertexIterator!=m_Path->GetVertexList()->End())
+      if (m_InternalVertexIterator != m_Path->GetVertexList()->End())
       {
         IndexType target;
-        for (unsigned int i = 0;i<ImageType::ImageDimension;++i)
+        for (unsigned int i = 0; i < ImageType::ImageDimension; ++i)
         {
-          target[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
+          target[i] = static_cast<unsigned int> (m_InternalVertexIterator.Value()[i]);
         }
         // otbMsgDebugMacro(<<"Target: "<<target);
-        m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *>(m_Image.GetPointer()),source,target);
+        m_InternalImageIterator = InternalImageIteratorType(const_cast<ImageType *> (m_Image.GetPointer()), source,
+            target);
         ++m_InternalImageIterator;
       }
     }
   }
 }
+
 } // End namespace otb
 #endif
diff --git a/Code/Common/otbPolyLineImageIterator.h b/Code/Common/otbPolyLineImageIterator.h
index 4d509f0f2d2b3688dd73065efbeaa54f54eaa44b..71109e46a557136078a808eca3b94f7e45f037c6 100644
--- a/Code/Common/otbPolyLineImageIterator.h
+++ b/Code/Common/otbPolyLineImageIterator.h
@@ -7,12 +7,12 @@
 
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-See OTBCopyright.txt for details.
+  See OTBCopyright.txt for details.
 
 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE,  See the above copyright notices for more information.
+     PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
 #ifndef __otbPolyLineImageIterator_h
@@ -43,7 +43,7 @@ class ITK_EXPORT PolyLineImageIterator
 {
 public:
   /** Standard typedefs */
-  typedef PolyLineImageIterator  Self;
+  typedef PolyLineImageIterator                    Self;
   typedef PolyLineImageConstIterator<TImage,TPath> Superclass;
 
   itkStaticConstMacro(ImageIteratorDimension, unsigned int,
@@ -89,7 +89,8 @@ public:
   {
     this->Superclass::operator=(it);
     return *this;
-  };
+  }
+
   /** Constructor establishes an iterator to walk along a line */
   PolyLineImageIterator(ImageType *imagePtr,PathType * pathPtr)
       : Superclass(imagePtr,pathPtr) {};
diff --git a/Code/FeatureExtraction/otbVectorizationPathListFilter.h b/Code/FeatureExtraction/otbVectorizationPathListFilter.h
index a48cd2f14695812d58c0a952c990d4413a707563..ebe8fa4e7f9118cf19acc0bebe40d1cb7729efbc 100644
--- a/Code/FeatureExtraction/otbVectorizationPathListFilter.h
+++ b/Code/FeatureExtraction/otbVectorizationPathListFilter.h
@@ -7,12 +7,12 @@
 
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-See OTBCopyright.txt for details.
+  See OTBCopyright.txt for details.
 
 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE,  See the above copyright notices for more information.
+     PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
 #ifndef __otbVectorizationPathListFilter_h
@@ -59,18 +59,18 @@ public:
   /** Template parameters typedefs */
   typedef TInputModulus InputModulusType;
   typedef typename InputModulusType::ConstPointer InputModulusConstPointerType;
-  typedef typename InputModulusType::PixelType InputPixelType;
-  typedef typename InputModulusType::PointType PointType;
-  typedef typename InputModulusType::IndexType IndexType;
-
-  typedef TInputDirection InputDirectionType;
-  typedef typename InputDirectionType::ConstPointer InputDirectionConstPointerType;
-  typedef TOutputPath OutputPathType;
-  typedef typename OutputPathType::Pointer OutputPathPointerType;
+  typedef typename InputModulusType::PixelType    InputPixelType;
+  typedef typename InputModulusType::PointType    PointType;
+  typedef typename InputModulusType::IndexType    IndexType;
+
+  typedef TInputDirection                              InputDirectionType;
+  typedef typename InputDirectionType::ConstPointer    InputDirectionConstPointerType;
+  typedef TOutputPath                                  OutputPathType;
+  typedef typename OutputPathType::Pointer             OutputPathPointerType;
   typedef typename OutputPathType::ContinuousIndexType VertexType;
 
   /** Derived typedefs */
-  typedef typename Superclass::OutputPathListType OutputPathListType;
+  typedef typename Superclass::OutputPathListType        OutputPathListType;
   typedef typename Superclass::OutputPathListPointerType OutputPathListPointerType;
 
   /** Set/get the input modulus */
@@ -88,7 +88,7 @@ protected:
 
   /** Other internal useful typedefs */
   typedef otb::Image<bool,InputModulusType::ImageDimension> FlagImageType;
-  typedef typename FlagImageType::Pointer FlagImagePointerType;
+  typedef typename FlagImageType::Pointer                   FlagImagePointerType;
 
   typedef itk::ImageRegionConstIterator<InputModulusType>   ModRegionIteratorType;
   typedef itk::ImageRegionConstIterator<InputDirectionType> DirRegionIteratorType;
@@ -104,11 +104,11 @@ protected:
 
   typedef typename ModNeighborhoodIteratorType::RadiusType RadiusType;
   typedef typename ModNeighborhoodIteratorType::OffsetType OffsetType;
-  typedef std::vector<OffsetType> OffsetVectorType;
+  typedef std::vector<OffsetType>                          OffsetVectorType;
 
   typedef typename OutputPathType::VertexListType VertexListType;
-  typedef typename VertexListType::ConstPointer VertexListPointerType;
-  typedef typename VertexListType::ConstIterator VertexIteratorType;
+  typedef typename VertexListType::ConstPointer   VertexListPointerType;
+  typedef typename VertexListType::ConstIterator  VertexIteratorType;
 
   /** Constructor */
   VectorizationPathListFilter();
diff --git a/Code/FeatureExtraction/otbVectorizationPathListFilter.txx b/Code/FeatureExtraction/otbVectorizationPathListFilter.txx
index 28800682e0ece0fb56af7940d0eb6df68e8065ea..04fddc47956e45d0838187c5f48d4685cae94789 100644
--- a/Code/FeatureExtraction/otbVectorizationPathListFilter.txx
+++ b/Code/FeatureExtraction/otbVectorizationPathListFilter.txx
@@ -7,12 +7,12 @@
 
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
-See OTBCopyright.txt for details.
+  See OTBCopyright.txt for details.
 
 
      This software is distributed WITHOUT ANY WARRANTY; without even
      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-     PURPOSE,  See the above copyright notices for more information.
+     PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
 #ifndef __otbVectorizationPathListFilter_txx
@@ -35,6 +35,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   this->SetNumberOfInputs(2);
   m_AmplitudeThreshold = 1.0;
 }
+
 template <class TInputModulus, class TInputDirection, class TOutputPath>
 void
 VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
@@ -42,6 +43,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
 {
   this->itk::ProcessObject::SetNthInput(0,const_cast<InputModulusType *>(inputModulus));
 }
+
 template <class TInputModulus, class TInputDirection, class TOutputPath>
 const typename VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
 ::InputModulusType *
@@ -54,6 +56,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   }
   return static_cast<const TInputModulus*>(this->itk::ProcessObject::GetInput(0));
 }
+
 template <class TInputModulus, class TInputDirection, class TOutputPath>
 void
 VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
@@ -61,6 +64,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
 {
   this->itk::ProcessObject::SetNthInput(1,const_cast<InputDirectionType *>(inputDirection));
 }
+
 template <class TInputModulus, class TInputDirection, class TOutputPath>
 const typename VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
 ::InputDirectionType *
@@ -73,6 +77,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   }
   return static_cast<const TInputDirection *>(this->itk::ProcessObject::GetInput(1));
 }
+
 /**
  * Main computation method
  */
@@ -102,13 +107,13 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   DirRegionIteratorType dirIt(dirPtr,dirPtr->GetLargestPossibleRegion());
   FlagRegionIteratorType flagIt(flagImage,flagImage->GetLargestPossibleRegion());
 
-  for (modIt.GoToBegin(),dirIt.GoToBegin(),flagIt.GoToBegin();
+  for (modIt.GoToBegin(), dirIt.GoToBegin(), flagIt.GoToBegin();
        (!modIt.IsAtEnd()) && (!dirIt.IsAtEnd()) && (!flagIt.IsAtEnd());
-       ++modIt,++dirIt,++flagIt)
+       ++modIt, ++dirIt, ++flagIt)
   {
     if ((modIt.Get() > m_AmplitudeThreshold) && (!flagIt.Get()))
     {
-      //this is a begining, to follow in two directions
+      //this is a beginning, to follow in two directions
       OutputPathPointerType pathTempDirect = OutputPathType::New();
       OutputPathPointerType pathTempReverse = OutputPathType::New();
       OutputPathPointerType path = OutputPathType::New();
@@ -117,9 +122,9 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
       int  flagReverse = 0;
       double totalAmplitude = 0;
 
-      ModNeighborhoodIteratorType nModIt(radius,modPtr,modPtr->GetLargestPossibleRegion());
-      DirNeighborhoodIteratorType nDirIt(radius,dirPtr,dirPtr->GetLargestPossibleRegion());
-      FlagNeighborhoodIteratorType nFlagIt(radius,flagImage,flagImage->GetLargestPossibleRegion());
+      ModNeighborhoodIteratorType nModIt(radius, modPtr, modPtr->GetLargestPossibleRegion());
+      DirNeighborhoodIteratorType nDirIt(radius, dirPtr, dirPtr->GetLargestPossibleRegion());
+      FlagNeighborhoodIteratorType nFlagIt(radius, flagImage, flagImage->GetLargestPossibleRegion());
 
       for (flagReverse=0; flagReverse < 2; ++flagReverse)
       {
@@ -142,10 +147,10 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
         flagFinish = false;
         while (!flagFinish)
         {
-          offsetVector =GetThreeNeighborOffsetFromDirection(nDirIt.GetCenterPixel(),flagReverse);
+          offsetVector = GetThreeNeighborOffsetFromDirection(nDirIt.GetCenterPixel(),flagReverse);
           OffsetIteratorType vecIt = offsetVector.begin();
           bool flagFound=false;
-          while (vecIt!=offsetVector.end()&&!flagFound)
+          while (vecIt != offsetVector.end() && !flagFound)
           {
             flagFound = nModIt.GetPixel(*vecIt) > 0
                         && !nFlagIt.GetPixel(*vecIt);
@@ -156,26 +161,27 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
             point.Fill(0);
             PointType tmpPoint;
             totalAmplitude = 0;
-            for (vecIt = offsetVector.begin();vecIt!=offsetVector.end();++vecIt)
+            for (vecIt = offsetVector.begin(); vecIt != offsetVector.end(); ++vecIt)
             {
-              totalAmplitude += nModIt.GetPixel(*vecIt);
+              double currentAmplitude = nModIt.GetPixel(*vecIt);
               modPtr->TransformIndexToPhysicalPoint(nModIt.GetIndex(*vecIt),tmpPoint);
-              point[0] += nModIt.GetPixel(*vecIt) * tmpPoint[0];
-              point[1] += nModIt.GetPixel(*vecIt) * tmpPoint[1];
+              point[0] += currentAmplitude * tmpPoint[0];
+              point[1] += currentAmplitude * tmpPoint[1];
+              totalAmplitude += currentAmplitude;
             }
-            point[0] = point[0] / totalAmplitude + modPtr->GetSpacing()[0]/2;
-            point[1] = point[1] / totalAmplitude + modPtr->GetSpacing()[1]/2;
+            point[0] = point[0] / totalAmplitude;
+            point[1] = point[1] / totalAmplitude;
             modPtr->TransformPhysicalPointToContinuousIndex(point,vertex);
             if (flagReverse == 0)
             {
-              // otbMsgDebugMacro(<<"Adding new vertex: "<<vertex);
+//               otbMsgDevMacro(<<"Adding new vertex (direct): "<<vertex);
 
               pathTempDirect->AddVertex(vertex);
             }
             else
             {
 
-              // otbMsgDebugMacro(<<"Adding new vertex: "<<vertex);
+//               otbMsgDevMacro(<<"Adding new vertex (reverse): "<<vertex);
 
               pathTempReverse->AddVertex(vertex);
             }
@@ -185,11 +191,12 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
             IndexType newIndex;
             if (modPtr->TransformPhysicalPointToIndex(point,newIndex))
             {
+//              otbMsgDevMacro(<<"Moving to new center: " << newIndex);
               nModIt.SetLocation(newIndex);
               nDirIt.SetLocation(newIndex);
               nFlagIt.SetLocation(newIndex);
 
-              if (nModIt.GetCenterPixel()==0)
+              if (nModIt.GetCenterPixel() == 0)
               {
                 //we need to check that in case the barycenter is out...
                 flagFinish=true;
@@ -248,6 +255,7 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
     }
   }
 }
+
 /**
  * Compute the 8 neighbors to explore from the direction and the type of search (forward or backward).
  * \param direction The direction
@@ -283,237 +291,239 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   switch ( neighborhoodNumber )
   {
   case 0:
-    tmpOffset[0]=1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]=2;
-    tmpOffset[1]=0;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=2;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=2;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=1;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
 
     break;
 
   case 1:
-    tmpOffset[0]=1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]=2;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=1;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=2;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=2;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
     break;
 
   case 2:
-    tmpOffset[0]=0;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]=0;
-    tmpOffset[1]=2;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=2;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=2;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
     break;
 
   case 3:
-    tmpOffset[0]=-1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]=-2;
-    tmpOffset[1]=2;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
     break;
 
   case 4:
-    tmpOffset[0]=-1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]=-2;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-2;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
     break;
 
   case 5:
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]=-2;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = -2;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 0;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=2;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
     break;
 
   case 6:
-    tmpOffset[0]= 0;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]= 0;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]= 0;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]= 0;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
     break;
 
   case 7:
-    tmpOffset[0]= 1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]= 0;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]= 1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
 
-    tmpOffset[0]= 2;
-    tmpOffset[1]=-2;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = -2;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]= 0;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]= 1;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 2;
-    tmpOffset[1]= 2;
+    tmpOffset[0] = 2;
+    tmpOffset[1] = 2;
     offset.push_back(tmpOffset);
     break;
   }
   return offset;
-}/**
-    * Compute the 3 neighbors to explore from the direction and the type of search (forward or backward).
-    * \param direction The direction
-    * \param flagReverse The type of search
-    * \return The neighborhood
-    */
+}
+
+/**
+ * Compute the 3 neighbors to explore from the direction and the type of search (forward or backward).
+ * \param direction The direction
+ * \param flagReverse The type of search
+ * \return The neighborhood
+ */
 template <class TInputModulus, class TInputDirection, class TOutputPath>
 typename VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
 ::OffsetVectorType
@@ -540,108 +550,109 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
     neighborhoodNumber = (neighborhoodNumber + 4) % 8;
   }
   OffsetType tmpOffset;
+//  otbMsgDevMacro(<<"Direction: " << neighborhoodNumber)
   switch ( neighborhoodNumber )
   {
   case 0:
-    tmpOffset[0]=1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
 
     break;
 
   case 1:
-    tmpOffset[0]=1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
 
     break;
 
   case 2:
-    tmpOffset[0]=0;
-    tmpOffset[1]=1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
 
     break;
 
   case 3:
-    tmpOffset[0]=-1;
-    tmpOffset[1]=1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
 
     break;
 
   case 4:
-    tmpOffset[0]=-1;
-    tmpOffset[1]=0;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
 
     break;
 
   case 5:
-    tmpOffset[0]=-1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = -1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=0;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]=1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
 
     break;
 
   case 6:
-    tmpOffset[0]= 0;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 0;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]= 0;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
 
     break;
 
   case 7:
-    tmpOffset[0]= 1;
-    tmpOffset[1]=-1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = -1;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]= 0;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 0;
     offset.push_back(tmpOffset);
-    tmpOffset[0]= 1;
-    tmpOffset[1]= 1;
+    tmpOffset[0] = 1;
+    tmpOffset[1] = 1;
     offset.push_back(tmpOffset);
 
     break;
@@ -659,5 +670,6 @@ VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
 {
   Superclass::PrintSelf(os, indent);
 }
+
 } // End namespace otb
 #endif
diff --git a/Code/Gui/CMakeLists.txt b/Code/Gui/CMakeLists.txt
index 852d1cc3afb24c7c363f2caa79f52f4e712019e6..d4121a4fbde15fbd41a8bff9f3266933b30d244f 100644
--- a/Code/Gui/CMakeLists.txt
+++ b/Code/Gui/CMakeLists.txt
@@ -2,15 +2,6 @@
 
 FILE(GLOB OTBGui_SRCS "*.cxx" )
 
-
-# To suppress "ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib" error on APPLE and SHARED configuration 
-IF(APPLE AND BUILD_SHARED_LIBS)
-      FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
-        SET(CMAKE_SHARED_LINKER_FLAGS${c} "${CMAKE_SHARED_LINKER_FLAGS${c}};-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
-      ENDFOREACH(c)
-ENDIF(APPLE AND BUILD_SHARED_LIBS)
-
-
 ADD_LIBRARY(OTBGui ${OTBGui_SRCS})
 TARGET_LINK_LIBRARIES (OTBGui OTBCommon ${OTB_VISU_GUI_LIBRARIES})
 IF(OTB_LIBRARY_PROPERTIES)
diff --git a/Code/Projections/otbOrthoRectificationFilter.h b/Code/Projections/otbOrthoRectificationFilter.h
index 16a84571ff3e91991412240a3953e3933ca121c1..9a48d6105f3c7bc22b6db8de3deff33a59244f9e 100644
--- a/Code/Projections/otbOrthoRectificationFilter.h
+++ b/Code/Projections/otbOrthoRectificationFilter.h
@@ -83,12 +83,12 @@ public :
   itkTypeMacro( OrthoRectificationFilter, StreamingResampleImageFilter );
 
   /** Accessors */
-  virtual void SetMapProjection (MapProjectionType* _arg)
+  virtual void SetMapProjection (MapProjectionType* arg)
   {
-    if (this->m_MapProjection != _arg)
+    if (this->m_MapProjection != arg)
     {
-      this->m_MapProjection = _arg;
-      m_CompositeTransform->SetFirstTransform(_arg);
+      this->m_MapProjection = arg;
+      m_CompositeTransform->SetFirstTransform(arg);
       m_IsComputed = false;
       this->Modified();
     }
diff --git a/Code/Visu/CMakeLists.txt b/Code/Visu/CMakeLists.txt
index d43a587b5da37275884581c32ef35052bb711183..b0fcfa82b72ea1bba40e24fff676e8c11db70a1f 100644
--- a/Code/Visu/CMakeLists.txt
+++ b/Code/Visu/CMakeLists.txt
@@ -2,13 +2,6 @@
 
 FILE(GLOB OTBVisu_SRCS "*.cxx" )
 
-# To suppress "ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib" error on APPLE and SHARED configuration 
-IF(APPLE AND BUILD_SHARED_LIBS)
-      FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
-        SET(CMAKE_SHARED_LINKER_FLAGS${c} "${CMAKE_SHARED_LINKER_FLAGS${c}} -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
-      ENDFOREACH(c)
-ENDIF(APPLE AND BUILD_SHARED_LIBS)
-
 ADD_LIBRARY(OTBVisu ${OTBVisu_SRCS})
 TARGET_LINK_LIBRARIES (OTBVisu OTBGui OTBCommon ${OTB_VISU_GUI_LIBRARIES})
 IF(OTB_LIBRARY_PROPERTIES)
diff --git a/Code/Visualization/CMakeLists.txt b/Code/Visualization/CMakeLists.txt
index 9bfc18f098c1e735144c859aea1ff3de4054606e..4f38b18bab4b68d2052b4a0bdb03dd4e112f6d7f 100644
--- a/Code/Visualization/CMakeLists.txt
+++ b/Code/Visualization/CMakeLists.txt
@@ -2,17 +2,10 @@
 
 FILE(GLOB OTBVisualization_SRCS "*.cxx" )
 
-# To suppress "ld: cycle in dylib re-exports with /usr/X11R6/lib/libGL.dylib" error on APPLE and SHARED configuration 
-IF(APPLE AND BUILD_SHARED_LIBS)
-      FOREACH(c "" "_DEBUG" "_RELEASE" "_MINSIZEREL" "_RELWITHDEBINFO")
-        SET(CMAKE_SHARED_LINKER_FLAGS${c} "${CMAKE_SHARED_LINKER_FLAGS${c}} -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
-      ENDFOREACH(c)
-ENDIF(APPLE AND BUILD_SHARED_LIBS)
-
 FLTK_WRAP_UI(OTBVisualization otbImageWidgetPackedManager.fl otbImageWidgetSplittedManager.fl)
 
 ADD_LIBRARY(OTBVisualization ${OTBVisualization_SRCS} ${OTBVisualization_FLTK_UI_SRCS})
-TARGET_LINK_LIBRARIES (OTBVisualization OTBGui OTBCommon ${OTB_VISU_GUI_LIBRARIES})
+TARGET_LINK_LIBRARIES (OTBVisualization OTBGui OTBCommon OTBIO ${OTB_VISU_GUI_LIBRARIES})
 IF(OTB_LIBRARY_PROPERTIES)
   SET_TARGET_PROPERTIES(OTBVisualization PROPERTIES ${OTB_LIBRARY_PROPERTIES})
 ENDIF(OTB_LIBRARY_PROPERTIES)
diff --git a/Utilities/otbossimplugins/CMakeLists.txt b/Utilities/otbossimplugins/CMakeLists.txt
index 84bc230def37c7a7c325e85f364b7b10892aaf37..69c0f8851dce3a865ab804b804554bdfd7c157c2 100644
--- a/Utilities/otbossimplugins/CMakeLists.txt
+++ b/Utilities/otbossimplugins/CMakeLists.txt
@@ -23,7 +23,7 @@ SET(ossimplugins_SOURCES
 
 
 ADD_LIBRARY(otbossimplugins ${ossimplugins_SOURCES} )
-TARGET_LINK_LIBRARIES(otbossimplugins otbossim ${GDAL_LIBRARY})
+TARGET_LINK_LIBRARIES(otbossimplugins ${GDAL_LIBRARY} otbossim)
 IF(OTB_LIBRARY_PROPERTIES)
   SET_TARGET_PROPERTIES(otbossimplugins PROPERTIES ${OTB_LIBRARY_PROPERTIES})
 ENDIF(OTB_LIBRARY_PROPERTIES)