From 3ba66e742481ec91cd9afb4536f314bf3268fdaf Mon Sep 17 00:00:00 2001
From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org>
Date: Sat, 6 Dec 2008 18:01:34 +0800
Subject: [PATCH] STYLE: removing trailing spaces (Code)

---
 .../otbBSplineDecompositionImageFilter.h      |  10 +-
 .../otbBSplineDecompositionImageFilter.txx    |  44 +--
 .../otbBSplineInterpolateImageFunction.h      |  56 ++--
 .../otbBSplineInterpolateImageFunction.txx    |  92 +++---
 ...naryImageMinimalBoundingRegionCalculator.h |  10 +-
 ...ryImageMinimalBoundingRegionCalculator.txx |  10 +-
 Code/BasicFilters/otbChangeLabelImageFilter.h |  14 +-
 .../otbClosingOpeningMorphologicalFilter.h    |  18 +-
 .../otbClosingOpeningMorphologicalFilter.txx  |  10 +-
 ...bContinuousMinimumMaximumImageCalculator.h |  70 ++--
 ...ontinuousMinimumMaximumImageCalculator.txx |  92 +++---
 Code/BasicFilters/otbConvolutionImageFilter.h |  46 +--
 .../otbConvolutionImageFilter.txx             |  28 +-
 .../otbEuclideanDistanceWithMissingValue.h    |  18 +-
 .../otbEuclideanDistanceWithMissingValue.txx  |  18 +-
 Code/BasicFilters/otbFrostImageFilter.h       |  24 +-
 Code/BasicFilters/otbFrostImageFilter.txx     |  54 ++--
 Code/BasicFilters/otbFunctionToImageFilter.h  |  18 +-
 .../BasicFilters/otbFunctionToImageFilter.txx |  22 +-
 Code/BasicFilters/otbGaborFilterGenerator.h   |  34 +-
 Code/BasicFilters/otbGaborFilterGenerator.txx |   4 +-
 .../otbImageListToImageListApplyFilter.h      |  18 +-
 .../otbImageListToImageListApplyFilter.txx    |  10 +-
 .../otbImageListToVectorImageFilter.h         |  20 +-
 .../otbImageListToVectorImageFilter.txx       |  10 +-
 Code/BasicFilters/otbImageToPointSetFilter.h  |  16 +-
 .../BasicFilters/otbImageToPointSetFilter.txx |  18 +-
 .../otbImportGeoInformationImageFilter.h      |  20 +-
 .../otbImportGeoInformationImageFilter.txx    |   4 +-
 Code/BasicFilters/otbImportImageFilter.h      |  24 +-
 Code/BasicFilters/otbImportImageFilter.txx    |  32 +-
 .../BasicFilters/otbImportVectorImageFilter.h |  28 +-
 .../otbImportVectorImageFilter.txx            |  38 +--
 .../otbInverseLogPolarTransform.h             |   8 +-
 .../otbInverseLogPolarTransform.txx           |   8 +-
 ...tbLabelizeConfidenceConnectedImageFilter.h |  32 +-
 ...LabelizeConfidenceConnectedImageFilter.txx |   8 +-
 ...otbLabelizeConnectedThresholdImageFilter.h |  36 +--
 ...bLabelizeConnectedThresholdImageFilter.txx |  14 +-
 .../BasicFilters/otbLabelizeImageFilterBase.h |  56 ++--
 .../otbLabelizeImageFilterBase.txx            |  30 +-
 ...LabelizeNeighborhoodConnectedImageFilter.h |  50 +--
 ...belizeNeighborhoodConnectedImageFilter.txx |  14 +-
 Code/BasicFilters/otbLeeImageFilter.h         |  16 +-
 Code/BasicFilters/otbLeeImageFilter.txx       |  28 +-
 Code/BasicFilters/otbLogPolarTransform.h      |  16 +-
 Code/BasicFilters/otbLogPolarTransform.txx    |  10 +-
 Code/BasicFilters/otbMeanShiftImageFilter.h   |  42 +--
 Code/BasicFilters/otbMeanShiftImageFilter.txx |  70 ++--
 .../otbMeanShiftVectorImageFilter.h           |  10 +-
 .../otbOpeningClosingMorphologicalFilter.h    |  18 +-
 .../otbOpeningClosingMorphologicalFilter.txx  |  10 +-
 .../otbOverlapSaveConvolutionImageFilter.h    |  62 ++--
 .../otbOverlapSaveConvolutionImageFilter.txx  |  64 ++--
 .../BasicFilters/otbPathMeanDistanceFunctor.h |  24 +-
 .../otbPerBandVectorImageFilter.h             |  20 +-
 .../otbPerBandVectorImageFilter.txx           |   4 +-
 .../BasicFilters/otbPolygonCompacityFunctor.h |  24 +-
 Code/BasicFilters/otbPrintableImageFilter.h   |  20 +-
 Code/BasicFilters/otbPrintableImageFilter.txx |  32 +-
 .../otbProlateInterpolateImageFunction.h      |  56 ++--
 .../otbProlateInterpolateImageFunction.txx    |  24 +-
 .../otbQuaternaryFunctorImageFilter.h         |  28 +-
 .../otbQuaternaryFunctorImageFilter.txx       |  34 +-
 .../otbRationalQuotientResampleImageFilter.h  |  42 +--
 ...otbRationalQuotientResampleImageFilter.txx |  30 +-
 .../otbScalarImageTextureFunctor.h            |  38 +--
 .../otbScalarToRainbowRGBPixelFunctor.h       |  24 +-
 .../otbScalarToRainbowRGBPixelFunctor.txx     |  30 +-
 .../otbScalarVectorImageTextureFunctor.h      |  40 +--
 Code/BasicFilters/otbSimplifyPathFunctor.h    |  50 +--
 .../otbSpatialObjectToImageDrawingFilter.h    |  32 +-
 .../otbSpatialObjectToImageDrawingFilter.txx  |   4 +-
 .../otbSpectralAngleDistanceImageFilter.h     |  18 +-
 .../otbSpectralAngleDistanceImageFilter.txx   |  12 +-
 ...treamingMatrixTransposeMatrixImageFilter.h |  68 ++--
 ...eamingMatrixTransposeMatrixImageFilter.txx |  58 ++--
 .../otbStreamingResampleImageFilter.h         |  30 +-
 .../otbStreamingResampleImageFilter.txx       |  84 ++---
 .../otbStreamingShrinkImageFilter.h           |  30 +-
 .../otbStreamingShrinkImageFilter.txx         |  18 +-
 .../otbStreamingStatisticsImageFilter.h       |  56 ++--
 .../otbStreamingStatisticsImageFilter.txx     |  20 +-
 .../otbStreamingStatisticsVectorImageFilter.h |  62 ++--
 ...tbStreamingStatisticsVectorImageFilter.txx |  84 ++---
 .../otbUnaryFunctorObjectListBooleanFilter.h  |  14 +-
 ...otbUnaryFunctorObjectListBooleanFilter.txx |  12 +-
 .../otbUnaryFunctorObjectListFilter.h         |  16 +-
 .../otbUnaryFunctorObjectListFilter.txx       |  12 +-
 ...tbUnaryImageFunctorWithVectorImageFilter.h |  18 +-
 ...UnaryImageFunctorWithVectorImageFilter.txx |  32 +-
 Code/BasicFilters/otbVarianceImageFilter.h    |  14 +-
 Code/BasicFilters/otbVarianceImageFilter.txx  |  30 +-
 .../otbVectorImageTo3DScalarImageFilter.h     |  20 +-
 .../otbVectorImageTo3DScalarImageFilter.txx   |  22 +-
 .../otbVectorImageToAmplitudeImageFilter.h    |  12 +-
 .../otbVectorImageToImageListFilter.h         |  18 +-
 .../otbVectorImageToImageListFilter.txx       |  12 +-
 .../otbVectorImageToIntensityImageFilter.h    |  18 +-
 .../otbVectorImageToIntensityImageFilter.txx  |  14 +-
 .../otbVectorRescaleIntensityImageFilter.h    |  60 ++--
 .../otbVectorRescaleIntensityImageFilter.txx  |  30 +-
 ...owedSincInterpolateImageBlackmanFunction.h |  52 +--
 ...ndowedSincInterpolateImageCosineFunction.h |  50 +--
 ...WindowedSincInterpolateImageFunctionBase.h |  60 ++--
 ...ndowedSincInterpolateImageFunctionBase.txx |   8 +-
 ...owedSincInterpolateImageGaussianFunction.h |  50 +--
 ...dowedSincInterpolateImageHammingFunction.h |  46 +--
 ...dowedSincInterpolateImageLanczosFunction.h |  52 +--
 ...indowedSincInterpolateImageWelchFunction.h |  52 +--
 ...ctorNeighborhoodJoinHistogramImageFilter.h |  28 +-
 ...orNeighborhoodJoinHistogramImageFilter.txx |  58 ++--
 Code/ChangeDetection/otbCBAMIChangeDetector.h |  98 +++---
 .../otbCommandProgressUpdate.h                |   6 +-
 .../otbCommandProgressUpdate.txx              |   8 +-
 .../otbCorrelationChangeDetector.h            |  50 +--
 .../otbJoinHistogramMIImageFilter.h           |  60 ++--
 .../otbKullbackLeiblerDistanceImageFilter.h   |  50 +--
 .../otbKullbackLeiblerDistanceImageFilter.txx |  80 ++---
 .../otbKullbackLeiblerProfileImageFilter.h    |  56 ++--
 .../otbKullbackLeiblerProfileImageFilter.txx  | 144 ++++-----
 ...backLeiblerSupervizedDistanceImageFilter.h |  62 ++--
 ...ckLeiblerSupervizedDistanceImageFilter.txx |  38 +--
 Code/ChangeDetection/otbLHMIChangeDetector.h  |  62 ++--
 .../otbMeanDifferenceImageFilter.h            |  48 +--
 .../ChangeDetection/otbMeanRatioImageFilter.h |  46 +--
 Code/Common/otbArcSpatialObject.h             |  54 ++--
 Code/Common/otbArcSpatialObject.txx           |  34 +-
 .../otbBinaryFunctorNeighborhoodImageFilter.h |  26 +-
 ...tbBinaryFunctorNeighborhoodImageFilter.txx |  42 +--
 ...naryFunctorNeighborhoodVectorImageFilter.h |  34 +-
 ...ryFunctorNeighborhoodVectorImageFilter.txx |  38 +--
 Code/Common/otbCommandLineArgumentParser.cxx  |  54 ++--
 Code/Common/otbCommandLineArgumentParser.h    |  72 ++---
 Code/Common/otbConcatenateVectorImageFilter.h |  10 +-
 .../otbConcatenateVectorImageFilter.txx       |  14 +-
 Code/Common/otbDataNode.h                     |  34 +-
 Code/Common/otbDataNode.txx                   |  62 ++--
 Code/Common/otbDifferenceImageFilter.h        |  34 +-
 Code/Common/otbDifferenceImageFilter.txx      |  52 +--
 Code/Common/otbDrawLineSpatialObjectFilter.h  |  32 +-
 .../Common/otbDrawLineSpatialObjectFilter.txx |  80 ++---
 .../otbDrawLineSpatialObjectListFilter.h      |  36 +--
 .../otbDrawLineSpatialObjectListFilter.txx    |  28 +-
 Code/Common/otbDrawPathFilter.h               |  32 +-
 Code/Common/otbDrawPathFilter.txx             |  10 +-
 Code/Common/otbDrawPathListFilter.h           |  46 +--
 Code/Common/otbDrawPathListFilter.txx         |  10 +-
 Code/Common/otbExtractROI.h                   |  16 +-
 Code/Common/otbExtractROI.txx                 |  22 +-
 Code/Common/otbExtractROIBase.h               |  36 +--
 Code/Common/otbExtractROIBase.txx             |  44 +--
 Code/Common/otbFilterWatcherBase.cxx          |  30 +-
 Code/Common/otbFilterWatcherBase.h            |  50 +--
 .../otbGenericInterpolateImageFunction.h      |  44 +--
 .../otbGenericInterpolateImageFunction.txx    |  64 ++--
 Code/Common/otbHistogramStatisticsFunction.h  |  30 +-
 .../Common/otbHistogramStatisticsFunction.txx |  28 +-
 Code/Common/otbImageList.h                    |  12 +-
 Code/Common/otbImageList.txx                  |  10 +-
 Code/Common/otbImageListSource.h              |   8 +-
 Code/Common/otbImageListSource.txx            |   4 +-
 Code/Common/otbImageListToImageFilter.h       |   6 +-
 Code/Common/otbImageListToImageFilter.txx     |  10 +-
 Code/Common/otbImageListToImageListFilter.h   |   8 +-
 Code/Common/otbImageListToImageListFilter.txx |  10 +-
 ...otbImageOfVectorsToMonoChannelExtractROI.h |  16 +-
 ...bImageOfVectorsToMonoChannelExtractROI.txx |  22 +-
 ...RegionNonUniformMultidimensionalSplitter.h |  18 +-
 ...gionNonUniformMultidimensionalSplitter.txx |  28 +-
 Code/Common/otbImageRegionTileMapSplitter.h   |  26 +-
 Code/Common/otbImageRegionTileMapSplitter.txx |  26 +-
 Code/Common/otbImageToImageListFilter.h       |   6 +-
 Code/Common/otbImageToImageListFilter.txx     |  10 +-
 .../otbImageToLineSpatialObjectListFilter.h   |  34 +-
 .../otbImageToLineSpatialObjectListFilter.txx |  38 +--
 Code/Common/otbImageToPathFilter.h            |   6 +-
 Code/Common/otbImageToPathFilter.txx          |   4 +-
 Code/Common/otbImageToPathListFilter.h        |  26 +-
 Code/Common/otbImageToPathListFilter.txx      |  10 +-
 Code/Common/otbImageToVectorImageCastFilter.h |  14 +-
 Code/Common/otbLineSpatialObject.h            |  24 +-
 Code/Common/otbLineSpatialObject.txx          |   4 +-
 Code/Common/otbLineSpatialObjectList.h        |  16 +-
 Code/Common/otbList.h                         |  18 +-
 Code/Common/otbList.txx                       |  40 +--
 Code/Common/otbMacro.h                        |  24 +-
 Code/Common/otbMath.h                         |  10 +-
 Code/Common/otbMirrorBoundaryCondition.h      |  18 +-
 Code/Common/otbMirrorBoundaryCondition.txx    |  26 +-
 Code/Common/otbMultiChannelExtractROI.h       | Bin 5715 -> 5694 bytes
 Code/Common/otbMultiChannelExtractROI.txx     |  52 +--
 Code/Common/otbMultiToMonoChannelExtractROI.h |  14 +-
 .../otbMultiToMonoChannelExtractROI.txx       |  22 +-
 Code/Common/otbObjectList.h                   |  16 +-
 Code/Common/otbObjectList.txx                 |  44 +--
 Code/Common/otbObjectListSource.h             |  36 +--
 Code/Common/otbObjectListSource.txx           |  34 +-
 Code/Common/otbObjectListToObjectListFilter.h |  24 +-
 .../otbObjectListToObjectListFilter.txx       |  10 +-
 Code/Common/otbPathFunction.h                 |  16 +-
 Code/Common/otbPathFunction.txx               |   4 +-
 Code/Common/otbPathListSource.h               |  22 +-
 Code/Common/otbPathListToHistogramGenerator.h |  24 +-
 .../otbPathListToHistogramGenerator.txx       |  28 +-
 Code/Common/otbPathListToPathListFilter.h     |  12 +-
 .../otbPersistentFilterStreamingDecorator.h   |  12 +-
 .../otbPersistentFilterStreamingDecorator.txx |   6 +-
 Code/Common/otbPersistentImageFilter.h        |  18 +-
 Code/Common/otbPointSetAndValuesFunction.h    |  22 +-
 Code/Common/otbPointSetSource.h               |  22 +-
 Code/Common/otbPointSetSource.txx             |  24 +-
 Code/Common/otbPolyLineImageConstIterator.h   |  18 +-
 Code/Common/otbPolyLineImageConstIterator.txx |  18 +-
 Code/Common/otbPolyLineImageIterator.h        |  18 +-
 .../otbPolyLineParametricPathWithValue.h      |  20 +-
 .../otbPolyLineParametricPathWithValue.txx    |  20 +-
 Code/Common/otbPolygon.h                      |  38 +--
 Code/Common/otbPolygon.txx                    |  94 +++---
 Code/Common/otbShiftScaleImageAdaptor.h       |  72 ++---
 Code/Common/otbSpatialObjectSource.h          |  10 +-
 Code/Common/otbSpatialObjectSource.txx        |   6 +-
 Code/Common/otbStandardFilterWatcher.cxx      |   2 +-
 Code/Common/otbStandardFilterWatcher.h        |  24 +-
 Code/Common/otbStandardWriterWatcher.cxx      |   2 +-
 Code/Common/otbStandardWriterWatcher.h        |  28 +-
 Code/Common/otbStreamingTraits.h              |  34 +-
 Code/Common/otbStreamingTraits.txx            |  46 +--
 Code/Common/otbSystem.cxx                     |  12 +-
 Code/Common/otbSystem.h                       |  10 +-
 Code/Common/otbTestMain.h                     | 152 ++++-----
 .../otbUnaryFunctorNeighborhoodImageFilter.h  |  18 +-
 ...otbUnaryFunctorNeighborhoodImageFilter.txx |  22 +-
 Code/Common/otbVectorData.h                   |  22 +-
 Code/Common/otbVectorData.txx                 |   6 +-
 Code/Common/otbVectorImageToASImageAdaptor.h  |  14 +-
 Code/Common/otbVectorImageToASPixelAccessor.h |  10 +-
 Code/Common/otbWriterWatcherBase.cxx          |  60 ++--
 Code/Common/otbWriterWatcherBase.h            |  58 ++--
 ...inesInterpolateDeformationFieldGenerator.h |  12 +-
 ...esInterpolateDeformationFieldGenerator.txx |  18 +-
 ...polateTransformDeformationFieldGenerator.h |  24 +-
 ...lateTransformDeformationFieldGenerator.txx |  22 +-
 .../otbDisparityMapEstimationMethod.h         |  22 +-
 .../otbDisparityMapEstimationMethod.txx       |  32 +-
 Code/DisparityMap/otbMIRegistrationFilter.h   |  26 +-
 Code/DisparityMap/otbMIRegistrationFilter.txx |  88 ++---
 Code/DisparityMap/otbNCCRegistrationFilter.h  |  38 +--
 .../DisparityMap/otbNCCRegistrationFilter.txx |  88 ++---
 ...nearInterpolateDeformationFieldGenerator.h |  10 +-
 ...arInterpolateDeformationFieldGenerator.txx |  10 +-
 ...nearInterpolateDeformationFieldGenerator.h |  12 +-
 ...arInterpolateDeformationFieldGenerator.txx |  14 +-
 ...otbNearestPointDeformationFieldGenerator.h |  12 +-
 ...bNearestPointDeformationFieldGenerator.txx |   6 +-
 ...earestTransformDeformationFieldGenerator.h |  12 +-
 ...restTransformDeformationFieldGenerator.txx |   8 +-
 .../otbPointSetBasedResamplingFilter.h        |  24 +-
 .../otbPointSetBasedResamplingFilter.txx      |  14 +-
 .../otbPointSetToDeformationFieldGenerator.h  |  20 +-
 ...otbPointSetToDeformationFieldGenerator.txx |  16 +-
 ...WithTransformToDeformationFieldGenerator.h |  16 +-
 ...thTransformToDeformationFieldGenerator.txx |   4 +-
 .../otbStreamingWarpImageFilter.h             |  24 +-
 .../otbStreamingWarpImageFilter.txx           |  14 +-
 .../otbAddCarvingPathFilter.h                 |  60 ++--
 .../otbAddCarvingPathFilter.txx               |  70 ++--
 .../otbAssociativeSymmetricalSumImageFilter.h |  40 +--
 ...symmetricFusionOfLineDetectorImageFilter.h |  28 +-
 ...mmetricFusionOfLineDetectorImageFilter.txx |  14 +-
 .../otbBreakAngularPathListFilter.h           |  18 +-
 .../otbBreakAngularPathListFilter.txx         |  26 +-
 .../otbCompacityPathFunction.h                |  14 +-
 .../otbCompacityPathFunction.txx              |  28 +-
 .../otbComplexMomentImageFunction.h           |  34 +-
 .../otbComplexMomentImageFunction.txx         |  22 +-
 .../otbComplexMomentPathFunction.h            |  28 +-
 .../otbComplexMomentPathFunction.txx          |  24 +-
 .../otbExtractSegmentsImageFilter.h           |  56 ++--
 .../otbExtractSegmentsImageFilter.txx         | 120 +++----
 Code/FeatureExtraction/otbFillGapsFilter.cxx  | 100 +++---
 Code/FeatureExtraction/otbFillGapsFilter.h    |  22 +-
 .../otbFlusserImageFunction.h                 |  32 +-
 .../otbFlusserImageFunction.txx               |  28 +-
 .../otbFlusserPathFunction.h                  |  20 +-
 .../otbFlusserPathFunction.txx                |  28 +-
 ...ForwardFourierMellinTransformImageFilter.h |  44 +--
 ...rwardFourierMellinTransformImageFilter.txx |  26 +-
 .../otbGenericRoadExtractionFilter.h          |  46 +--
 .../otbGenericRoadExtractionFilter.txx        |  32 +-
 .../otbGeometricMomentImageFunction.h         |  20 +-
 .../otbGeometricMomentPathFunction.h          |  14 +-
 Code/FeatureExtraction/otbHarrisImageFilter.h |  24 +-
 .../otbHarrisImageFilter.txx                  |  16 +-
 .../otbHarrisImageToPointSetFilter.h          |  20 +-
 .../otbHarrisImageToPointSetFilter.txx        |  24 +-
 .../otbHessianToScalarImageFilter.h           |  42 +--
 Code/FeatureExtraction/otbHuImageFunction.h   |  32 +-
 Code/FeatureExtraction/otbHuImageFunction.txx |  28 +-
 Code/FeatureExtraction/otbHuPathFunction.h    |  22 +-
 Code/FeatureExtraction/otbHuPathFunction.txx  |  32 +-
 .../otbImageFittingPolygonListFilter.h        |  30 +-
 .../otbImageFittingPolygonListFilter.txx      |  26 +-
 .../otbImageToCarvingPathFilter.h             |  40 +--
 .../otbImageToCarvingPathFilter.txx           |  96 +++---
 .../otbImageToEdgePathFilter.h                |  22 +-
 .../otbImageToEdgePathFilter.txx              |  20 +-
 .../otbImageToHessianDeterminantImageFilter.h |  54 ++--
 ...tbImageToHessianDeterminantImageFilter.txx |  10 +-
 ...otbImageToModulusAndDirectionImageFilter.h |  30 +-
 ...bImageToModulusAndDirectionImageFilter.txx |  26 +-
 .../otbImageToPathListAlignFilter.h           |  48 +--
 .../otbImageToPathListAlignFilter.txx         | 182 +++++------
 .../otbImageToSIFTKeyPointSetFilter.h         | 130 ++++----
 .../otbImageToSIFTKeyPointSetFilter.txx       | 270 ++++++++--------
 .../otbImageToSURFKeyPointSetFilter.h         | 108 +++----
 .../otbImageToSURFKeyPointSetFilter.txx       | 248 +++++++-------
 Code/FeatureExtraction/otbImageToTreeFilter.h |  28 +-
 .../otbImageToTreeFilter.txx                  |  26 +-
 .../otbLikelihoodPathListFilter.h             |  18 +-
 .../otbLikelihoodPathListFilter.txx           |   4 +-
 .../otbLineCorrelationDetectorImageFilter.h   |  20 +-
 .../otbLineCorrelationDetectorImageFilter.txx |  28 +-
 .../otbLineDetectorImageFilterBase.h          |  56 ++--
 .../otbLineDetectorImageFilterBase.txx        | 134 ++++----
 .../otbLineRatioDetectorImageFilter.h         |  40 +--
 .../otbLineRatioDetectorImageFilter.txx       |  26 +-
 .../FeatureExtraction/otbLinkPathListFilter.h |  24 +-
 .../otbLinkPathListFilter.txx                 |  42 +--
 Code/FeatureExtraction/otbLocalHoughFilter.h  |  58 ++--
 .../FeatureExtraction/otbLocalHoughFilter.txx | 180 +++++------
 ...otbModulusAndDirectionImageToImageFilter.h |  18 +-
 ...bModulusAndDirectionImageToImageFilter.txx |  20 +-
 .../otbMultiplyByScalarImageFilter.h          |  38 +--
 .../otbNeighborhoodScalarProductFilter.h      |  22 +-
 .../otbNeighborhoodScalarProductFilter.txx    |  44 +--
 .../otbNonMaxRemovalByDirectionFilter.h       |  36 +--
 .../otbOrientationPathFunction.h              |  14 +-
 .../otbOrientationPathFunction.txx            |  16 +-
 .../otbParallelLinePathListFilter.h           |  60 ++--
 .../otbParallelLinePathListFilter.txx         | 202 ++++++------
 ...tbPixelSuppressionByDirectionImageFilter.h |  26 +-
 ...PixelSuppressionByDirectionImageFilter.txx | 106 +++---
 .../otbRealMomentImageFunction.h              |  16 +-
 .../otbRealMomentPathFunction.h               |  18 +-
 .../otbRemoveCarvingPathFilter.h              |  64 ++--
 .../otbRemoveCarvingPathFilter.txx            |  52 +--
 .../otbRemoveIsolatedByDirectionFilter.h      |  16 +-
 .../otbRemoveTortuousPathListFilter.h         |  14 +-
 .../otbRemoveWrongDirectionFilter.h           |  18 +-
 .../otbRoadExtractionFilter.h                 |  46 +--
 .../otbRoadExtractionFilter.txx               |  12 +-
 Code/FeatureExtraction/otbShape.h             |  38 +--
 Code/FeatureExtraction/otbShape.txx           | 104 +++---
 .../otbSimplifyPathListFilter.h               |  26 +-
 .../otbThresholdImageToPointSetFilter.h       |  14 +-
 .../otbThresholdImageToPointSetFilter.txx     |  16 +-
 .../otbTouziEdgeDetectorImageFilter.h         |  34 +-
 .../otbTouziEdgeDetectorImageFilter.txx       | 122 +++----
 Code/FeatureExtraction/otbTreeNeighborhood.h  |  12 +-
 .../FeatureExtraction/otbTreeNeighborhood.txx |  22 +-
 Code/FeatureExtraction/otbTreeSource.h        |  16 +-
 Code/FeatureExtraction/otbTreeSource.txx      |  24 +-
 .../otbVectorizationPathListFilter.h          |  18 +-
 .../otbVectorizationPathListFilter.txx        | 146 ++++-----
 Code/Fusion/otbBayesianFusionFilter.h         |  74 ++---
 Code/Fusion/otbBayesianFusionFilter.txx       | 166 +++++-----
 Code/Fusion/otbFusionImageBase.h              |  32 +-
 ...bSimpleRcsPanSharpeningFusionImageFilter.h |  34 +-
 ...impleRcsPanSharpeningFusionImageFilter.txx |  38 +--
 Code/Gui/otbFltkFilterWatcher.cxx             |   2 +-
 Code/Gui/otbFltkFilterWatcher.h               |   6 +-
 Code/Gui/otbFltkWriterWatcher.h               |   6 +-
 Code/IO/otbBSQImageIO.cxx                     |  52 +--
 Code/IO/otbBSQImageIO.h                       |  20 +-
 Code/IO/otbBSQImageIOFactory.cxx              |  12 +-
 Code/IO/otbBSQImageIOFactory.h                |  14 +-
 Code/IO/otbDEMHandler.cxx                     |   8 +-
 Code/IO/otbDEMHandler.h                       |  32 +-
 Code/IO/otbDEMToImageGenerator.h              |  38 +--
 Code/IO/otbDEMToImageGenerator.txx            |  56 ++--
 Code/IO/otbDEMToOrthoImageGenerator.h         |  36 +--
 Code/IO/otbDEMToOrthoImageGenerator.txx       |  66 ++--
 Code/IO/otbDXFToSpatialObjectGroupFilter.h    |  28 +-
 Code/IO/otbDXFToSpatialObjectGroupFilter.txx  |  66 ++--
 Code/IO/otbFileName.h                         |   6 +-
 Code/IO/otbGDALImageIO.cxx                    | 304 +++++++++---------
 Code/IO/otbGDALImageIO.h                      |  26 +-
 Code/IO/otbGDALImageIOFactory.cxx             |  12 +-
 Code/IO/otbGDALImageIOFactory.h               |  14 +-
 Code/IO/otbImage.h                            |  60 ++--
 Code/IO/otbImage.txx                          | 118 +++----
 Code/IO/otbImageBase.cxx                      | 134 ++++----
 Code/IO/otbImageBase.h                        |  74 ++---
 Code/IO/otbImageFileReader.h                  |  22 +-
 Code/IO/otbImageFileReader.txx                |  84 ++---
 Code/IO/otbImageFileWriter.h                  |  22 +-
 Code/IO/otbImageFileWriter.txx                |  26 +-
 Code/IO/otbImageGeometryHandler.cxx           |  22 +-
 Code/IO/otbImageGeometryHandler.h             |  26 +-
 Code/IO/otbImageIOFactory.cxx                 |  12 +-
 Code/IO/otbImageIOFactory.h                   |  18 +-
 Code/IO/otbImageKeywordlist.cxx               |  18 +-
 Code/IO/otbImageKeywordlist.h                 |  20 +-
 Code/IO/otbJPEG2000ImageIO.cxx                | 128 ++++----
 Code/IO/otbJPEG2000ImageIO.h                  |  14 +-
 Code/IO/otbJPEG2000ImageIOFactory.cxx         |  12 +-
 Code/IO/otbJPEG2000ImageIOFactory.h           |  14 +-
 Code/IO/otbKMLVectorDataIO.h                  |  32 +-
 Code/IO/otbKMLVectorDataIO.txx                | 184 +++++------
 Code/IO/otbKMLVectorDataIOFactory.h           |  14 +-
 Code/IO/otbKMLVectorDataIOFactory.txx         |   8 +-
 Code/IO/otbLUMImageIO.cxx                     |  58 ++--
 Code/IO/otbLUMImageIO.h                       |  18 +-
 Code/IO/otbLUMImageIOFactory.cxx              |  12 +-
 Code/IO/otbLUMImageIOFactory.h                |  14 +-
 Code/IO/otbMSTARImageIO.cxx                   |  94 +++---
 Code/IO/otbMSTARImageIO.h                     |  16 +-
 Code/IO/otbMSTARImageIOFactory.cxx            |  12 +-
 Code/IO/otbMSTARImageIOFactory.h              |  14 +-
 Code/IO/otbMWImageIO.cxx                      |  62 ++--
 Code/IO/otbMWImageIO.h                        |  20 +-
 Code/IO/otbMWImageIOFactory.cxx               |  12 +-
 Code/IO/otbMWImageIOFactory.h                 |  14 +-
 Code/IO/otbMetaDataKey.cxx                    |  38 +--
 Code/IO/otbMetaDataKey.h                      |  92 +++---
 Code/IO/otbONERAImageIO.cxx                   |  82 ++---
 Code/IO/otbONERAImageIO.h                     |  24 +-
 Code/IO/otbONERAImageIOFactory.cxx            |  12 +-
 Code/IO/otbONERAImageIOFactory.h              |  14 +-
 Code/IO/otbPointSetFileReader.h               |  38 +--
 Code/IO/otbPointSetFileReader.txx             |  56 ++--
 Code/IO/otbPrepareSRTMDirectory.h             |  10 +-
 Code/IO/otbPrepareSRTMDirectory.txx           |  30 +-
 Code/IO/otbRADImageIO.cxx                     | 112 +++----
 Code/IO/otbRADImageIO.h                       |  22 +-
 Code/IO/otbRADImageIOFactory.cxx              |  12 +-
 Code/IO/otbRADImageIOFactory.h                |  14 +-
 Code/IO/otbSHPVectorDataIO.h                  |  18 +-
 Code/IO/otbSHPVectorDataIO.txx                |  84 ++---
 Code/IO/otbSHPVectorDataIOFactory.h           |  14 +-
 Code/IO/otbSHPVectorDataIOFactory.txx         |   8 +-
 Code/IO/otbSpatialObjectDXFReader.h           |  30 +-
 Code/IO/otbSpatialObjectDXFReader.txx         |   6 +-
 Code/IO/otbStreamingImageFileWriter.h         |  60 ++--
 Code/IO/otbStreamingImageFileWriter.txx       |  90 +++---
 Code/IO/otbStreamingImageVirtualWriter.h      |  44 +--
 Code/IO/otbStreamingImageVirtualWriter.txx    |  38 +--
 Code/IO/otbTileMapImageIO.cxx                 | 144 ++++-----
 Code/IO/otbTileMapImageIO.h                   |  58 ++--
 Code/IO/otbTileMapImageIOFactory.cxx          |  12 +-
 Code/IO/otbTileMapImageIOFactory.h            |  14 +-
 Code/IO/otbVectorDataBase.cxx                 |   6 +-
 Code/IO/otbVectorDataBase.h                   |  12 +-
 Code/IO/otbVectorDataFileReader.h             |  32 +-
 Code/IO/otbVectorDataFileReader.txx           |  26 +-
 Code/IO/otbVectorDataFileWriter.h             |  28 +-
 Code/IO/otbVectorDataFileWriter.txx           |  32 +-
 Code/IO/otbVectorDataIOBase.h                 |   8 +-
 Code/IO/otbVectorDataIOBase.txx               |   6 +-
 Code/IO/otbVectorDataIOFactory.h              |  20 +-
 Code/IO/otbVectorDataIOFactory.txx            |   4 +-
 Code/IO/otbVectorDataSource.h                 |  14 +-
 Code/IO/otbVectorDataSource.txx               |   4 +-
 Code/IO/otbVectorImage.h                      |  58 ++--
 Code/IO/otbVectorImage.txx                    | 118 +++----
 Code/Learning/otbChangeProfileKernelFunctor.h |  10 +-
 .../otbChangeProfileKernelFunctor.txx         |  12 +-
 .../otbCzihoSOMLearningBehaviorFunctor.h      |  24 +-
 .../otbCzihoSOMNeighborhoodBehaviorFunctor.h  |  12 +-
 Code/Learning/otbGaussianModelComponent.h     |  30 +-
 Code/Learning/otbGaussianModelComponent.txx   |  30 +-
 .../otbKMeansImageClassificationFilter.h      |  12 +-
 .../otbKMeansImageClassificationFilter.txx    |  10 +-
 .../Learning/otbMixturePolyRBFKernelFunctor.h |  12 +-
 .../otbMixturePolyRBFKernelFunctor.txx        |  16 +-
 Code/Learning/otbModelComponentBase.h         |  56 ++--
 Code/Learning/otbModelComponentBase.txx       |  18 +-
 .../Learning/otbNonGaussianRBFKernelFunctor.h |  14 +-
 .../otbNonGaussianRBFKernelFunctor.txx        |  16 +-
 Code/Learning/otbPeriodicSOM.h                |  32 +-
 Code/Learning/otbPeriodicSOM.txx              |  10 +-
 Code/Learning/otbROIdataConversion.h          |  20 +-
 Code/Learning/otbROIdataConversion.txx        |  14 +-
 Code/Learning/otbSEMClassifier.h              |  72 ++---
 Code/Learning/otbSEMClassifier.txx            | 144 ++++-----
 Code/Learning/otbSOM.h                        |  36 +--
 Code/Learning/otbSOM.txx                      |  50 +--
 Code/Learning/otbSOMActivationBuilder.h       |  14 +-
 Code/Learning/otbSOMActivationBuilder.txx     |  18 +-
 Code/Learning/otbSOMClassifier.h              |  22 +-
 Code/Learning/otbSOMClassifier.txx            |  24 +-
 .../otbSOMImageClassificationFilter.h         |  12 +-
 .../otbSOMImageClassificationFilter.txx       |  14 +-
 Code/Learning/otbSOMLearningBehaviorFunctor.h |  14 +-
 Code/Learning/otbSOMMap.h                     |  30 +-
 Code/Learning/otbSOMMap.txx                   |  18 +-
 Code/Learning/otbSVMClassifier.h              |  28 +-
 Code/Learning/otbSVMClassifier.txx            |  34 +-
 .../otbSVMImageClassificationFilter.h         |  12 +-
 .../otbSVMImageClassificationFilter.txx       |  16 +-
 Code/Learning/otbSVMImageModelEstimator.h     |  26 +-
 Code/Learning/otbSVMImageModelEstimator.txx   |  22 +-
 Code/Learning/otbSVMKernels.h                 | 268 +++++++--------
 Code/Learning/otbSVMModel.h                   |  56 ++--
 Code/Learning/otbSVMModel.txx                 |  54 ++--
 Code/Learning/otbSVMModelEstimator.h          |  42 +--
 Code/Learning/otbSVMModelEstimator.txx        |  36 +--
 Code/Learning/otbSVMPointSetModelEstimator.h  |  26 +-
 .../Learning/otbSVMPointSetModelEstimator.txx |  30 +-
 .../Learning/otbSVMSampleListModelEstimator.h |  24 +-
 .../otbSVMSampleListModelEstimator.txx        |  32 +-
 Code/Learning/otbSpectralAngleKernelFunctor.h |   8 +-
 .../otbSpectralAngleKernelFunctor.txx         |  14 +-
 Code/Markov/otbMRFEnergy.h                    |  76 ++---
 Code/Markov/otbMRFEnergyEdgeFidelity.h        |  26 +-
 Code/Markov/otbMRFEnergyGaussian.h            |  28 +-
 Code/Markov/otbMRFEnergyPotts.h               |  26 +-
 Code/Markov/otbMRFOptimizer.h                 |  28 +-
 Code/Markov/otbMRFOptimizerICM.h              |  34 +-
 Code/Markov/otbMRFOptimizerMetropolis.h       |  34 +-
 Code/Markov/otbMRFSampler.h                   |  52 +--
 Code/Markov/otbMRFSamplerMAP.h                |  56 ++--
 Code/Markov/otbMRFSamplerRandom.h             |  46 +--
 Code/Markov/otbMarkovRandomFieldFilter.h      | 250 +++++++-------
 Code/Markov/otbMarkovRandomFieldFilter.txx    | 186 +++++------
 .../otbConvexOrConcaveClassificationFilter.h  |  36 +--
 ...odesicMorphologyDecompositionImageFilter.h |  40 +--
 ...esicMorphologyDecompositionImageFilter.txx |   8 +-
 ...phologyIterativeDecompositionImageFilter.h |  30 +-
 ...ologyIterativeDecompositionImageFilter.txx |  26 +-
 .../otbGeodesicMorphologyLevelingFilter.h     |  14 +-
 Code/MultiScale/otbImageToProfileFilter.h     |  18 +-
 Code/MultiScale/otbImageToProfileFilter.txx   |  26 +-
 .../otbMorphologicalClosingProfileFilter.h    |  14 +-
 .../otbMorphologicalOpeningProfileFilter.h    |  16 +-
 .../otbMorphologicalPyramidAnalysisFilter.h   |  18 +-
 .../otbMorphologicalPyramidAnalysisFilter.txx |  26 +-
 .../otbMorphologicalPyramidMRToMSConverter.h  |  22 +-
 ...otbMorphologicalPyramidMRToMSConverter.txx |  22 +-
 .../otbMorphologicalPyramidResampler.h        |  16 +-
 .../otbMorphologicalPyramidResampler.txx      |  14 +-
 ...tbMorphologicalPyramidSegmentationFilter.h |  38 +--
 ...MorphologicalPyramidSegmentationFilter.txx |  24 +-
 .../otbMorphologicalPyramidSegmenter.h        |  18 +-
 .../otbMorphologicalPyramidSegmenter.txx      |  36 +--
 .../otbMorphologicalPyramidSynthesisFilter.h  |  28 +-
 ...otbMorphologicalPyramidSynthesisFilter.txx |  38 +--
 ...ScaleConvexOrConcaveClassificationFilter.h |  34 +-
 ...ivativeToMultiScaleCharacteristicsFilter.h |  20 +-
 ...ativeToMultiScaleCharacteristicsFilter.txx |  24 +-
 .../otbProfileToProfileDerivativeFilter.h     |  16 +-
 .../otbProfileToProfileDerivativeFilter.txx   |   6 +-
 Code/Projections/otbCompositeTransform.h      |  74 ++---
 Code/Projections/otbCompositeTransform.txx    | 152 ++++-----
 Code/Projections/otbEckert4MapProjection.h    |  28 +-
 Code/Projections/otbEckert4MapProjection.txx  |  34 +-
 Code/Projections/otbForwardSensorModel.h      |  58 ++--
 Code/Projections/otbForwardSensorModel.txx    |  52 +--
 Code/Projections/otbInverseSensorModel.h      |  52 +--
 Code/Projections/otbInverseSensorModel.txx    |  48 +--
 .../Projections/otbLambert2EtenduProjection.h |  22 +-
 .../otbLambert2EtenduProjection.txx           |  28 +-
 Code/Projections/otbLambert93Projection.h     |  22 +-
 Code/Projections/otbLambert93Projection.txx   |  28 +-
 .../otbLambertConformalConicMapProjection.h   |  24 +-
 .../otbLambertConformalConicMapProjection.txx |  50 +--
 Code/Projections/otbMapProjection.h           |  48 +--
 Code/Projections/otbMapProjection.txx         | 180 +++++------
 Code/Projections/otbMapProjections.h          |  22 +-
 Code/Projections/otbMapToMapProjection.h      |  62 ++--
 Code/Projections/otbMapToMapProjection.txx    | 162 +++++-----
 Code/Projections/otbMollweidMapProjection.h   |  30 +-
 Code/Projections/otbMollweidMapProjection.txx |  36 +--
 .../Projections/otbOrthoRectificationFilter.h | 102 +++---
 .../otbOrthoRectificationFilter.txx           |  96 +++---
 Code/Projections/otbPlaceNameToLonLat.h       |   4 +-
 Code/Projections/otbPlaceNameToLonLat.txx     |  26 +-
 Code/Projections/otbPrepareSRTMDirectory.h    |  10 +-
 Code/Projections/otbPrepareSRTMDirectory.txx  |  30 +-
 Code/Projections/otbSVY21MapProjection.h      |  22 +-
 Code/Projections/otbSVY21MapProjection.txx    |  26 +-
 Code/Projections/otbSensorModelBase.h         |  92 +++---
 Code/Projections/otbSensorModelBase.txx       |  40 +--
 Code/Projections/otbSinusoidalMapProjection.h |  28 +-
 .../otbSinusoidalMapProjection.txx            |  56 ++--
 Code/Projections/otbTileMapTransform.h        |  44 +--
 Code/Projections/otbTileMapTransform.txx      |  60 ++--
 .../otbTransMercatorMapProjection.h           |  26 +-
 .../otbTransMercatorMapProjection.txx         |  46 +--
 Code/Projections/otbUtmMapProjection.h        |  28 +-
 Code/Projections/otbUtmMapProjection.txx      |  44 +--
 .../otbAtmosphericCorrectionParameters.cxx    |  22 +-
 .../otbAtmosphericCorrectionParameters.h      |  90 +++---
 ...arametersTo6SAtmosphericRadiativeTerms.cxx |  32 +-
 ...nParametersTo6SAtmosphericRadiativeTerms.h |   8 +-
 .../otbAtmosphericRadiativeTerms.cxx          | 180 +++++------
 .../Radiometry/otbAtmosphericRadiativeTerms.h | 156 ++++-----
 .../otbDEMCaracteristicsExtractor.h           |  48 +--
 .../otbDEMCaracteristicsExtractor.txx         |  32 +-
 .../otbImageToLuminanceImageFilter.h          |  36 +--
 .../otbImageToReflectanceImageFilter.h        |  46 +--
 .../otbLuminanceToReflectanceImageFilter.h    |  38 +--
 ...nelRAndBAndNIRVegetationIndexImageFilter.h |  20 +-
 ...lRAndBAndNIRVegetationIndexImageFilter.txx |  20 +-
 ...ChannelRAndNIRVegetationIndexImageFilter.h |  20 +-
 ...annelRAndNIRVegetationIndexImageFilter.txx |  20 +-
 ...otbRAndBAndNIRVegetationIndexImageFilter.h |  22 +-
 ...bRAndBAndNIRVegetationIndexImageFilter.txx |  18 +-
 .../otbRAndNIRVegetationIndexImageFilter.h    |  20 +-
 .../otbRAndNIRVegetationIndexImageFilter.txx  |  18 +-
 ...flectanceToSurfaceReflectanceImageFilter.h |  44 +--
 Code/Radiometry/otbSIXSTraits.cxx             |  96 +++---
 Code/Radiometry/otbSIXSTraits.h               |  20 +-
 ...aceAdjencyEffect6SCorrectionSchemeFilter.h |  42 +--
 ...eAdjencyEffect6SCorrectionSchemeFilter.txx |  26 +-
 Code/Radiometry/otbVegetationIndex.h          |  28 +-
 ...MultiChannelsPolarimetricSynthesisFilter.h |  94 +++---
 ...ltiChannelsPolarimetricSynthesisFilter.txx | 116 +++----
 Code/SARPolarimetry/otbPolarimetricData.cxx   |  30 +-
 Code/SARPolarimetry/otbPolarimetricData.h     |  36 +--
 .../otbPolarimetricSynthesisFilter.h          |  90 +++---
 .../otbPolarimetricSynthesisFilter.txx        | 156 ++++-----
 .../otbPolarimetricSynthesisFunctor.h         |  34 +-
 .../otbImageListToRCC8GraphFilter.h           |   6 +-
 .../otbImageListToRCC8GraphFilter.txx         |  10 +-
 ...bImageMultiSegmentationToRCC8GraphFilter.h |  14 +-
 ...mageMultiSegmentationToRCC8GraphFilter.txx |  30 +-
 .../otbImageToImageRCC8Calculator.h           |  20 +-
 .../otbImageToImageRCC8Calculator.txx         |  46 +--
 .../otbPolygonToPolygonRCC8Calculator.h       |  22 +-
 .../otbPolygonToPolygonRCC8Calculator.txx     |  28 +-
 Code/SpatialReasoning/otbRCC8Edge.cxx         |   4 +-
 Code/SpatialReasoning/otbRCC8Edge.h           |   4 +-
 Code/SpatialReasoning/otbRCC8EdgeIterator.h   |  12 +-
 Code/SpatialReasoning/otbRCC8EdgeIterator.txx |  60 ++--
 Code/SpatialReasoning/otbRCC8Graph.h          |  14 +-
 Code/SpatialReasoning/otbRCC8Graph.txx        |  14 +-
 .../SpatialReasoning/otbRCC8GraphFileReader.h |  28 +-
 .../otbRCC8GraphFileReader.txx                |  10 +-
 .../SpatialReasoning/otbRCC8GraphFileWriter.h |  36 +--
 .../otbRCC8GraphFileWriter.txx                |  18 +-
 Code/SpatialReasoning/otbRCC8GraphSource.h    |   8 +-
 Code/SpatialReasoning/otbRCC8GraphSource.txx  |   4 +-
 Code/SpatialReasoning/otbRCC8InEdgeIterator.h |  12 +-
 .../otbRCC8InEdgeIterator.txx                 |  52 +--
 .../SpatialReasoning/otbRCC8OutEdgeIterator.h |  12 +-
 .../otbRCC8OutEdgeIterator.txx                |  52 +--
 Code/SpatialReasoning/otbRCC8Value.h          |  12 +-
 Code/SpatialReasoning/otbRCC8VertexBase.h     |  12 +-
 Code/SpatialReasoning/otbRCC8VertexBase.txx   |  10 +-
 Code/SpatialReasoning/otbRCC8VertexIterator.h |  10 +-
 .../otbRCC8VertexIterator.txx                 |  46 +--
 .../otbRCC8VertexWithCompacity.h              |  10 +-
 .../otbRCC8VertexWithCompacity.txx            |   6 +-
 .../otbRCC8VertexWithRegionCenter.h           |  10 +-
 .../otbRCC8VertexWithRegionCenter.txx         |   6 +-
 Code/Visu/otbFixedSizeFullImageWidget.h       |   8 +-
 Code/Visu/otbFixedSizeFullImageWidget.txx     |  28 +-
 Code/Visu/otbFullResolutionImageWidget.h      |   8 +-
 Code/Visu/otbFullResolutionImageWidget.txx    |  32 +-
 Code/Visu/otbGluPolygonDrawingHelper.cxx      |  14 +-
 Code/Visu/otbGluPolygonDrawingHelper.h        |  14 +-
 .../otbHistogramAndTransferFunctionWidget.h   |  22 +-
 .../otbHistogramAndTransferFunctionWidget.txx |  48 +--
 Code/Visu/otbImageAlternateViewer.h           |  44 +--
 Code/Visu/otbImageAlternateViewer.txx         | 154 ++++-----
 .../otbImageToGrayscaleAnaglyphImageFilter.h  |  18 +-
 Code/Visu/otbImageViewer.h                    |  22 +-
 Code/Visu/otbImageViewer.txx                  |  56 ++--
 Code/Visu/otbImageViewerBase.h                |  54 ++--
 Code/Visu/otbImageViewerBase.txx              | 174 +++++-----
 ...ImageViewerFullResolutionEventsInterface.h |   6 +-
 Code/Visu/otbImageViewerFullWidget.h          |  72 ++---
 ...ViewerHistogramAndTransferFunctionWidget.h |  18 +-
 Code/Visu/otbImageViewerScrollWidget.h        |  16 +-
 Code/Visu/otbImageViewerZoomWidget.h          |  28 +-
 Code/Visu/otbImageWidgetBase.h                |  30 +-
 Code/Visu/otbImageWidgetBase.txx              |  74 ++---
 Code/Visu/otbImageWidgetBoxForm.h             |  20 +-
 Code/Visu/otbImageWidgetCircleForm.cxx        |  10 +-
 Code/Visu/otbImageWidgetCircleForm.h          |  26 +-
 Code/Visu/otbImageWidgetFormBase.h            |  16 +-
 Code/Visu/otbImageWidgetPointForm.h           |  16 +-
 Code/Visu/otbImageWidgetPolygonForm.h         |  26 +-
 Code/Visu/otbImageWidgetPolygonForm.txx       |  16 +-
 Code/Visu/otbImageWidgetPolylineForm.h        |  26 +-
 Code/Visu/otbImageWidgetPolylineForm.txx      |  12 +-
 Code/Visu/otbImageWidgetRectangleForm.h       |  26 +-
 Code/Visu/otbImageWidgetTransferFunction.h    |  32 +-
 ...torImageToColorAnaglyphVectorImageFilter.h |  24 +-
 Code/Visu/otbZoomableImageWidget.h            |  12 +-
 Code/Visu/otbZoomableImageWidget.txx          |  42 +--
 693 files changed, 12606 insertions(+), 12606 deletions(-)

diff --git a/Code/BasicFilters/otbBSplineDecompositionImageFilter.h b/Code/BasicFilters/otbBSplineDecompositionImageFilter.h
index 7d10f15c54..38684b775e 100644
--- a/Code/BasicFilters/otbBSplineDecompositionImageFilter.h
+++ b/Code/BasicFilters/otbBSplineDecompositionImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,7 +35,7 @@ namespace otb
  * \ingroup ImageFilters
  */
 template <class TInputImage, class TOutputImage>
-class ITK_EXPORT BSplineDecompositionImageFilter : 
+class ITK_EXPORT BSplineDecompositionImageFilter :
     public itk::ImageToImageFilter<TInputImage,TOutputImage>
 {
 public:
@@ -47,7 +47,7 @@ public:
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(BSplineDecompositionImageFilter, ImageToImageFilter);
- 
+
   /** New macro for creation of through a Smart Pointer */
   itkNewMacro( Self );
 
@@ -115,7 +115,7 @@ private:
 
   /** Copies a vector of data from m_Scratch to the Coefficients image. */
   void CopyScratchToCoefficients( OutputLinearIterator & );
-  
+
 };
 
 
diff --git a/Code/BasicFilters/otbBSplineDecompositionImageFilter.txx b/Code/BasicFilters/otbBSplineDecompositionImageFilter.txx
index 8017c5f39f..f75c4bf660 100644
--- a/Code/BasicFilters/otbBSplineDecompositionImageFilter.txx
+++ b/Code/BasicFilters/otbBSplineDecompositionImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -48,7 +48,7 @@ template <class TInputImage, class TOutputImage>
 void
 BSplineDecompositionImageFilter<TInputImage, TOutputImage>
 ::PrintSelf(
-  std::ostream& os, 
+  std::ostream& os,
   itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
@@ -61,13 +61,13 @@ template <class TInputImage, class TOutputImage>
 bool
 BSplineDecompositionImageFilter<TInputImage, TOutputImage>
 ::DataToCoefficients1D()
-{ 
+{
+
+  // See Unser, 1993, Part II, Equation 2.5,
+  //   or Unser, 1999, Box 2. for an explaination.
 
-  // See Unser, 1993, Part II, Equation 2.5, 
-  //   or Unser, 1999, Box 2. for an explaination. 
+  double c0 = 1.0;
 
-  double c0 = 1.0;  
-  
   if (m_DataLength[m_IteratorDirection] == 1) //Required by mirror boundaries
     {
     return false;
@@ -76,30 +76,30 @@ BSplineDecompositionImageFilter<TInputImage, TOutputImage>
   // Compute overall gain
   for (int k = 0; k < m_NumberOfPoles; k++)
     {
-    // Note for cubic splines lambda = 6 
+    // Note for cubic splines lambda = 6
     c0 = c0 * (1.0 - m_SplinePoles[k]) * (1.0 - 1.0 / m_SplinePoles[k]);
     }
 
-  // apply the gain 
+  // apply the gain
   for (unsigned int n = 0; n < m_DataLength[m_IteratorDirection]; n++)
     {
     m_Scratch[n] *= c0;
     }
 
-  // loop over all poles 
-  for (int k = 0; k < m_NumberOfPoles; k++) 
+  // loop over all poles
+  for (int k = 0; k < m_NumberOfPoles; k++)
     {
-    // causal initialization 
+    // causal initialization
     this->SetInitialCausalCoefficient(m_SplinePoles[k]);
-    // causal recursion 
+    // causal recursion
     for (unsigned int n = 1; n < m_DataLength[m_IteratorDirection]; n++)
       {
       m_Scratch[n] += m_SplinePoles[k] * m_Scratch[n - 1];
       }
 
-    // anticausal initialization 
+    // anticausal initialization
     this->SetInitialAntiCausalCoefficient(m_SplinePoles[k]);
-    // anticausal recursion 
+    // anticausal recursion
     for ( int n = m_DataLength[m_IteratorDirection] - 2; 0 <= n; n--)
       {
       m_Scratch[n] = m_SplinePoles[k] * (m_Scratch[n + 1] - m_Scratch[n]);
@@ -132,7 +132,7 @@ BSplineDecompositionImageFilter<TInputImage, TOutputImage>
 ::SetPoles()
 {
   /* See Unser, 1997. Part II, Table I for Pole values */
-  // See also, Handbook of Medical Imaging, Processing and Analysis, Ed. Isaac N. Bankman, 
+  // See also, Handbook of Medical Imaging, Processing and Analysis, Ed. Isaac N. Bankman,
   //  2000, pg. 416.
   switch (m_SplineOrder)
     {
@@ -195,7 +195,7 @@ BSplineDecompositionImageFilter<TInputImage, TOutputImage>
     {
     /* accelerated loop */
     sum = m_Scratch[0];   // verify this
-    for (unsigned int n = 1; n < horizon; n++) 
+    for (unsigned int n = 1; n < horizon; n++)
       {
       sum += zn * m_Scratch[n];
       zn *= z;
@@ -224,11 +224,11 @@ void
 BSplineDecompositionImageFilter<TInputImage, TOutputImage>
 ::SetInitialAntiCausalCoefficient(double z)
 {
-  // this initialization corresponds to mirror boundaries 
+  // this initialization corresponds to mirror boundaries
   /* See Unser, 1999, Box 2 for explaination */
   //  Also see erratum at http://bigwww.epfl.ch/publications/unser9902.html
   m_Scratch[m_DataLength[m_IteratorDirection] - 1] =
-    (z / (z * z - 1.0)) * 
+    (z / (z * z - 1.0)) *
     (z * m_Scratch[m_DataLength[m_IteratorDirection] - 2] + m_Scratch[m_DataLength[m_IteratorDirection] - 1]);
 }
 
@@ -266,7 +266,7 @@ BSplineDecompositionImageFilter<TInputImage, TOutputImage>
 
       // Perform 1D BSpline calculations
       this->DataToCoefficients1D();
-    
+
       // Copy scratch back to coefficients.
       // Brings us back to the end of the line we were working on.
       CIterator.GoToBeginOfLine();
@@ -303,7 +303,7 @@ BSplineDecompositionImageFilter<TInputImage, TOutputImage>
     ++inIt;
     ++outIt;
     }
- 
+
 }
 
 
diff --git a/Code/BasicFilters/otbBSplineInterpolateImageFunction.h b/Code/BasicFilters/otbBSplineInterpolateImageFunction.h
index cf8c5e4868..119d522fbb 100644
--- a/Code/BasicFilters/otbBSplineInterpolateImageFunction.h
+++ b/Code/BasicFilters/otbBSplineInterpolateImageFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -41,11 +41,11 @@ namespace otb
  * \ingroup ImageFunctions
  */
 template <
-  class TImageType, 
+  class TImageType,
   class TCoordRep = double,
   class TCoefficientType = double >
-class ITK_EXPORT BSplineInterpolateImageFunction : 
-    public itk::InterpolateImageFunction<TImageType,TCoordRep> 
+class ITK_EXPORT BSplineInterpolateImageFunction :
+    public itk::InterpolateImageFunction<TImageType,TCoordRep>
 {
 public:
   /** Standard class typedefs. */
@@ -57,7 +57,7 @@ public:
   /** Run-time type information (and related methods). */
   itkTypeMacro(BSplineInterpolateImageFunction, InterpolateImageFunction);
 
- 
+
   /** New macro for creation of through a Smart Pointer */
   itkNewMacro( Self );
 
@@ -87,25 +87,25 @@ typedef typename InputImageType::RegionType RegionType;
 
   /** Internal Coefficient typedef support */
   typedef TCoefficientType CoefficientDataType;
-  typedef itk::Image<CoefficientDataType, 
+  typedef itk::Image<CoefficientDataType,
                      itkGetStaticConstMacro(ImageDimension)
     > CoefficientImageType;
 
   /** Define filter for calculating the BSpline coefficients */
-  typedef otb::BSplineDecompositionImageFilter<TImageType, CoefficientImageType> 
+  typedef otb::BSplineDecompositionImageFilter<TImageType, CoefficientImageType>
   CoefficientFilter;
   typedef typename CoefficientFilter::Pointer CoefficientFilterPointer;
 
   /** Evaluate the function at a ContinuousIndex position.
    *
-   * Returns the B-Spline interpolated image intensity at a 
+   * Returns the B-Spline interpolated image intensity at a
    * specified point position. No bounds checking is done.
    * The point is assume to lie within the image buffer.
    *
    * ImageFunction::IsInsideBuffer() can be used to check bounds before
    * calling the method. */
-  virtual OutputType EvaluateAtContinuousIndex( 
-    const ContinuousIndexType & index ) const; 
+  virtual OutputType EvaluateAtContinuousIndex(
+    const ContinuousIndexType & index ) const;
 
   /** Derivative typedef support */
   typedef itk::CovariantVector<OutputType,
@@ -113,13 +113,13 @@ typedef typename InputImageType::RegionType RegionType;
     > CovariantVectorType;
 
   CovariantVectorType EvaluateDerivative( const PointType & point ) const
-  {    
+  {
     ContinuousIndexType index;
     this->GetInputImage()->TransformPhysicalPointToContinuousIndex( point, index );
     return ( this->EvaluateDerivativeAtContinuousIndex( index ) );
-  } 
+  }
 
-  CovariantVectorType EvaluateDerivativeAtContinuousIndex( 
+  CovariantVectorType EvaluateDerivativeAtContinuousIndex(
     const ContinuousIndexType & x ) const;
 
 
@@ -133,7 +133,7 @@ typedef typename InputImageType::RegionType RegionType;
   virtual void SetInputImage(const TImageType * inputData);
 
 
-  /** Update coefficients filter. Coefficient filter are computed over the buffered 
+  /** Update coefficients filter. Coefficient filter are computed over the buffered
    region of the input image. */
 virtual void UpdateCoefficientsFilter(void);
 
@@ -148,34 +148,34 @@ protected:
   typename TImageType::SizeType       m_DataLength;  // Image size
   unsigned int                        m_SplineOrder; // User specified spline order (3rd or cubic is the default)
 
-  typename CoefficientImageType::ConstPointer       m_Coefficients; // Spline coefficients  
+  typename CoefficientImageType::ConstPointer       m_Coefficients; // Spline coefficients
 
 private:
   BSplineInterpolateImageFunction( const Self& ); //purposely not implemented
   /** Determines the weights for interpolation of the value x */
-  void SetInterpolationWeights( const ContinuousIndexType & x, 
-                                const vnl_matrix<long> & EvaluateIndex, 
-                                vnl_matrix<double> & weights, 
+  void SetInterpolationWeights( const ContinuousIndexType & x,
+                                const vnl_matrix<long> & EvaluateIndex,
+                                vnl_matrix<double> & weights,
                                 unsigned int splineOrder ) const;
 
   /** Determines the weights for the derivative portion of the value x */
-  void SetDerivativeWeights( const ContinuousIndexType & x, 
-                             const vnl_matrix<long> & EvaluateIndex, 
-                             vnl_matrix<double> & weights, 
+  void SetDerivativeWeights( const ContinuousIndexType & x,
+                             const vnl_matrix<long> & EvaluateIndex,
+                             vnl_matrix<double> & weights,
                              unsigned int splineOrder ) const;
 
-  /** Precomputation for converting the 1D index of the interpolation neighborhood 
+  /** Precomputation for converting the 1D index of the interpolation neighborhood
     * to an N-dimensional index. */
   void GeneratePointsToIndex(  );
 
   /** Determines the indicies to use give the splines region of support */
-  void DetermineRegionOfSupport( vnl_matrix<long> & evaluateIndex, 
-                                 const ContinuousIndexType & x, 
+  void DetermineRegionOfSupport( vnl_matrix<long> & evaluateIndex,
+                                 const ContinuousIndexType & x,
                                  unsigned int splineOrder ) const;
 
-  /** Set the indicies in evaluateIndex at the boundaries based on mirror 
+  /** Set the indicies in evaluateIndex at the boundaries based on mirror
     * boundary conditions. */
-  void ApplyMirrorBoundaryConditions(vnl_matrix<long> & evaluateIndex, 
+  void ApplyMirrorBoundaryConditions(vnl_matrix<long> & evaluateIndex,
                                      unsigned int splineOrder) const;
 
 
@@ -186,7 +186,7 @@ private:
   CoefficientFilterPointer     m_CoefficientFilter;
 
   RegionType m_CurrentBufferedRegion;
-  
+
 };
 
 } // namespace otb
diff --git a/Code/BasicFilters/otbBSplineInterpolateImageFunction.txx b/Code/BasicFilters/otbBSplineInterpolateImageFunction.txx
index 438bf2127b..2345b9938f 100644
--- a/Code/BasicFilters/otbBSplineInterpolateImageFunction.txx
+++ b/Code/BasicFilters/otbBSplineInterpolateImageFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -51,7 +51,7 @@ template <class TImageType, class TCoordRep, class TCoefficientType>
 void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 ::PrintSelf(
-  std::ostream& os, 
+  std::ostream& os,
   itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
@@ -60,7 +60,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 }
 
 template <class TImageType, class TCoordRep, class TCoefficientType>
-void 
+void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 ::UpdateCoefficientsFilter(void)
 {
@@ -72,7 +72,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
       m_CurrentBufferedRegion =m_CoefficientFilter->GetInput()->GetBufferedRegion();
 }
 template <class TImageType, class TCoordRep, class TCoefficientType>
-void 
+void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 ::SetInputImage(const TImageType * inputData)
 {
@@ -82,7 +82,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 
     // the Coefficient Filter requires that the spline order and the input data be set.
     // TODO:  We need to ensure that this is only run once and only after both input and
-    //        spline order have been set. Should we force an update after the 
+    //        spline order have been set. Should we force an update after the
     //        splineOrder has been set also?
 
     UpdateCoefficientsFilter();
@@ -101,7 +101,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 
 
 template <class TImageType, class TCoordRep, class TCoefficientType>
-void 
+void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 ::SetSplineOrder(unsigned int SplineOrder)
 {
@@ -117,13 +117,13 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
   for (unsigned int n=0; n < ImageDimension; n++)
     {
     m_MaxNumberInterpolationPoints *= ( m_SplineOrder + 1);
-    } 
+    }
   this->GeneratePointsToIndex( );
 }
 
 
 template <class TImageType, class TCoordRep, class TCoefficientType>
-typename 
+typename
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 ::OutputType
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
@@ -132,8 +132,8 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
   //UpdateCoefficientsFilter();
   vnl_matrix<long>        EvaluateIndex(ImageDimension, ( m_SplineOrder + 1 ));
 
-  // compute the interpolation indexes 
-  this->DetermineRegionOfSupport(EvaluateIndex, x, m_SplineOrder); 
+  // compute the interpolation indexes
+  this->DetermineRegionOfSupport(EvaluateIndex, x, m_SplineOrder);
 
   // Determine weights
   vnl_matrix<double>        weights(ImageDimension, ( m_SplineOrder + 1 ));
@@ -145,8 +145,8 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 
   // Modify EvaluateIndex at the boundaries using mirror boundary conditions
   this->ApplyMirrorBoundaryConditions(EvaluateIndex, m_SplineOrder);
-  
-  // perform interpolation 
+
+  // perform interpolation
   double interpolated = 0.0;
   IndexType coefficientIndex;
   // Step through eachpoint in the N-dimensional interpolation cube.
@@ -167,7 +167,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
     // m_Coefficients cube.
     interpolated += w * m_Coefficients->GetPixel(coefficientIndex);
     }
-    
+
 /*  double interpolated = 0.0;
   IndexType coefficientIndex;
   // Step through eachpoint in the N-dimensional interpolation cube.
@@ -184,16 +184,16 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
         }
 
         interpolated += w * m_Coefficients->GetPixel(coefficientIndex);
-      }  
+      }
     }
 */
   return(interpolated);
-    
+
 }
 
 
 template <class TImageType, class TCoordRep, class TCoefficientType>
-typename 
+typename
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 :: CovariantVectorType
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
@@ -202,7 +202,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
   UpdateCoefficientsFilter();
   vnl_matrix<long>        EvaluateIndex(ImageDimension, ( m_SplineOrder + 1 ));
 
-  // compute the interpolation indexes 
+  // compute the interpolation indexes
   // TODO: Do we need to revisit region of support for the derivatives?
   this->DetermineRegionOfSupport(EvaluateIndex, x, m_SplineOrder);
 
@@ -215,7 +215,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 
   // Modify EvaluateIndex at the boundaries using mirror boundary conditions
   this->ApplyMirrorBoundaryConditions(EvaluateIndex, m_SplineOrder);
-  
+
   // Calculate derivative
   CovariantVectorType derivativeValue;
   double tempValue;
@@ -225,7 +225,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
     derivativeValue[n] = 0.0;
     for (unsigned int p = 0; p < m_MaxNumberInterpolationPoints; p++)
       {
-      tempValue = 1.0 ; 
+      tempValue = 1.0 ;
       for (unsigned int n1 = 0; n1 < ImageDimension; n1++)
         {
         //coefficientIndex[n1] = EvaluateIndex[n1][sp];
@@ -238,7 +238,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
           }
         else
           {
-          tempValue *= weights[n1][ m_PointsToIndex[p][n1] ];          
+          tempValue *= weights[n1][ m_PointsToIndex[p][n1] ];
           }
         }
       derivativeValue[n] += m_Coefficients->GetPixel(coefficientIndex) * tempValue ;
@@ -247,21 +247,21 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
     }
 
   return(derivativeValue);
-    
+
 }
 
 
 template <class TImageType, class TCoordRep, class TCoefficientType>
-void 
+void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
-::SetInterpolationWeights( const ContinuousIndexType & x, const vnl_matrix<long> & EvaluateIndex, 
+::SetInterpolationWeights( const ContinuousIndexType & x, const vnl_matrix<long> & EvaluateIndex,
                            vnl_matrix<double> & weights, unsigned int splineOrder ) const
 {
   // For speed improvements we could make each case a separate function and use
   // function pointers to reference the correct weight order.
   // Left as is for now for readability.
   double w, w2, w4, t, t0, t1;
-  
+
   switch (splineOrder)
     {
     case 3:
@@ -346,13 +346,13 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
       throw err;
       break;
     }
-    
+
 }
 
 template <class TImageType, class TCoordRep, class TCoefficientType>
-void 
+void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
-::SetDerivativeWeights( const ContinuousIndexType & x, const vnl_matrix<long> & EvaluateIndex, 
+::SetDerivativeWeights( const ContinuousIndexType & x, const vnl_matrix<long> & EvaluateIndex,
                         vnl_matrix<double> & weights, unsigned int splineOrder ) const
 {
   // For speed improvements we could make each case a separate function and use
@@ -362,10 +362,10 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
   // Left as is for now for readability.
   double w, w1, w2, w3, w4, w5, t, t0, t1, t2;
   int derivativeSplineOrder = (int) splineOrder -1;
-  
+
   switch (derivativeSplineOrder)
     {
-    
+
     // Calculates B(splineOrder) ( (x + 1/2) - xi) - B(splineOrder -1) ( (x - 1/2) - xi)
     case -1:
       // Why would we want to do this?
@@ -390,11 +390,11 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 
         weights[n][0] = 0.0 - w1;
         weights[n][1] = w1 - w;
-        weights[n][2] = w; 
+        weights[n][2] = w;
         }
       break;
     case 2:
-      
+
       for (unsigned int n = 0; n < ImageDimension; n++)
         {
         w = x[n] + .5 - (double)EvaluateIndex[n][2];
@@ -405,11 +405,11 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
         weights[n][0] = 0.0 - w1;
         weights[n][1] = w1 - w2;
         weights[n][2] = w2 - w3;
-        weights[n][3] = w3; 
+        weights[n][3] = w3;
         }
       break;
     case 3:
-      
+
       for (unsigned int n = 0; n < ImageDimension; n++)
         {
         w = x[n] + 0.5 - (double)EvaluateIndex[n][2];
@@ -449,7 +449,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
         weights[n][5] = w5;
         }
       break;
-      
+
     default:
       // SplineOrder not implemented yet.
       itk::ExceptionObject err(__FILE__, __LINE__);
@@ -458,7 +458,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
       throw err;
       break;
     }
-    
+
 }
 
 
@@ -491,13 +491,13 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 template <class TImageType, class TCoordRep, class TCoefficientType>
 void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
-::DetermineRegionOfSupport( vnl_matrix<long> & evaluateIndex, 
-                            const ContinuousIndexType & x, 
+::DetermineRegionOfSupport( vnl_matrix<long> & evaluateIndex,
+                            const ContinuousIndexType & x,
                             unsigned int splineOrder ) const
-{ 
+{
   long indx;
 
-// compute the interpolation indexes 
+// compute the interpolation indexes
   for (unsigned int n = 0; n< ImageDimension; n++)
     {
     if (splineOrder & 1)     // Use this index calculation for odd splineOrder
@@ -512,8 +512,8 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
         }
       }
     else                       // Use this index calculation for even splineOrder
-      { 
-	
+      {
+
       indx = (long)vcl_floor((float)(x[n] + 0.5)) - splineOrder / 2;
       //std::cout<<"x: "<<x<<std::endl;
       //std::cout<<"splineOrder: "<<splineOrder<<std::endl;
@@ -529,16 +529,16 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
 template <class TImageType, class TCoordRep, class TCoefficientType>
 void
 BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
-::ApplyMirrorBoundaryConditions(vnl_matrix<long> & evaluateIndex, 
+::ApplyMirrorBoundaryConditions(vnl_matrix<long> & evaluateIndex,
                                 unsigned int splineOrder) const
 {
-  
+
   for (unsigned int n = 0; n < ImageDimension; n++)
     {
     long dataLength =  m_DataLength[n];
     long dataOffset = m_CurrentBufferedRegion.GetIndex()[n];
 
-    // apply the mirror boundary conditions 
+    // apply the mirror boundary conditions
     // TODO:  We could implement other boundary options beside mirror
     if (m_DataLength[n] == 1)
       {
@@ -561,7 +561,7 @@ BSplineInterpolateImageFunction<TImageType,TCoordRep,TCoefficientType>
         }
 
       }
-  
+
     }
 }
 
diff --git a/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.h b/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.h
index 1f19b00b1e..f6e8b096c6 100644
--- a/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.h
+++ b/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,12 +26,12 @@ namespace otb
 /**
  * \class BinaryImageMinimalBoundingRegionCalculator
  * \brief This class compute the smallest region of the image
- * containing every pixel with the foreground value. 
+ * containing every pixel with the foreground value.
  *
  * This class is used for instance in the RCC8 calculator filter,
  * where the input region used for computation has to be the smallest possible
  * for costs reasons. The Pad arg allows the user to get a region of pad  pixel larger
- * at each bound in case a security margin has to be kept. 
+ * at each bound in case a security margin has to be kept.
  *
  * \sa ImageToImageRCC8Calculator
  */
@@ -60,7 +60,7 @@ public:
 	itkGetMacro(InsideValue,PixelType);
 	itkSetMacro(Pad,unsigned int);
 	itkGetMacro(Pad,unsigned int);
-	
+
 protected:
 	/** Constructor */
 	BinaryImageMinimalBoundingRegionCalculator();
diff --git a/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.txx b/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.txx
index 946468ff7b..9b3b8e3963 100644
--- a/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.txx
+++ b/Code/BasicFilters/otbBinaryImageMinimalBoundingRegionCalculator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
  */
 template <class TInputImage>
 BinaryImageMinimalBoundingRegionCalculator<TInputImage>
-::BinaryImageMinimalBoundingRegionCalculator() 
+::BinaryImageMinimalBoundingRegionCalculator()
 {
   // The pad option is desactivated by default
   m_Pad=0;
@@ -51,7 +51,7 @@ template <class TInputImage>
 void
 BinaryImageMinimalBoundingRegionCalculator<TInputImage>
 ::GenerateData(void)
-{ 
+{
     // Input images pointers
     const InputImageType* image = this->GetInput();
     // Iterator definition
@@ -147,7 +147,7 @@ template <class TInputImage>
 void
 BinaryImageMinimalBoundingRegionCalculator<TInputImage>
 ::PrintSelf( std::ostream& os,itk::Indent indent ) const
-  { 
+  {
     Superclass::PrintSelf(os,indent);
   }
 
diff --git a/Code/BasicFilters/otbChangeLabelImageFilter.h b/Code/BasicFilters/otbChangeLabelImageFilter.h
index 5658a5a717..2594e18d0b 100644
--- a/Code/BasicFilters/otbChangeLabelImageFilter.h
+++ b/Code/BasicFilters/otbChangeLabelImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -36,18 +36,18 @@ class ITK_EXPORT ChangeLabelImageFilter
   typedef itk::ChangeLabelImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ChangeLabelImageFilter,ChangeLabelImageFilter);
-  
+
   /** Set/Get the number of components per pixel */
   itkSetMacro(NumberOfComponentsPerPixel,unsigned int);
   itkGetMacro(NumberOfComponentsPerPixel,unsigned int);
-  
- 
+
+
 protected:
   /** Constructor */
   ChangeLabelImageFilter()
diff --git a/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.h b/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.h
index 19f9b0e419..65d3249f68 100644
--- a/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.h
+++ b/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,15 +24,15 @@ namespace otb {
 /**
  * \class ClosingOpeningMorphologicalFilter
  * \brief This filter implements an opening grayscale morphological operation
- * followed by a closing grayscale morphological operation. It tends to simplify 
+ * followed by a closing grayscale morphological operation. It tends to simplify
  * image by obliterating details with a lower extent than the structuring element.
  *
  * This filter implements an opening grayscale morphological operation
- * followed by a closing grayscale morphological operation. It tends to simplify 
+ * followed by a closing grayscale morphological operation. It tends to simplify
  * image by obliterating details with a lower extent than the structuring element.
- * 
+ *
  * This filter can be used in the morphological pyramid analyse filter. Due to the order
- * of composition of the two basic morphological operation, the filtered details are dark 
+ * of composition of the two basic morphological operation, the filtered details are dark
  * on a brighter background.
  *
  * \sa ClosingOpeningMorphologicalFilter,
@@ -48,7 +48,7 @@ public :
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage>   Superclass;
   typedef itk::SmartPointer<Self>                             Pointer;
   typedef itk::SmartPointer<const Self>                       ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkNewMacro(Self);
 
@@ -59,12 +59,12 @@ public :
   typedef TInputImage                                         InputImageType;
   typedef TOutputImage                                        OutputImageType;
   typedef TKernel                                             KernelType;
-  
+
   /** Useful typedefs */
   typedef typename InputImageType::Pointer                    InputImagePointer;
   typedef typename OutputImageType::RegionType                OutputImageRegionType;
   typedef typename TInputImage::PixelType                     PixelType;
-  
+
   /** Kernel accessors */
   itkSetMacro(Kernel, KernelType);
   itkGetConstReferenceMacro(Kernel, KernelType);
diff --git a/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.txx b/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.txx
index 0e33f6762f..3120fc4108 100644
--- a/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.txx
+++ b/Code/BasicFilters/otbClosingOpeningMorphologicalFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,7 +43,7 @@ void
 ClosingOpeningMorphologicalFilter<TInputImage, TOutputImage, TKernel>
 ::GenerateData()
 {
-  // Filters Typedefs (this class is actually a composite filter) 
+  // Filters Typedefs (this class is actually a composite filter)
   typedef itk::GrayscaleMorphologicalOpeningImageFilter<InputImageType,OutputImageType, KernelType> OpenFilterType;
   typedef itk::GrayscaleMorphologicalClosingImageFilter<InputImageType,OutputImageType,KernelType> CloseFilterType;
   // Filters initialisation
@@ -57,8 +57,8 @@ ClosingOpeningMorphologicalFilter<TInputImage, TOutputImage, TKernel>
   progress->SetMiniPipelineFilter(this);
   progress->RegisterInternalFilter(closing, .5f);
   progress->RegisterInternalFilter(opening, .5f);
-  // Internal Pipeline connexion 
-  opening->SetInput(this->GetInput()); 
+  // Internal Pipeline connexion
+  opening->SetInput(this->GetInput());
   closing->SetInput(opening->GetOutput());
   // Output connexion
   closing->GraftOutput(this->GetOutput());
diff --git a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h
index 0824dcdd20..8ad9cc5a91 100644
--- a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h
+++ b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,40 +25,40 @@
 namespace otb
 {
 /** \class ContinuousMinimumMaximumImageCalculator
-   * \brief Compute the continuous maximum and the minimum of an image 
-   * 
+   * \brief Compute the continuous maximum and the minimum of an image
+   *
    * To compute the continuous maximum and the minimum of an image, this
    * class uses a simple polynomial interpolation.
-   * 
-   * First traditional discrete maximum and minimum are found. Then a second 
-   * order polynomial is fitted between these extrema and their neighboring 
+   *
+   * First traditional discrete maximum and minimum are found. Then a second
+   * order polynomial is fitted between these extrema and their neighboring
    * pixels.
-   * 
-   * The continuous extrema is assumed to be at the zero of the first order 
+   *
+   * The continuous extrema is assumed to be at the zero of the first order
    * derivative of this polynom.
-   * 
-   * If we denote \f$ (x_0,y_0) \f$ the extrema and  \f$ (x_{-1},y_{-1}) \f$ and 
-   * \f$ (x_1,y_1) \f$ its neighbor, the second degree polynom verify the 
+   *
+   * If we denote \f$ (x_0,y_0) \f$ the extrema and  \f$ (x_{-1},y_{-1}) \f$ and
+   * \f$ (x_1,y_1) \f$ its neighbor, the second degree polynom verify the
    * following equations:
-   * 
-   *  
+   *
+   *
    * \f[
    * y_{-1} = a*x_{-1}^2 + b*x_{-1} +c
    * y_0 = a*x_0^2 + b*x_0 +c
    * y_1 = a*x_1^2 + b*x_1 +c
    * \f]
-   * 
-   * The maximum is at \f$ -b/2a \f$ with is 
-   * \f$ -\frac{(y_1-y_{-1})}{(2*(y_{-1}+y_1-2*y_0))} \f$ 
-   * 
+   *
+   * The maximum is at \f$ -b/2a \f$ with is
+   * \f$ -\frac{(y_1-y_{-1})}{(2*(y_{-1}+y_1-2*y_0))} \f$
+   *
    * Remark: image is assumed to be 2 dimensionnal
-   * 
-   * 
+   *
+   *
  */
 
-  template <class TInputImage>            
-      class ITK_EXPORT ContinuousMinimumMaximumImageCalculator : 
-      public itk::Object     
+  template <class TInputImage>
+      class ITK_EXPORT ContinuousMinimumMaximumImageCalculator :
+      public itk::Object
       {
         public:
           /** Standard class typedefs. */
@@ -78,25 +78,25 @@ namespace otb
 
           /** Pointer type for the image. */
           typedef typename TInputImage::Pointer  ImagePointer;
-  
+
           /** Const Pointer type for the image. */
           typedef typename TInputImage::ConstPointer ImageConstPointer;
 
           /** Type definition for the input image pixel type. */
           typedef typename TInputImage::PixelType PixelType;
-      
+
           /** Type definition for the input image real pixel type. */
           typedef typename itk::NumericTraits<PixelType>::RealType RealPixelType;
-  
+
           /** Type definition for the input image index type. */
           typedef typename TInputImage::IndexType IndexType;
-  
+
           /** Type definition for the input image index type. */
           typedef typename TInputImage::PointType ContinuousIndexType;
-      
+
           /** Type definition for the input image region type. */
           typedef typename TInputImage::RegionType RegionType;
-  
+
           /** Set the input image. */
           itkSetConstObjectMacro(Image,ImageType);
 
@@ -111,7 +111,7 @@ namespace otb
 
           /** Return the minimum intensity value. */
           itkGetMacro(Minimum,PixelType);
-  
+
           /** Return the maximum intensity value. */
           itkGetMacro(Maximum,PixelType);
 
@@ -120,13 +120,13 @@ namespace otb
 
           /** Return the index of the maximum intensity value. */
           itkGetConstReferenceMacro(IndexOfMaximum,IndexType);
-      
+
           /** Return the index of the minimum intensity value. */
           itkGetConstReferenceMacro(ContinuousIndexOfMinimum,ContinuousIndexType);
 
           /** Return the index of the maximum intensity value. */
           itkGetConstReferenceMacro(ContinuousIndexOfMaximum,ContinuousIndexType);
-      
+
           /** Set the region over which the values will be computed */
           void SetRegion( const RegionType & region );
 
@@ -144,14 +144,14 @@ namespace otb
           ContinuousIndexType            m_ContinuousIndexOfMinimum;
           ContinuousIndexType            m_ContinuousIndexOfMaximum;
           ImageConstPointer    m_Image;
-      
+
           RegionType           m_Region;
           bool                 m_RegionSetByUser;
-      
+
         private:
           ContinuousMinimumMaximumImageCalculator(const Self&); //purposely not implemented
           void operator=(const Self&); //purposely not implemented
-  
+
 
       };
 
diff --git a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx
index 42dd0ef38a..b6486d8fe2 100644
--- a/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx
+++ b/Code/BasicFilters/otbContinuousMinimumMaximumImageCalculator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,8 +24,8 @@
 #include "itkNumericTraits.h"
 
 namespace otb
-{ 
-    
+{
+
 /*
   * Constructor
  */
@@ -62,22 +62,22 @@ namespace otb
 
     while( !it.IsAtEnd() )
     {
-      const RealPixelType value = it.Get();  
-      if (value > static_cast<RealPixelType>(m_Maximum) ) 
+      const RealPixelType value = it.Get();
+      if (value > static_cast<RealPixelType>(m_Maximum) )
       {
         m_Maximum = static_cast<PixelType>(value);
         m_IndexOfMaximum = it.GetIndex();
       }
-      if (value < static_cast<RealPixelType>(m_Minimum)) 
+      if (value < static_cast<RealPixelType>(m_Minimum))
       {
         m_Minimum = static_cast<PixelType>(value);
         m_IndexOfMinimum = it.GetIndex();
       }
       ++it;
     }
-    
+
     IndexType indexNeighbor;
-    
+
     { //Continuous Minimum calculation
       //Compute horizontal offset
       indexNeighbor[0] = m_IndexOfMinimum[0]-1;
@@ -88,9 +88,9 @@ namespace otb
       indexNeighbor[1] = m_IndexOfMinimum[1];
       it.SetIndex(indexNeighbor);
       const RealPixelType rightValue= it.Get();
-      
+
       double hOffset = -(rightValue-leftValue) / (2*(rightValue+leftValue-2*m_Minimum));
-      
+
       //Compute vertical offset
       indexNeighbor[0] = m_IndexOfMinimum[0];
       indexNeighbor[1] = m_IndexOfMinimum[1]-1;
@@ -100,16 +100,16 @@ namespace otb
       indexNeighbor[1] = m_IndexOfMinimum[1]+1;
       it.SetIndex(indexNeighbor);
       const RealPixelType bottomValue= it.Get();
-      
-  
+
+
       double vOffset = -(bottomValue-topValue) / (2*(bottomValue+topValue-2*m_Minimum));
-  
-  
+
+
       m_ContinuousIndexOfMinimum[0] = m_IndexOfMinimum[0] + hOffset;
       m_ContinuousIndexOfMinimum[1] = m_IndexOfMinimum[1] + vOffset;
     }
-    
-    
+
+
     { //Continuous Maximum calculation
       //Compute horizontal offset
       indexNeighbor[0] = m_IndexOfMaximum[0]-1;
@@ -120,9 +120,9 @@ namespace otb
       indexNeighbor[1] = m_IndexOfMaximum[1];
       it.SetIndex(indexNeighbor);
       const RealPixelType rightValue= it.Get();
-      
+
       double hOffset = -(rightValue-leftValue) / (2*(rightValue+leftValue-2*m_Maximum));
-      
+
       //Compute vertical offset
       indexNeighbor[0] = m_IndexOfMaximum[0];
       indexNeighbor[1] = m_IndexOfMaximum[1]-1;
@@ -132,15 +132,15 @@ namespace otb
       indexNeighbor[1] = m_IndexOfMaximum[1]+1;
       it.SetIndex(indexNeighbor);
       const RealPixelType bottomValue= it.Get();
-      
-  
+
+
       double vOffset = -(bottomValue-topValue) / (2*(bottomValue+topValue-2*m_Maximum));
-  
-  
+
+
       m_ContinuousIndexOfMaximum[0] = m_IndexOfMaximum[0] + hOffset;
       m_ContinuousIndexOfMaximum[1] = m_IndexOfMaximum[1] + vOffset;
     }
-    
+
   }
 
 /*
@@ -160,17 +160,17 @@ namespace otb
 
     while( !it.IsAtEnd() )
     {
-      const RealPixelType value = it.Get();  
-      if (value < static_cast<RealPixelType>(m_Minimum)) 
+      const RealPixelType value = it.Get();
+      if (value < static_cast<RealPixelType>(m_Minimum))
       {
         m_Minimum = static_cast<PixelType>(value);
         m_IndexOfMinimum = it.GetIndex();
       }
       ++it;
     }
-    
+
     IndexType indexNeighbor;
-    
+
     //Compute horizontal offset
     indexNeighbor[0] = m_IndexOfMinimum[0]-1;
     indexNeighbor[1] = m_IndexOfMinimum[1];
@@ -180,9 +180,9 @@ namespace otb
     indexNeighbor[1] = m_IndexOfMinimum[1];
     it.SetIndex(indexNeighbor);
     const RealPixelType rightValue= it.Get();
-    
+
     double hOffset = -(rightValue-leftValue) / (2*(rightValue+leftValue-2*m_Minimum));
-    
+
     //Compute vertical offset
     indexNeighbor[0] = m_IndexOfMinimum[0];
     indexNeighbor[1] = m_IndexOfMinimum[1]-1;
@@ -192,17 +192,17 @@ namespace otb
     indexNeighbor[1] = m_IndexOfMinimum[1]+1;
     it.SetIndex(indexNeighbor);
     const RealPixelType bottomValue= it.Get();
-    
+
 
     double vOffset = -(bottomValue-topValue) / (2*(bottomValue+topValue-2*m_Minimum));
 
 
     m_ContinuousIndexOfMinimum[0] = m_IndexOfMinimum[0] + hOffset;
     m_ContinuousIndexOfMinimum[1] = m_IndexOfMinimum[1] + vOffset;
-    
-    
-    
-    
+
+
+
+
   }
 
 /*
@@ -222,7 +222,7 @@ namespace otb
 
     while( !it.IsAtEnd() )
     {
-      const RealPixelType value = it.Get();  
+      const RealPixelType value = it.Get();
       if (value > static_cast<RealPixelType>(m_Maximum) )
       {
         m_Maximum = static_cast<PixelType>(value);
@@ -230,7 +230,7 @@ namespace otb
       }
       ++it;
     }
-    
+
         //Solve equations a,b,c
 //     y0 = a*x0^2 + b*x0 +c
 //     y1 = a*x1^2 + b*x1 +c
@@ -239,12 +239,12 @@ namespace otb
 //     y0 = a - b +c
 //     y1 = c
 //     y2 = a + b +c
-    //    
-    //     
+    //
+    //
     // Max is at -b/2a
     // -(y2-y0)/(2*(y0+y2-2y1))
     IndexType indexNeighbor;
-    
+
     //Compute horizontal offset
     indexNeighbor[0] = m_IndexOfMaximum[0]-1;
     indexNeighbor[1] = m_IndexOfMaximum[1];
@@ -254,9 +254,9 @@ namespace otb
     indexNeighbor[1] = m_IndexOfMaximum[1];
     it.SetIndex(indexNeighbor);
     const RealPixelType rightValue= it.Get();
-    
+
     double hOffset = -(rightValue-leftValue) / (2*(rightValue+leftValue-2*m_Maximum));
-    
+
     //Compute vertical offset
     indexNeighbor[0] = m_IndexOfMaximum[0];
     indexNeighbor[1] = m_IndexOfMaximum[1]-1;
@@ -266,14 +266,14 @@ namespace otb
     indexNeighbor[1] = m_IndexOfMaximum[1]+1;
     it.SetIndex(indexNeighbor);
     const RealPixelType bottomValue= it.Get();
-    
+
 
     double vOffset = -(bottomValue-topValue) / (2*(bottomValue+topValue-2*m_Maximum));
 
 
     m_ContinuousIndexOfMaximum[0] = m_IndexOfMaximum[0] + hOffset;
     m_ContinuousIndexOfMaximum[1] = m_IndexOfMaximum[1] + vOffset;
-    
+
   }
 
 
@@ -288,7 +288,7 @@ namespace otb
   }
 
 
- 
+
   template<class TInputImage>
       void
       ContinuousMinimumMaximumImageCalculator<TInputImage>
@@ -306,7 +306,7 @@ namespace otb
     os << indent << "Index of Maximum: " << m_IndexOfMaximum << std::endl;
     os << indent << "Continuous Index of Minimum: " << m_ContinuousIndexOfMinimum << std::endl;
     os << indent << "Continuous Index of Maximum: " << m_ContinuousIndexOfMaximum << std::endl;
-    
+
     os << indent << "Image: " << std::endl;
     m_Image->Print(os, indent.GetNextIndent());
     os << indent << "Region: " << std::endl;
diff --git a/Code/BasicFilters/otbConvolutionImageFilter.h b/Code/BasicFilters/otbConvolutionImageFilter.h
index d313e56476..1f80af8867 100644
--- a/Code/BasicFilters/otbConvolutionImageFilter.h
+++ b/Code/BasicFilters/otbConvolutionImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,25 +31,25 @@ namespace otb
  *
  * Computes an image which is the convolution of the input image
  * with a filter.
- * 
- * The radius of the input filter is provided by the \code SetInput() \endcode 
- * method and the filters coefficients are given by an itk::Array passed to the 
+ *
+ * The radius of the input filter is provided by the \code SetInput() \endcode
+ * method and the filters coefficients are given by an itk::Array passed to the
  * \code SetFilter() \endcode method.
- * 
- * By default, the input filter is not normalized but it can be using the 
+ *
+ * By default, the input filter is not normalized but it can be using the
  * NormalizeFilterOn() method.
  *
- * This filter allows the user to choose the boundary condtions in the template parameters. 
+ * This filter allows the user to choose the boundary condtions in the template parameters.
  Default boundary conditions are zero flux Neumann boundary conditions.
  *
  * An optimized version of this filter using FFTW is available in the Orfeo ToolBox and
- * will significantly improves performances especially for large kernels 
+ * will significantly improves performances especially for large kernels
  * (see OverlapSaveConvolutionImageFilter).
  *
  * \sa Image
  * \sa Neighborhood
  * \sa NeighborhoodOperator
- * \sa NeighborhoodIterator 
+ * \sa NeighborhoodIterator
  * \sa ImageBoundaryCondition
  * \sa ZeroFluxNeumannBoundaryCondition
  * \sa OverlapSaveConvolutionImageFilter
@@ -84,7 +84,7 @@ public:
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ConvolutionImageFilter, ImageToImageFilter);
-  
+
   /** Image typedef support. */
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
@@ -94,13 +94,13 @@ public:
   typedef typename InputImageType::SizeType InputSizeType;
   typedef typename itk::Array<InputRealType> ArrayType;
   typedef TBoundaryCondition BoundaryConditionType;
-  
+
   /** Set the radius of the neighborhood of the filter */
-  virtual void SetRadius (const InputSizeType rad) 
-  { 
-      itkDebugMacro("setting radius to " << rad); 
-          if (this->m_Radius != rad) 
-          { 
+  virtual void SetRadius (const InputSizeType rad)
+  {
+      itkDebugMacro("setting radius to " << rad);
+          if (this->m_Radius != rad)
+          {
               this->m_Radius = rad;
               unsigned int arraySize=1;
               for (unsigned int i=0; i<m_Radius.GetSizeDimension(); i++)
@@ -109,13 +109,13 @@ public:
               }
               this->m_Filter.SetSize(arraySize);
               this->m_Filter.Fill(1);
-              this->Modified(); 
-          } 
+              this->Modified();
+          }
   }
 
   /** Get the radius of the neighborhood of the filter*/
   itkGetConstReferenceMacro(Radius, InputSizeType);
-  
+
   /** Set the input filter */
   void SetFilter( ArrayType filter )
     {
@@ -131,14 +131,14 @@ public:
     }
   itkGetConstReferenceMacro(Filter, ArrayType);
 
-  
+
   /**
    * Set/Get methods for the normalization of the filter
   */
   itkSetMacro(NormalizeFilter, bool);
   itkGetMacro(NormalizeFilter, bool);
   itkBooleanMacro(NormalizeFilter);
-  
+
 #ifdef ITK_USE_CONCEPT_CHECKING
   /** Begin concept checking */
   itkConceptMacro(InputHasNumericTraitsCheck,
@@ -183,7 +183,7 @@ private:
   /** Flag for filter coefficients normalization */
   bool m_NormalizeFilter;
 };
-  
+
 } // end namespace itk
 
 #ifndef ITK_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbConvolutionImageFilter.txx b/Code/BasicFilters/otbConvolutionImageFilter.txx
index 79fc6c0538..1cfd38ec92 100644
--- a/Code/BasicFilters/otbConvolutionImageFilter.txx
+++ b/Code/BasicFilters/otbConvolutionImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -41,18 +41,18 @@ ConvolutionImageFilter<TInputImage, TOutputImage, TBoundaryCondition>
 }
 
 template <class TInputImage, class TOutputImage, class TBoundaryCondition>
-void 
+void
 ConvolutionImageFilter<TInputImage, TOutputImage, TBoundaryCondition>
 ::GenerateInputRequestedRegion() throw (itk::InvalidRequestedRegionError)
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
-  typename Superclass::InputImagePointer inputPtr = 
+  typename Superclass::InputImagePointer inputPtr =
     const_cast< TInputImage * >( this->GetInput() );
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -79,7 +79,7 @@ ConvolutionImageFilter<TInputImage, TOutputImage, TBoundaryCondition>
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     e.SetLocation(ITK_LOCATION);
@@ -101,11 +101,11 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
   unsigned int i;
   itk::ConstNeighborhoodIterator<InputImageType> bit;
   itk::ImageRegionIterator<OutputImageType> it;
-  
+
   // Allocate output
   typename OutputImageType::Pointer output = this->GetOutput();
   typename  InputImageType::ConstPointer input  = this->GetInput();
-  
+
   // Find the data-set boundary "faces"
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType faceList;
   itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType> bC;
@@ -115,14 +115,14 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   InputRealType sum;
   InputRealType norm;
 
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-  { 
+  {
     bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius,
         input, *fit);
 
@@ -130,7 +130,7 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
     bit.OverrideBoundaryCondition(&nbc);
     bit.GoToBegin();
     unsigned int neighborhoodSize = bit.Size();
-   
+
     while ( ! bit.IsAtEnd() )
     {
       sum = itk::NumericTraits<InputRealType>::Zero;
@@ -140,7 +140,7 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
         sum += static_cast<InputRealType>( bit.GetPixel(i)*m_Filter(i) );
         norm += static_cast<InputRealType>( m_Filter(i) );
       }
-	
+
 	    // get the mean value
       if (m_NormalizeFilter)
       {
@@ -150,7 +150,7 @@ ConvolutionImageFilter< TInputImage, TOutputImage, TBoundaryCondition>
       {
         it.Set( static_cast<OutputPixelType>(sum));
       }
-	
+
       ++bit;
       ++it;
       progress.CompletedPixel();
diff --git a/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h b/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h
index 26dbaa7577..ae6a6c8125 100644
--- a/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h
+++ b/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
   See ITCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,12 +30,12 @@ namespace Statistics {
 /** \class EuclideanDistanceWithMissingValue
  * \brief Euclidean distance function facing missing value.
  *
- * This class is derived from EuclideanDistance class. In addition 
+ * This class is derived from EuclideanDistance class. In addition
  * to the initial Evaluate method, the class does not perform calculation
  * when a component does not contain any data.
- * 
+ *
  * The class can be templated over any container that holds data elements, as
- * for template of EuclideanDistance. 
+ * for template of EuclideanDistance.
  *
  * The only restriction is that elemnts have to support \code NaN \endcode.
  *
@@ -49,7 +49,7 @@ class ITK_EXPORT EuclideanDistanceWithMissingValue :
 		/** Standard "Self" typedef. */
 		typedef EuclideanDistanceWithMissingValue Self;
 		typedef itk::Statistics::EuclideanDistance< TVector > Superclass;
-		typedef itk::SmartPointer< Self > Pointer ; 
+		typedef itk::SmartPointer< Self > Pointer ;
 		typedef itk::SmartPointer<const Self> ConstPointer;
 		typedef typename Superclass::MeasurementVectorSizeType MeasurementVectorSizeType;
 
@@ -69,7 +69,7 @@ class ITK_EXPORT EuclideanDistanceWithMissingValue :
 		double Evaluate(const TVector &x1, const TVector &x2) const ;
 
 		/** Gets the cooridnate distance between a and b. NOTE: a and b
-		* should be type of component */ 
+		* should be type of component */
 		double Evaluate(const ValueType &a, const ValueType &b) const ;
 
 		/** Returns true if the distance between x and the origin is less
@@ -85,7 +85,7 @@ class ITK_EXPORT EuclideanDistanceWithMissingValue :
 
 	protected:
 		EuclideanDistanceWithMissingValue() {}
-		virtual ~EuclideanDistanceWithMissingValue() {} 
+		virtual ~EuclideanDistanceWithMissingValue() {}
 } ; // end of class
 
 } // end namespace statistics
diff --git a/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx b/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx
index e3d3bb7ba8..1ebea3f0a4 100644
--- a/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx
+++ b/Code/BasicFilters/otbEuclideanDistanceWithMissingValue.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
   See ITCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ inline double
 EuclideanDistanceWithMissingValue< TVector >
 ::Evaluate(const TVector &x1, const TVector &x2) const
 {
-	if( itk::MeasurementVectorTraits::GetLength( x1 ) != 
+	if( itk::MeasurementVectorTraits::GetLength( x1 ) !=
 		itk::MeasurementVectorTraits::GetLength( x2 ) )
 	{
 		itkExceptionMacro( << "Vector lengths must be equal." );
@@ -58,13 +58,13 @@ inline double
 EuclideanDistanceWithMissingValue< TVector >
 ::Evaluate(const TVector &x) const
 {
-	MeasurementVectorSizeType 
+	MeasurementVectorSizeType
 		measurementVectorSize = this->GetMeasurementVectorSize();
-	if(measurementVectorSize == 0) 
+	if(measurementVectorSize == 0)
 	{
 		itkExceptionMacro( << "Please set the MeasurementVectorSize first" );
 	}
-	itk::MeasurementVectorTraits::Assert( this->m_Origin, measurementVectorSize, 
+	itk::MeasurementVectorTraits::Assert( this->m_Origin, measurementVectorSize,
 		"EuclideanDistance::Evaluate Origin and input vector have different lengths");
 
 	double temp, distance = itk::NumericTraits< double >::Zero ;
@@ -97,9 +97,9 @@ EuclideanDistanceWithMissingValue< TVector >
 template< class TVector >
 bool
 EuclideanDistanceWithMissingValue< TVector >
-::IsMissingValue ( const ValueType & v) 
+::IsMissingValue ( const ValueType & v)
 {
-	return vnl_math_isnan(v); 
+	return vnl_math_isnan(v);
 }
 
 template< class TVector >
diff --git a/Code/BasicFilters/otbFrostImageFilter.h b/Code/BasicFilters/otbFrostImageFilter.h
index d158a067f6..0e02294af8 100644
--- a/Code/BasicFilters/otbFrostImageFilter.h
+++ b/Code/BasicFilters/otbFrostImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,17 +30,17 @@ namespace otb
  *
  * Uses a negative exponential convolution kernel.
  * The output of the filter for pixel p is:
- *      \f$ \hat I_{s}=\sum_{p\in\eta_{p}} m_{p}I_{p} \f$ 
+ *      \f$ \hat I_{s}=\sum_{p\in\eta_{p}} m_{p}I_{p} \f$
  *
  * where :   \f$ m_{p}=\frac{KC_{s}^{2}\exp(-KC_{s}^{2}d_{s,p})}{\sum_{p\in\eta_{p}} KC_{s}^{2}\exp(-KC_{s}^{2}d_{s,p})} \f$
  *    and  \f$ d_{s,p}=\sqrt{(i-i_{p})^2+(j-j_{p})^2} \f$
  *
  * \f$ K \f$     : the decrease coefficient
  * \f$ (i,j)\f$ : the coordinates of the pixel inside the region
- * defined by \f$ \eta_{s} \f$ 
+ * defined by \f$ \eta_{s} \f$
  * \f$ (i_{p},j_{p})\f$ : the coordinates of the pixels belonging to \f$ \eta_{p} \subset \eta_{s} \f$
- * \f$ C_{s}\f$ : the variation coefficient computed over \f$ \eta_{p}\f$ 
- * 
+ * \f$ C_{s}\f$ : the variation coefficient computed over \f$ \eta_{p}\f$
+ *
  */
 
 template <class TInputImage, class TOutputImage>
@@ -51,7 +51,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -71,13 +71,13 @@ public:
 
   /** Return the class name. */
   itkTypeMacro(FrostImageFilter, ImageToImageFilter);
-  
+
   /** Supported images definition. */
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
   /** "typedef" to define a real. */
   typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
@@ -89,13 +89,13 @@ public:
 
   /** Get the radius used to define the neighborhood for the filter calculation. */
   itkGetConstReferenceMacro(Radius, SizeType);
-  
+
   /** Set The numbers of view used for the filter calculation. */
   itkSetMacro(Deramp, double);
   /** Get The numbers of view used for the filter calculation. */
   itkGetConstReferenceMacro(Deramp, double);
 
-  /** To be allowed to use the pipeline method FrostImageFilter needs 
+  /** To be allowed to use the pipeline method FrostImageFilter needs
     * an input processing area larger than the output one.
     * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
   virtual void GenerateInputRequestedRegion() throw(itk::InvalidRequestedRegionError);
@@ -131,5 +131,5 @@ private:
 #include "otbFrostImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/BasicFilters/otbFrostImageFilter.txx b/Code/BasicFilters/otbFrostImageFilter.txx
index 8a835f0cb2..6bafbbb208 100644
--- a/Code/BasicFilters/otbFrostImageFilter.txx
+++ b/Code/BasicFilters/otbFrostImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -48,11 +48,11 @@ void FrostImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion()
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
   typename Superclass::InputImagePointer inputPtr   =  const_cast< TInputImage * >( this->GetInput() );
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -79,7 +79,7 @@ void FrostImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion()
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     itk::OStringStream msg;
@@ -94,7 +94,7 @@ void FrostImageFilter<TInputImage, TOutputImage>::GenerateInputRequestedRegion()
 
 
 template< class TInputImage, class TOutputImage>
-void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(	
+void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
 			const 	OutputImageRegionType& 		outputRegionForThread,
                        	int 	threadId
 				)
@@ -104,12 +104,12 @@ void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
   itk::ConstNeighborhoodIterator<InputImageType> 		bit;
   typename itk::ConstNeighborhoodIterator<InputImageType>::OffsetType	off;
   itk::ImageRegionIterator<OutputImageType> 			it;
-  
-  
+
+
   // Allocate output
   typename OutputImageType::Pointer     output = this->GetOutput();
   typename InputImageType::ConstPointer input  = this->GetInput();
-  
+
   // Find the data-set boundary "faces"
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType 		faceList;
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType::iterator 	fit;
@@ -120,22 +120,22 @@ void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   InputRealType sum;
   InputRealType sum2;
 
-  double 	Mean, Variance; 
-  double	Alpha;   	 
+  double 	Mean, Variance;
+  double	Alpha;
   double    	NormFilter;
   double	FrostFilter;
   double	CoefFilter;
   double	dPixel;
-  
-    
+
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-    { 
+    {
     bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius, input, *fit);
     unsigned int neighborhoodSize = bit.Size();
     it = itk::ImageRegionIterator<OutputImageType>(output, *fit);
@@ -154,7 +154,7 @@ void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
         }
       Mean   = sum  / double(neighborhoodSize);
       Variance  = sum2 / double(neighborhoodSize) - Mean * Mean ;
-     
+
       if(Mean == 0)
 	{
 	  Alpha = 0;
@@ -163,15 +163,15 @@ void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
 	{
 	  Alpha = m_Deramp * Variance / (Mean * Mean) ;
 	}
-      
+
       NormFilter  = 0.0;
       FrostFilter = 0.0;
- 
+
       const double rad_x = static_cast<double>(m_Radius[0]);
       const double rad_y = static_cast<double>(m_Radius[1]);
-                 
-      for (double x = -rad_x; x<= rad_x; x++)      
-      	{	
+
+      for (double x = -rad_x; x<= rad_x; x++)
+      	{
        	for (double y = -rad_y; y <= rad_y; y++)
 		{
 		double Dist = double(vcl_sqrt(x*x+y*y));
@@ -185,19 +185,19 @@ void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
 		FrostFilter = FrostFilter + (CoefFilter * dPixel);
 		}
         }
-	  
-	  
+
+
 	  if (NormFilter==0.)
 	  	  dPixel=0.;
 	  else
 		  dPixel=FrostFilter/NormFilter;
-                  
+
       it.Set( static_cast<OutputPixelType>( dPixel ) );
-      
+
       ++bit;
       ++it;
       progress.CompletedPixel();
-      
+
       }
     }
 }
@@ -206,7 +206,7 @@ void FrostImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutput>
-void 
+void
 FrostImageFilter<TInputImage, TOutput>::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Code/BasicFilters/otbFunctionToImageFilter.h b/Code/BasicFilters/otbFunctionToImageFilter.h
index fdf54f3882..49a8449adf 100644
--- a/Code/BasicFilters/otbFunctionToImageFilter.h
+++ b/Code/BasicFilters/otbFunctionToImageFilter.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@
 
 namespace otb
 {
-  
+
 /** \class FunctionToImageFilter
   * \brief Evaluates a ImageFunction onto a source image
  *
@@ -43,17 +43,17 @@ namespace otb
  * Like its parent ImageToImageFilter, this class functions in the filtering
  * pipeline and produces a unique output image.
  *
- * The function hs to inherite from itkImageFunction 
+ * The function hs to inherite from itkImageFunction
  *
  * \sa SpatialFunctionImageEvaluatorFilter
  * \sa SpatialFunctionImageFilter
- * \sa ImageFunction 
+ * \sa ImageFunction
  * \ingroup ImageFilters
  */
 
 template <class TInputImage, class TOutputImage,class TFunction    >
 class ITK_EXPORT FunctionToImageFilter :
-    public itk::InPlaceImageFilter<TInputImage,TOutputImage> 
+    public itk::InPlaceImageFilter<TInputImage,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -72,8 +72,8 @@ public:
   /** Image size typedef. */
   typedef TInputImage                           InputImageType;
   typedef typename InputImageType::ConstPointer InputImagePointer;
-  typedef typename InputImageType::RegionType   InputImageRegionType; 
-  typedef typename InputImageType::PixelType    InputImagePixelType; 
+  typedef typename InputImageType::RegionType   InputImageRegionType;
+  typedef typename InputImageType::PixelType    InputImagePixelType;
   typedef TOutputImage                          OutputImageType;
   typedef typename OutputImageType::Pointer     OutputImagePointer;
   typedef typename OutputImageType::RegionType  OutputImageRegionType;
@@ -82,7 +82,7 @@ public:
   typedef TFunction                             FunctionType;
   typedef typename FunctionType::OutputType     FunctionValueType;
   typedef typename FunctionType::InputType      FunctionPositionType;
- 
+
   /** Connect one of the operands for pixel-wise addition. */
   //void SetInput( const TInputImage *image);
 
diff --git a/Code/BasicFilters/otbFunctionToImageFilter.txx b/Code/BasicFilters/otbFunctionToImageFilter.txx
index 889a38bd44..a3729d8f87 100644
--- a/Code/BasicFilters/otbFunctionToImageFilter.txx
+++ b/Code/BasicFilters/otbFunctionToImageFilter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -49,7 +49,7 @@ FunctionToImageFilter<TInputImage,TOutputImage,TFunction>
 // template<class TInputImage, class TOutputImage, class TFunction >
 // void
 // FunctionToImageFilter<TInputImage,TOutputImage,TFunction>
-// ::SetInput( const TInputImage *image ) 
+// ::SetInput( const TInputImage *image )
 // {
 //   // The ProcessObject is not const-correct so the const_cast is required here
 //   SetNthInput( 0, const_cast<TInputImage *>( image ) );
@@ -64,13 +64,13 @@ void
 FunctionToImageFilter<TInputImage,TOutputImage,TFunction>
 ::BeforeThreadedGenerateData()
 {
-  InputImagePointer inputPtr 
+  InputImagePointer inputPtr
     = dynamic_cast<const TInputImage*>((itk::ProcessObject::GetInput(0)));
   if (inputPtr.IsNull())
     {
       itkExceptionMacro(<< "At least one input is missing."
 			<< " Input is missing :" << inputPtr.GetPointer();)
-                     
+
     }
 
    m_PixelFunction->SetInputImage(inputPtr);
@@ -85,13 +85,13 @@ FunctionToImageFilter<TInputImage,TOutputImage,TFunction>
 ::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread,
                         int threadId)
 {
-  
+
   // We use dynamic_cast since inputs are stored as DataObjects.
   InputImagePointer inputPtr
     = dynamic_cast<const TInputImage*>((itk::ProcessObject::GetInput(0)));
- 
+
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
   itk::ImageRegionConstIterator<TInputImage> inputIt(inputPtr, outputRegionForThread);
   itk::ImageRegionIterator<TOutputImage> outputIt(outputPtr, outputRegionForThread);
 
@@ -100,12 +100,12 @@ FunctionToImageFilter<TInputImage,TOutputImage,TFunction>
   inputIt.GoToBegin();
   outputIt.GoToBegin();
 
-  while( !inputIt.IsAtEnd() ) 
-    {   
+  while( !inputIt.IsAtEnd() )
+    {
       outputIt.Set( static_cast<OutputImagePixelType>(m_PixelFunction->EvaluateAtIndex(inputIt.GetIndex())) );
       ++inputIt;
       ++outputIt;
-      
+
       progress.CompletedPixel(); // potential exception thrown here
     }
 }
diff --git a/Code/BasicFilters/otbGaborFilterGenerator.h b/Code/BasicFilters/otbGaborFilterGenerator.h
index 3b36f6bdd1..acd6791d57 100644
--- a/Code/BasicFilters/otbGaborFilterGenerator.h
+++ b/Code/BasicFilters/otbGaborFilterGenerator.h
@@ -8,7 +8,7 @@
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -34,18 +34,18 @@ namespace otb
    * This class allows to generate gabor filter convolution mask. The mask is stored
    * in a linear buffer of type itk::Array returned by the GetFilter() method.
    *
-   * When calling the GetFilter() method, if the filter has to be regenerated, it will be 
+   * When calling the GetFilter() method, if the filter has to be regenerated, it will be
    * done seamlessly.
-   * 
+   *
    * Gabor filters are commonly used in image processing for textures description for instance
    * The complex Gabor function is the product in spatial domain of a complex sinusoidal, also
    * known as the carrier, and a gaussian-shaped function, also knwown as the envelop.
-   * 
-   * Please note that this helper class generates a filter whose coefficients are the real part 
+   *
+   * Please note that this helper class generates a filter whose coefficients are the real part
    * of a complex Gabor fucntion.
    *
    * The formula used to compute these coefficients is as follows:
-   * 
+   *
    * \f$ g(x,y) = \exp\Big(-\pi((a x_\theta)^{2} +(b y_\theta)^{2})\Big) * \cos\big(2\pi(u_0*x + v_0*y)+\phi\big) \f$
    *
    * with:
@@ -55,7 +55,7 @@ namespace otb
    * \f$ y_\theta = y \cos(\theta)-x \sin(\theta) \f$
    *
    * Where:
-   * 
+   *
    * - Radius         : Radius of the generated filter (GetRadius()/SetRadius())
    * - \f$ a      \f$ : Scale the x axis of the gaussian envelop. (GetA()/SetA())
    * - \f$ b      \f$ : Scale the y axis of the gaussian envelop (GetB()/SetB())
@@ -66,12 +66,12 @@ namespace otb
    *
    */
 
-template <class TPrecision> 
+template <class TPrecision>
 class GaborFilterGenerator
   : public itk::Object
   {
   public:
-    // Standard class typedefs 
+    // Standard class typedefs
     typedef GaborFilterGenerator Self;
     typedef itk::Object          Superclass;
     typedef itk::SmartPointer<Self> Pointer;
@@ -81,7 +81,7 @@ class GaborFilterGenerator
     itkNewMacro(Self);
     itkTypeMacro(GaborFilterGenerator,Object);
 
-    // usefull typedefs 
+    // usefull typedefs
     typedef TPrecision PrecisionType;
     typedef itk::Array<PrecisionType> ArrayType;
     typedef itk::Size<2>              RadiusType;
@@ -101,10 +101,10 @@ class GaborFilterGenerator
     itkGetMacro(V0,PrecisionType);
     itkSetMacro(Radius,RadiusType);
     itkGetConstReferenceMacro(Radius,RadiusType);
-    
+
     /** Get The generated filter */
     const ArrayType & GetFilter();
-    
+
   protected:
     /** constructor */
     GaborFilterGenerator();
@@ -117,7 +117,7 @@ class GaborFilterGenerator
     /** Generate the filter coefficients */
     void GenerateFilter();
 
-    /** Reimplement the Modified() method 
+    /** Reimplement the Modified() method
      *to set the NeedToGenerateFilter to true */
     virtual void Modified();
 
@@ -127,7 +127,7 @@ class GaborFilterGenerator
 
     /** Radius of the filter */
     RadiusType m_Radius;
-    
+
     /** Gabor parameters */
     PrecisionType m_A;
     PrecisionType m_B;
@@ -135,13 +135,13 @@ class GaborFilterGenerator
     PrecisionType m_U0;
     PrecisionType m_V0;
     PrecisionType m_Phi;
-    
+
     /** Output filter coefficient array */
     ArrayType m_Filter;
-    
+
     /** Wether we need to regenerate the filter */
     bool m_NeedToRegenerateFilter;
-    
+
   };
 } // end namespace otb
 
diff --git a/Code/BasicFilters/otbGaborFilterGenerator.txx b/Code/BasicFilters/otbGaborFilterGenerator.txx
index c4dc923850..fd68d51f36 100644
--- a/Code/BasicFilters/otbGaborFilterGenerator.txx
+++ b/Code/BasicFilters/otbGaborFilterGenerator.txx
@@ -8,7 +8,7 @@
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -64,7 +64,7 @@ GaborFilterGenerator<TPrecision>
 
   costheta = vcl_cos(m_Theta*M_PI/180.);
   sintheta = vcl_sin(m_Theta*M_PI/180.);
-  
+
 
   for(PrecisionType y = - static_cast<PrecisionType>(m_Radius[1]);
       y<=static_cast<PrecisionType>(m_Radius[1]);y+=1)
diff --git a/Code/BasicFilters/otbImageListToImageListApplyFilter.h b/Code/BasicFilters/otbImageListToImageListApplyFilter.h
index 6e5a9cc844..08bfb97d16 100644
--- a/Code/BasicFilters/otbImageListToImageListApplyFilter.h
+++ b/Code/BasicFilters/otbImageListToImageListApplyFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,11 +27,11 @@ namespace otb
  *  \brief This filter applies the filter given as template to the input image list.
  *
  *  It produces one output image in the output list for one input image in the output list.
- * 
+ *
  *  It uses the given filter methods to generate output information and input requested region.
  *
  *  The filter can be set up via the GetFilter() accessor.
- * 
+ *
  *  It also support streaming when the templated filter support it.
  *
  *  No type checking is done : it is up to the user to check the adequation between the input images,
@@ -41,23 +41,23 @@ namespace otb
  */
 template <class TInputImageList, class TOutputImageList, class TFilter>
 class ITK_EXPORT ImageListToImageListApplyFilter
-  : public ImageListToImageListFilter<typename TInputImageList::ImageType, 
+  : public ImageListToImageListFilter<typename TInputImageList::ImageType,
   typename TOutputImageList::ImageType>
 {
  public:
   /** Standard typedefs */
   typedef ImageListToImageListApplyFilter            Self;
-  typedef ImageListToImageListFilter<typename TInputImageList::ImageType, 
+  typedef ImageListToImageListFilter<typename TInputImageList::ImageType,
     typename TOutputImageList::ImageType> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageListToImageListApplyFilter, ImageListToImageListFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImageList InputImageListType;
   typedef typename InputImageListType::Pointer InputImageListPointerType;
diff --git a/Code/BasicFilters/otbImageListToImageListApplyFilter.txx b/Code/BasicFilters/otbImageListToImageListApplyFilter.txx
index 16097705e7..e2b1707368 100644
--- a/Code/BasicFilters/otbImageListToImageListApplyFilter.txx
+++ b/Code/BasicFilters/otbImageListToImageListApplyFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -63,7 +63,7 @@ ImageListToImageListApplyFilter<TInputImageList,TOutputImageList,TFilter>
       while(inputListIt!=inputPtr->End()&&outputListIt!=outputPtr->End())
 	{
 	  // Create the output image and set its information
-	  
+
 	  m_Filter->SetInput(inputListIt.Get());
 	  m_Filter->UpdateOutputInformation();
 	  outputListIt.Get()->CopyInformation(m_Filter->GetOutput(m_OutputIndex));
@@ -86,7 +86,7 @@ ImageListToImageListApplyFilter<TInputImageList,TOutputImageList,TFilter>
   // For each input image and corresponding output image
   typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
   typename OutputImageListType::Iterator outputListIt = outputPtr->Begin();
-  
+
   // Use the filter to generate input requested region
   while(inputListIt!=inputPtr->End()&&outputListIt!=outputPtr->End())
 	{
@@ -111,7 +111,7 @@ ImageListToImageListApplyFilter<TInputImageList,TOutputImageList,TFilter>
   typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
   typename OutputImageListType::Iterator outputListIt = outputPtr->Begin();
   unsigned int counter = 0;
-  
+
 
   while(inputListIt!=inputPtr->End()&&outputListIt!=outputPtr->End())
 	{
diff --git a/Code/BasicFilters/otbImageListToVectorImageFilter.h b/Code/BasicFilters/otbImageListToVectorImageFilter.h
index 529078d9f8..3d1ae244df 100644
--- a/Code/BasicFilters/otbImageListToVectorImageFilter.h
+++ b/Code/BasicFilters/otbImageListToVectorImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ namespace otb
  *  \brief Converts an ImageList to a VectorImage.
  *
  * The output VectorImage has n band, where n is the number of images in the image list.
- * 
+ *
  * This filter assumes that the images in the input ImageList have all the same size.
  *
  * Casting is done through standard cast operation.
@@ -35,22 +35,22 @@ namespace otb
  */
 template <class TImageList, class TVectorImage>
 class ITK_EXPORT ImageListToVectorImageFilter
-  : public ImageListToImageFilter<typename TImageList::ImageType, TVectorImage> 
+  : public ImageListToImageFilter<typename TImageList::ImageType, TVectorImage>
 {
  public:
   /** Standard typedefs */
   typedef ImageListToVectorImageFilter      Self;
-  typedef ImageListToImageFilter<typename TImageList::ImageType, 
+  typedef ImageListToImageFilter<typename TImageList::ImageType,
     TVectorImage>        Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageListToVectorImageFilter,ImageToImageListFilter);
-  
+
   /** Template parameters typedefs */
   typedef TVectorImage OutputVectorImageType;
   typedef typename OutputVectorImageType::Pointer OutputVectorImagePointerType;
@@ -58,13 +58,13 @@ class ITK_EXPORT ImageListToVectorImageFilter
   typedef typename InputImageListType::Pointer InputImageListPointerType;
   typedef typename InputImageListType::ImageType InputImageType;
   typedef typename InputImageType::Pointer InputImagePointerType;
- 
+
 protected:
 
   /** Main computation method */
   virtual void GenerateData(void);
 
-  /** GenerateOutputInformation 
+  /** GenerateOutputInformation
    * Set the number of bands of the output.
    * Copy informations from the first image of the list if existing.
    **/
diff --git a/Code/BasicFilters/otbImageListToVectorImageFilter.txx b/Code/BasicFilters/otbImageListToVectorImageFilter.txx
index 18f033fe20..e41ef38166 100644
--- a/Code/BasicFilters/otbImageListToVectorImageFilter.txx
+++ b/Code/BasicFilters/otbImageListToVectorImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -58,7 +58,7 @@ ImageListToVectorImageFilter<TImageList,TVectorImage>
   while(inputListIt!=inputPtr->End())
     {
       inputListIt.Get()->SetRequestedRegion(this->GetOutput()->GetRequestedRegion());
-      ++inputListIt; 
+      ++inputListIt;
     }
 }
 /**
@@ -69,7 +69,7 @@ void
 ImageListToVectorImageFilter<TImageList,TVectorImage>
 ::GenerateData(void)
 {
-  
+
   InputImageListPointerType inputPtr = this->GetInput();
   OutputVectorImagePointerType outputPtr = this->GetOutput();
 
@@ -86,7 +86,7 @@ ImageListToVectorImageFilter<TImageList,TVectorImage>
   // defines input and output iterators
   typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
   typedef itk::ImageRegionIterator<OutputVectorImageType> OutputIteratorType;
-  
+
   typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
 
   // defines a vector of input iterators
diff --git a/Code/BasicFilters/otbImageToPointSetFilter.h b/Code/BasicFilters/otbImageToPointSetFilter.h
index e4e4b3b8c0..1f66e37e85 100644
--- a/Code/BasicFilters/otbImageToPointSetFilter.h
+++ b/Code/BasicFilters/otbImageToPointSetFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -49,13 +49,13 @@ public:
   typedef   TInputImage                             InputImageType;
   typedef   typename InputImageType::Pointer        InputImagePointer;
   typedef   typename InputImageType::ConstPointer   InputImageConstPointer;
-  typedef   typename InputImageType::RegionType     InputImageRegionType; 
-  typedef   typename InputImageType::PixelType      InputImagePixelType; 
-  
+  typedef   typename InputImageType::RegionType     InputImageRegionType;
+  typedef   typename InputImageType::PixelType      InputImagePixelType;
+
   /** Some PointSet related typedefs. */
   typedef   typename Superclass::OutputPointSetType     OutputPointSetType;
   typedef   typename Superclass::OutputPointSetPointer  OutputPointSetPointer;
-  
+
   typedef   itk::ProcessObject			    ProcessObjectType;
 
   /** Set the input image of this process object.  */
@@ -66,12 +66,12 @@ public:
 
   /** Prepare the output */
   void GenerateOutputInformation(void);
-     
+
 protected:
   ImageToPointSetFilter();
   ~ImageToPointSetFilter();
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
- 
+
 private:
   ImageToPointSetFilter(const ImageToPointSetFilter&); //purposely not implemented
   void operator=(const ImageToPointSetFilter&); //purposely not implemented
diff --git a/Code/BasicFilters/otbImageToPointSetFilter.txx b/Code/BasicFilters/otbImageToPointSetFilter.txx
index 44cff425dd..44ede289b0 100644
--- a/Code/BasicFilters/otbImageToPointSetFilter.txx
+++ b/Code/BasicFilters/otbImageToPointSetFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
   this->ProcessObjectType::SetNumberOfRequiredInputs(1);
 
   OutputPointSetPointer output
-    = dynamic_cast<OutputPointSetType*>(this->MakeOutput(0).GetPointer()); 
+    = dynamic_cast<OutputPointSetType*>(this->MakeOutput(0).GetPointer());
 
   ProcessObjectType::SetNumberOfRequiredOutputs(1);
   ProcessObjectType::SetNthOutput(0, output.GetPointer());
@@ -54,13 +54,13 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
  *
  */
 template <class TInputImage, class TOutputPointSet>
-void 
+void
 ImageToPointSetFilter<TInputImage,TOutputPointSet>
 ::SetInput(unsigned int idx,const InputImageType *input)
 {
   // process object is not const-correct, the const_cast
   // is required here.
-  this->ProcessObjectType::SetNthInput(idx, 
+  this->ProcessObjectType::SetNthInput(idx,
                                    const_cast< InputImageType * >(input) );
 }
 
@@ -71,7 +71,7 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
 template <class TInputImage, class TOutputPointSet>
 const typename ImageToPointSetFilter<TInputImage,TOutputPointSet>::InputImageType *
 ImageToPointSetFilter<TInputImage,TOutputPointSet>
-::GetInput(unsigned int idx) 
+::GetInput(unsigned int idx)
 {
   return dynamic_cast<const InputImageType*>
     (this->ProcessObjectType::GetInput(idx));
@@ -81,7 +81,7 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
  *
  */
 template <class TInputImage, class TOutputPointSet>
-void 
+void
 ImageToPointSetFilter<TInputImage,TOutputPointSet>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -92,11 +92,11 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
 
 /**
  * copy information from first input to all outputs
- * This is a void implementation to prevent the 
+ * This is a void implementation to prevent the
  * ProcessObject version to be called
  */
 template <class TInputImage, class TOutputPointSet>
-void 
+void
 ImageToPointSetFilter<TInputImage,TOutputPointSet>
 ::GenerateOutputInformation()
 {
diff --git a/Code/BasicFilters/otbImportGeoInformationImageFilter.h b/Code/BasicFilters/otbImportGeoInformationImageFilter.h
index 459e8c652b..94a31e0fd5 100644
--- a/Code/BasicFilters/otbImportGeoInformationImageFilter.h
+++ b/Code/BasicFilters/otbImportGeoInformationImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,12 +23,12 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class ImportGeoInformationImageFilter
- *  \brief This filter is a helper class to import metadata 
+ *  \brief This filter is a helper class to import metadata
  *  from an existing image into a non-georeferenced image.
  *
- *  It derives from itk::InPlaceImageFilter since it overwrites 
- *  its output if possible. This class has been written as a workaround 
- *  for the bug http://public.kitware.com/Bug/bug.php?op=show&bugid=4625&pos=0. 
+ *  It derives from itk::InPlaceImageFilter since it overwrites
+ *  its output if possible. This class has been written as a workaround
+ *  for the bug http://public.kitware.com/Bug/bug.php?op=show&bugid=4625&pos=0.
  *  There should be no needs for this filter in a standard pipeline.
  *
  * \sa InPlaceImageFilter
@@ -44,13 +44,13 @@ class ITK_EXPORT ImportGeoInformationImageFilter
   typedef itk::CastImageFilter<TImage,TImage> Superclass;
   typedef itk::SmartPointer<Self>         Pointer;
   typedef itk::SmartPointer<const Self>   ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImportGeoInformationImageFilter, CastImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TImage ImageType;
   typedef typename ImageType::Pointer ImagePointerType;
@@ -68,7 +68,7 @@ class ITK_EXPORT ImportGeoInformationImageFilter
    * \return The source image.
    */
   const TSourceImage * GetSource(void);
- 
+
 protected:
   /** Constructor */
   ImportGeoInformationImageFilter();
diff --git a/Code/BasicFilters/otbImportGeoInformationImageFilter.txx b/Code/BasicFilters/otbImportGeoInformationImageFilter.txx
index c57aa35730..42f367d7b5 100644
--- a/Code/BasicFilters/otbImportGeoInformationImageFilter.txx
+++ b/Code/BasicFilters/otbImportGeoInformationImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/BasicFilters/otbImportImageFilter.h b/Code/BasicFilters/otbImportImageFilter.h
index 7a836e022e..c565e1faea 100644
--- a/Code/BasicFilters/otbImportImageFilter.h
+++ b/Code/BasicFilters/otbImportImageFilter.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
     Language:  C++
     Date:      $Date$
@@ -35,11 +35,11 @@ namespace otb
  * object.
  *
  * This class is templated over the output Image Type
- * 
+ *
  */
- 
+
 template <typename TOutputImageType>
-class ITK_EXPORT ImportImageFilter: 
+class ITK_EXPORT ImportImageFilter:
     public itk::ImageSource< TOutputImageType >
 {
 public:
@@ -49,7 +49,7 @@ public:
   typedef typename OutputImageType::SpacingType SpacingType;
   typedef typename OutputImageType::PointType   OriginType;
 
-  
+
   /** Standard class typedefs. */
   typedef ImportImageFilter   Self;
   typedef itk::ImageSource<OutputImageType>  Superclass;
@@ -61,20 +61,20 @@ public:
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImportImageFilter,itk::ImageSource);
-	
+
   /** Index typedef support. An index is used to access pixel values. */
   typedef itk::Index<OutputImageType::ImageDimension>  IndexType;
 
   /** Size typedef support. A size is used to define region bounds. */
   typedef itk::Size<OutputImageType::ImageDimension>  SizeType;
 
-  /** Region typedef support. A region is used to specify a 
+  /** Region typedef support. A region is used to specify a
    * subset of an image. */
   typedef itk::ImageRegion<OutputImageType::ImageDimension>  RegionType;
 
   /** Type of the output image pixel type. */
 	typedef typename OutputImageType::PixelType TPixel;
-  
+
   /** Get the pointer from which the image data is imported. */
   TPixel *GetImportPointer();
 
@@ -94,14 +94,14 @@ public:
    * \sa ImageRegion */
   void SetRegion(const RegionType &region)
   { if (m_Region != region) {m_Region = region; this->Modified();} };
-  
+
   /** Get the region object that defines the size and starting index
    * for the imported image. This will serve as the LargestPossibleRegion,
    * the BufferedRegion, and the RequestedRegion.
    * \sa ImageRegion */
   const RegionType& GetRegion() const
   { return m_Region;};
-  
+
   /** Set the spacing (size of a pixel) of the image.
    * \sa GetSpacing() */
   itkSetVectorMacro(Spacing, const double, OutputImageType::ImageDimension);
@@ -111,7 +111,7 @@ public:
    * \sa SetSpacing() */
   itkGetVectorMacro(Spacing, const double, OutputImageType::ImageDimension);
   void SetSpacing( const SpacingType & spacing );
-  
+
   /** Set the origin of the image.
    * \sa GetOrigin() */
   itkSetVectorMacro(Origin, const double, OutputImageType::ImageDimension);
@@ -154,7 +154,7 @@ protected:
    * \sa ProcessObject::EnlargeOutputRequestedRegion() */
   virtual void EnlargeOutputRequestedRegion(itk::DataObject *output);
 
-private:  
+private:
   ImportImageFilter(const ImportImageFilter &); //purposely not implemented
   void operator=(const ImportImageFilter&); //purposely not implemented
 
diff --git a/Code/BasicFilters/otbImportImageFilter.txx b/Code/BasicFilters/otbImportImageFilter.txx
index c0bc913629..1916b2ecb8 100644
--- a/Code/BasicFilters/otbImportImageFilter.txx
+++ b/Code/BasicFilters/otbImportImageFilter.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -35,7 +35,7 @@ ImportImageFilter<TOutputImage>
 ::ImportImageFilter()
 {
   unsigned int idx;
-  
+
   for (idx = 0; idx < TOutputImage::ImageDimension; ++idx)
     {
     m_Spacing[idx] = 1.0;
@@ -66,11 +66,11 @@ ImportImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
-  int i;  
+  int i;
 
   Superclass::PrintSelf(os,indent);
 
@@ -107,7 +107,7 @@ ImportImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::SetImportPointer(TPixel *ptr, unsigned long num, bool LetFilterManageMemory)
 {
@@ -141,9 +141,9 @@ ImportImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
-::EnlargeOutputRequestedRegion(itk::DataObject *output) 
+::EnlargeOutputRequestedRegion(itk::DataObject *output)
 {
   // call the superclass' implementation of this method
   Superclass::EnlargeOutputRequestedRegion(output);
@@ -157,11 +157,11 @@ ImportImageFilter<TOutputImage>
 }
 
 
-/** 
+/**
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::GenerateOutputInformation()
 {
@@ -184,14 +184,14 @@ ImportImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::GenerateData()
 {
   // Normally, GenerateData() allocates memory.  However, the application
   // provides the memory for this filter via the SetImportPointer() method.
   // Therefore, this filter does not call outputPtr->Allocate().
-  
+
   // get pointer to the output
   OutputImagePointer outputPtr = this->GetOutput();
 
@@ -209,11 +209,11 @@ ImportImageFilter<TOutputImage>
 }
 
 
-/** 
+/**
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::SetSpacing( const SpacingType & spacing )
 {
@@ -226,11 +226,11 @@ ImportImageFilter<TOutputImage>
 }
 
 
-/** 
+/**
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::SetOrigin( const OriginType & origin )
 {
@@ -244,7 +244,7 @@ ImportImageFilter<TOutputImage>
 
 //----------------------------------------------------------------------------
 template <class TOutputImage>
-void 
+void
 ImportImageFilter<TOutputImage>
 ::SetDirection(const DirectionType direction )
 {
diff --git a/Code/BasicFilters/otbImportVectorImageFilter.h b/Code/BasicFilters/otbImportVectorImageFilter.h
index e50368dc5d..55ceac3b38 100644
--- a/Code/BasicFilters/otbImportVectorImageFilter.h
+++ b/Code/BasicFilters/otbImportVectorImageFilter.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
     Language:  C++
     Date:      $Date$
@@ -35,11 +35,11 @@ namespace otb
  * object.
  *
  * This class is templated over the output Image Type
- * 
+ *
  */
- 
+
 template <typename TOutputImageType>
-class ITK_EXPORT ImportVectorImageFilter: 
+class ITK_EXPORT ImportVectorImageFilter:
     public itk::ImageSource< TOutputImageType >
 {
 public:
@@ -49,7 +49,7 @@ public:
   typedef typename OutputImageType::SpacingType SpacingType;
   typedef typename OutputImageType::PointType   OriginType;
 
-  
+
   /** Standard class typedefs. */
   typedef ImportVectorImageFilter   Self;
   typedef itk::ImageSource<OutputImageType>  Superclass;
@@ -61,22 +61,22 @@ public:
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImportVectorImageFilter,itk::ImageSource);
-	
+
   /** Index typedef support. An index is used to access pixel values. */
   typedef itk::Index<OutputImageType::ImageDimension>  IndexType;
 
   /** Size typedef support. A size is used to define region bounds. */
   typedef itk::Size<OutputImageType::ImageDimension>  SizeType;
 
-  /** Region typedef support. A region is used to specify a 
+  /** Region typedef support. A region is used to specify a
    * subset of an image. */
   typedef itk::ImageRegion<OutputImageType::ImageDimension>  RegionType;
 
   /** Type of the output image pixel type. */
 	typedef typename OutputImageType::PixelType TOutputPixel;
 	typedef typename TOutputPixel::ValueType TPixel;
-	
-  
+
+
   /** Get the pointer from which the image data is imported. */
   TPixel *GetImportPointer();
 
@@ -96,14 +96,14 @@ public:
    * \sa ImageRegion */
   void SetRegion(const RegionType &region)
   { if (m_Region != region) {m_Region = region; this->Modified();} };
-  
+
   /** Get the region object that defines the size and starting index
    * for the imported image. This will serve as the LargestPossibleRegion,
    * the BufferedRegion, and the RequestedRegion.
    * \sa ImageRegion */
   const RegionType& GetRegion() const
   { return m_Region;};
-  
+
   /** Set the spacing (size of a pixel) of the image.
    * \sa GetSpacing() */
   itkSetVectorMacro(Spacing, const double, OutputImageType::ImageDimension);
@@ -113,7 +113,7 @@ public:
    * \sa SetSpacing() */
   itkGetVectorMacro(Spacing, const double, OutputImageType::ImageDimension);
   void SetSpacing( const SpacingType & spacing );
-  
+
   /** Set the origin of the image.
    * \sa GetOrigin() */
   itkSetVectorMacro(Origin, const double, OutputImageType::ImageDimension);
@@ -135,7 +135,7 @@ public:
   /**  Get the direction of the image
    * \sa SetDirection */
   itkGetConstReferenceMacro(Direction, DirectionType);
-	
+
 protected:
   ImportVectorImageFilter();
   ~ImportVectorImageFilter();
@@ -159,7 +159,7 @@ protected:
    * \sa ProcessObject::EnlargeOutputRequestedRegion() */
   virtual void EnlargeOutputRequestedRegion(itk::DataObject *output);
 
-private:  
+private:
   ImportVectorImageFilter(const ImportVectorImageFilter &); //purposely not implemented
   void operator=(const ImportVectorImageFilter&); //purposely not implemented
 
diff --git a/Code/BasicFilters/otbImportVectorImageFilter.txx b/Code/BasicFilters/otbImportVectorImageFilter.txx
index ffc268e213..09dd225066 100644
--- a/Code/BasicFilters/otbImportVectorImageFilter.txx
+++ b/Code/BasicFilters/otbImportVectorImageFilter.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -35,7 +35,7 @@ ImportVectorImageFilter<TOutputImage>
 ::ImportVectorImageFilter()
 {
   unsigned int idx;
-  
+
   for (idx = 0; idx < TOutputImage::ImageDimension; ++idx)
     {
     m_Spacing[idx] = 1.0;
@@ -66,11 +66,11 @@ ImportVectorImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
-  int i;  
+  int i;
 
   Superclass::PrintSelf(os,indent);
 
@@ -108,7 +108,7 @@ ImportVectorImageFilter<TOutputImage>
  */
 
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::SetImportPointer(TPixel *ptr, unsigned long num, bool LetFilterManageMemory)
 {
@@ -142,9 +142,9 @@ ImportVectorImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
-::EnlargeOutputRequestedRegion(itk::DataObject *output) 
+::EnlargeOutputRequestedRegion(itk::DataObject *output)
 {
   // call the superclass' implementation of this method
   Superclass::EnlargeOutputRequestedRegion(output);
@@ -158,11 +158,11 @@ ImportVectorImageFilter<TOutputImage>
 }
 
 
-/** 
+/**
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::GenerateOutputInformation()
 {
@@ -178,14 +178,14 @@ ImportVectorImageFilter<TOutputImage>
   outputPtr->SetOrigin( m_Origin );
   outputPtr->SetDirection( m_Direction );
   outputPtr->SetLargestPossibleRegion( m_Region );
-	
+
 	typename RegionType::SizeType size = m_Region.GetSize();
 
 	int numberOfBands= m_Size/(size[0]*size[1]);
 
 	if (numberOfBands!=static_cast<int>(numberOfBands))
 		itkExceptionMacro(<<"Buffer size and image size are not compatible !");
-		
+
 	 outputPtr->SetNumberOfComponentsPerPixel(numberOfBands);
 }
 
@@ -194,14 +194,14 @@ ImportVectorImageFilter<TOutputImage>
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::GenerateData()
 {
   // Normally, GenerateData() allocates memory.  However, the application
   // provides the memory for this filter via the SetImportPointer() method.
   // Therefore, this filter does not call outputPtr->Allocate().
-  
+
   // get pointer to the output
   OutputImagePointer outputPtr = this->GetOutput();
 
@@ -216,15 +216,15 @@ ImportVectorImageFilter<TOutputImage>
   // opposed to the container) if the user wants it to.
   outputPtr->GetPixelContainer()->SetImportPointer( m_ImportPointer,
                                                     m_Size, false );
-																										
+
 }
 
 
-/** 
+/**
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::SetSpacing( const SpacingType & spacing )
 {
@@ -237,11 +237,11 @@ ImportVectorImageFilter<TOutputImage>
 }
 
 
-/** 
+/**
  *
  */
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::SetOrigin( const OriginType & origin )
 {
@@ -255,7 +255,7 @@ ImportVectorImageFilter<TOutputImage>
 
 //----------------------------------------------------------------------------
 template <class TOutputImage>
-void 
+void
 ImportVectorImageFilter<TOutputImage>
 ::SetDirection(const DirectionType direction )
 {
diff --git a/Code/BasicFilters/otbInverseLogPolarTransform.h b/Code/BasicFilters/otbInverseLogPolarTransform.h
index 066973e655..047ff4e535 100644
--- a/Code/BasicFilters/otbInverseLogPolarTransform.h
+++ b/Code/BasicFilters/otbInverseLogPolarTransform.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ namespace otb
    *
    * In this implemenatation, theta is expressed in degree, and the result of the asin function
    * is clamped to the [0,360] range. Please note that since the transform of the center has no meaning
-   * it is rejected to the point [400,0], which does not belong to this range.  This is done to provide 
+   * it is rejected to the point [400,0], which does not belong to this range.  This is done to provide
    * a coordinate not likely to belong to a log-polar image buffer.
    *
    * \sa LogPolarTransform
@@ -114,7 +114,7 @@ class ITK_EXPORT InverseLogPolarTransform
   private:
     InverseLogPolarTransform(const Self&); // purposely not implemented
     void operator=(const Self&); // purposely not implemented
-  
+
     InputPointType m_Center;
     ScaleType m_Scale;
   };
diff --git a/Code/BasicFilters/otbInverseLogPolarTransform.txx b/Code/BasicFilters/otbInverseLogPolarTransform.txx
index e9a947bbae..923d15e34e 100644
--- a/Code/BasicFilters/otbInverseLogPolarTransform.txx
+++ b/Code/BasicFilters/otbInverseLogPolarTransform.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -77,7 +77,7 @@ InverseLogPolarTransform<TScalarType>
   this->m_Parameters[1]=m_Center[1];
   this->m_Parameters[2]=m_Scale[0];
   this->m_Parameters[3]=m_Scale[1];
-  
+
   return this->m_Parameters;
 }
 
@@ -157,7 +157,7 @@ InverseLogPolarTransform<TScalarType>
  * Transform a vnl vector representing a vector.
  * \param vector The vector to transform.
  * \return The transformed vector.
- */  
+ */
 template <class TScalarType>
 typename InverseLogPolarTransform<TScalarType>
 ::OutputVnlVectorType
diff --git a/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.h b/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.h
index 0f000ee6ff..c1deedd767 100644
--- a/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.h
+++ b/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ namespace otb
       typedef otb::LabelizeImageFilterBase<TInputImage,TOutputImage, itk::ConfidenceConnectedImageFilter<TInputImage, TOutputImage> > Superclass;
       typedef itk::SmartPointer<Self> Pointer;
       typedef itk::SmartPointer<const Self>  ConstPointer;
-      
+
       /** typedef to simplify variables definition and declaration. */
       typedef TInputImage InputImageType;
       typedef TOutputImage OutputImageType;
@@ -48,60 +48,60 @@ namespace otb
       typedef typename TInputImage::PixelType InputPixelType;
       typedef typename TOutputImage::PixelType OutputPixelType;
       typedef typename TInputImage::IndexType IndexType;
-      
+
       /** "object factory" management method. */
       itkNewMacro(Self);
-      
+
       /** Return the class name. */
       itkTypeMacro(LabelizeConfidenceConnectedImageFilter, LabelizeImageFilterBase);
 
       /** Get multiplier */
       double& GetMultiplier() const
 	{ return this->m_RegionGrowingFilter->GetMultiplier(); }
-	  
+
       /** Set multiplier */
       void SetMultiplier(const double multiplier)
 	{ this->m_RegionGrowingFilter->SetMultiplier(multiplier); }
-      
+
       /** Get number of iterations */
       unsigned int& GetNumberOfIterations() const
 	{ return this->m_RegionGrowingFilter->GetNumberOfIterations(); }
-      
+
       /** Set number of iterations */
       void SetNumberOfIterations( const unsigned int iteration )
 	{ this->m_RegionGrowingFilter->SetNumberOfIterations(iteration); }
 
       /** Get replace value */
       itkGetMacro(ReplaceValue, OutputPixelType);
-      
+
       /** Set replace value */
       itkSetMacro(ReplaceValue, OutputPixelType);
 
       /** Set initial neigborhood radius */
       const unsigned int& GetInitialNeighborhoodRadius()
 	{ return this->m_RegionGrowingFilter->GetInitialNeighborhoodRadius(); }
-      
+
       /** Set initial neigborhood radius */
       void SetInitialNeighborhoodRadius(const unsigned int initial )
 	{ this->m_RegionGrowingFilter->SetInitialNeighborhoodRadius(initial); }
-      
+
     protected:
       LabelizeConfidenceConnectedImageFilter();
       virtual ~LabelizeConfidenceConnectedImageFilter() {};
       virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
       /** Region growing */
       virtual void RegionGrowing( const IndexType indexSeed );
-      
+
     private:
       LabelizeConfidenceConnectedImageFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
+
       /** Intial replace value*/
       OutputPixelType m_ReplaceValue;
-      
+
     }; // end class LabelizeconnectedThresholdImageFilter
-  
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.txx b/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.txx
index bbbcd8f809..89a0ad06a0 100644
--- a/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.txx
+++ b/Code/BasicFilters/otbLabelizeConfidenceConnectedImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
   {
     m_ReplaceValue = itk::NumericTraits<OutputPixelType>::One;
   }
-  
+
   /** Region growing
    *
    */
@@ -44,7 +44,7 @@ namespace otb
     this->m_RegionGrowingFilter->SetSeed(indexSeed);
     m_ReplaceValue++;
   }
-  
+
   /** PrintSelf Method
    *
    */
diff --git a/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.h b/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.h
index 4d742675b5..1449ad7d4e 100644
--- a/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.h
+++ b/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,61 +38,61 @@ namespace otb
       typedef otb::LabelizeImageFilterBase<TInputImage,TOutputImage, itk::ConnectedThresholdImageFilter<TInputImage, TOutputImage> > Superclass;
       typedef itk::SmartPointer<Self> Pointer;
       typedef itk::SmartPointer<const Self>  ConstPointer;
-      
+
       typedef TInputImage InputImageType;
       typedef TOutputImage OutputImageType;
 
       typedef typename TInputImage::PixelType InputPixelType;
       typedef typename TOutputImage::PixelType OutputPixelType;
       typedef typename TInputImage::IndexType IndexType;
-      
+
       /** "object factory" management method. */
       itkNewMacro(Self);
-      
+
       /** Return the class name. */
       itkTypeMacro(LabelizeConnectedThresholdImageFilter, LabelizeImageFilterBase);
 
       /** Get delta lower threshold */
       itkGetMacro(LowerThresholdDelta, InputPixelType);
-      
+
       /** Set delta lower threshold */
       itkSetMacro(LowerThresholdDelta, InputPixelType);
-      
+
       /** Get delta upper threshold */
       itkGetMacro(UpperThresholdDelta, InputPixelType);
-      
+
       /** Set delta upper threshold */
       itkSetMacro(UpperThresholdDelta, InputPixelType);
-      
+
       /** Get replace value */
       itkGetMacro(ReplaceValue, OutputPixelType);
-      
+
       /** Set replace value */
       itkSetMacro(ReplaceValue, OutputPixelType);
-      
+
     protected:
       LabelizeConnectedThresholdImageFilter();
       virtual ~LabelizeConnectedThresholdImageFilter() {};
       virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
       /** Region growing */
       virtual void RegionGrowing( const IndexType indexSeed );
-      
+
     private:
       LabelizeConnectedThresholdImageFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
+
       /** Delta + threshold for growing region */
       InputPixelType m_UpperThresholdDelta;
-      
+
       /** Delta - threshold for growing region */
       InputPixelType m_LowerThresholdDelta;
-      
+
       /** Intial replace value*/
       OutputPixelType m_ReplaceValue;
-      
+
     }; // end class LabelizeconnectedThresholdImageFilter
-  
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.txx b/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.txx
index d7fb45dcf1..00f6254441 100644
--- a/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.txx
+++ b/Code/BasicFilters/otbLabelizeConnectedThresholdImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,10 +31,10 @@ namespace otb
   {
     m_LowerThresholdDelta = itk::NumericTraits<InputPixelType>::NonpositiveMin();
     m_UpperThresholdDelta = itk::NumericTraits<InputPixelType>::max();
-    
+
     m_ReplaceValue = 5;//itk::NumericTraits<OutputPixelType>::One;
   }
-  
+
   /** Region growing
    *
    */
@@ -44,15 +44,15 @@ namespace otb
   ::RegionGrowing( const IndexType indexSeed )
   {
     InputPixelType threshold = this->GetInput()->GetPixel(indexSeed);
-    
+
     this->m_RegionGrowingFilter->SetLower(threshold-m_LowerThresholdDelta);
     this->m_RegionGrowingFilter->SetUpper(threshold+m_UpperThresholdDelta);
-    
+
     this->m_RegionGrowingFilter->SetReplaceValue(m_ReplaceValue);
     this->m_RegionGrowingFilter->SetSeed(indexSeed);
     m_ReplaceValue++;
   }
-  
+
   /** PrintSelf Method
    *
    */
diff --git a/Code/BasicFilters/otbLabelizeImageFilterBase.h b/Code/BasicFilters/otbLabelizeImageFilterBase.h
index 125e49ac14..597316cadf 100644
--- a/Code/BasicFilters/otbLabelizeImageFilterBase.h
+++ b/Code/BasicFilters/otbLabelizeImageFilterBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,95 +40,95 @@ namespace otb
       typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
       typedef itk::SmartPointer<Self> Pointer;
       typedef itk::SmartPointer<const Self>  ConstPointer;
-      
+
       /** typedef to simplify variables definition and declaration. */
       typedef TInputImage InputImageType;
       typedef TOutputImage OutputImageType;
 
       typedef typename TInputImage::PixelType InputPixelType;
       typedef typename TOutputImage::PixelType OutputPixelType;
-      
+
       typedef typename TInputImage::IndexType IndexType;
-      
+
       typedef itk::PointSet<InputPixelType, 2> PointSetType;
       typedef typename PointSetType::Pointer PointSetPointerType;
-      
+
       typedef TFilter RegionGrowingFilterType;
       typedef typename TFilter::Pointer RegionGrowingFilterPointerType;
 
       /** "object factory" management method. */
       itkNewMacro(Self);
-      
+
       /** Return the class name. */
       itkTypeMacro(LabelizeImageFilterBase, ImageToImageFilter);
 
       /** Get lower threshold */
       itkGetMacro(LowerThreshold, InputPixelType);
-      
+
       /** Set lower threshold */
       itkSetMacro(LowerThreshold, InputPixelType);
-      
+
       /** Get upper threshold */
       itkGetMacro(UpperThreshold, InputPixelType);
-      
+
       /** Set upper threshold */
       itkSetMacro(UpperThreshold, InputPixelType);
-      
+
       /** Get Object count*/
       // only set after completion
 //       itkGetConstReferenceMacro(ObjectCount, unsigned long);
       itkGetMacro(ObjectCount, unsigned long);
-      
+
       /** Internal */
       typedef otb::ThresholdImageToPointSetFilter<InputImageType, PointSetType> ThresholdFilterType;
       typedef typename ThresholdFilterType::Pointer ThresholdFilterPointerType;
-      
+
       typedef otb::MultiplyByScalarImageFilter<InputImageType, OutputImageType> MultiplyFilterType;
       typedef typename MultiplyFilterType::Pointer MultiplyFilterPointerType;
-      
+
       typedef itk::AddImageFilter<OutputImageType, OutputImageType, OutputImageType> AddImageFilterType;
       typedef typename AddImageFilterType::Pointer AddImageFilterPointerType;
-      
+
     protected:
       LabelizeImageFilterBase();
       virtual ~LabelizeImageFilterBase() {};
       virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
       /** Main computation method */
       virtual void GenerateData();
-      
+
       /** Region growing */
       virtual void RegionGrowing( const IndexType indexSeed) { }
-      
+
       /** Instance region growing filter*/
       RegionGrowingFilterPointerType m_RegionGrowingFilter;
-      
+
       /** Lower threshold */
       InputPixelType m_LowerThreshold;
-      
+
       /** Upper threshold */
       InputPixelType m_UpperThreshold;
-      
+
       /** Point set to store thresold results */
       PointSetPointerType m_PointSet;
-      
+
       /** Multiply filter*/
       MultiplyFilterPointerType m_MultiplyFilter;
-      
+
       /** Threshold point set filter */
       ThresholdFilterPointerType m_ThresholdPointSetFilter;
-      
+
       /** Object counting */
       unsigned long m_ObjectCount;
-      
+
     private:
       LabelizeImageFilterBase(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
 
-      
+
+
     }; // end class LabelizeImageFilterBase
-  
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbLabelizeImageFilterBase.txx b/Code/BasicFilters/otbLabelizeImageFilterBase.txx
index 95c807abc5..6161c0b474 100644
--- a/Code/BasicFilters/otbLabelizeImageFilterBase.txx
+++ b/Code/BasicFilters/otbLabelizeImageFilterBase.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,12 +32,12 @@ namespace otb
 
     m_MultiplyFilter = MultiplyFilterType::New();
     m_MultiplyFilter->SetCoef(0.0);
-    
+
     m_ThresholdPointSetFilter = ThresholdFilterType::New();
-    
+
     m_RegionGrowingFilter = RegionGrowingFilterType::New();
   }
-  
+
   /** Generate data
    *
    */
@@ -48,11 +48,11 @@ namespace otb
   {
     // set input for region growing filter
     m_RegionGrowingFilter->SetInput(this->GetInput());
-    
+
     // create an empty image to store results computing
     m_MultiplyFilter->SetInput(this->GetInput());
     m_MultiplyFilter->Update();
-    
+
     // Compute points set
     m_ThresholdPointSetFilter->SetInput(0, this->GetInput());
     m_ThresholdPointSetFilter->SetLowerThreshold( m_LowerThreshold );
@@ -60,27 +60,27 @@ namespace otb
     m_ThresholdPointSetFilter->Update();
     m_PointSet = m_ThresholdPointSetFilter->GetOutput();
     m_ObjectCount=0;
-    
+
     // Iterate Point set
     typedef typename PointSetType::PointsContainer ContainerType;
     ContainerType* pointsContainer = m_PointSet->GetPoints();
     typedef typename ContainerType::Iterator IteratorType;
     IteratorType itList = pointsContainer->Begin();
-    
+
     typename OutputImageType::Pointer outputImage = m_MultiplyFilter->GetOutput();
-    
+
     while( itList != pointsContainer->End() )
       {
 	typename PointSetType::PointType pCoordinate = (itList.Value());
 	typename InputImageType::IndexType index;
-	
+
  	index[0] = static_cast <int> (pCoordinate[0]);
  	index[1] = static_cast <int> (pCoordinate[1]);
  	if (outputImage->GetPixel(index) ==
 	    itk::NumericTraits<OutputPixelType>::ZeroValue() )
  	  {
 	    this->RegionGrowing(index);
-	    
+
 	    AddImageFilterPointerType addImage = AddImageFilterType::New();
 	    addImage->SetInput1(outputImage);
 	    addImage->SetInput2(m_RegionGrowingFilter->GetOutput());
@@ -90,10 +90,10 @@ namespace otb
 	  }
  	++itList;
       }
-    
+
     this->GraftOutput(outputImage);
   }
-  
+
   /** PrintSelf Method
    *
    */
@@ -103,7 +103,7 @@ namespace otb
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
     Superclass::PrintSelf(os, indent);
-    
+
     os << indent << "Seeds lower threshold: " << m_LowerThreshold << std::endl;
     os << indent << "Seeds upper threshold: " << m_UpperThreshold << std::endl;
     os << indent << "ObjectCount: "  << m_ObjectCount << std::endl;
diff --git a/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.h b/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.h
index e178af9254..798b0adc06 100644
--- a/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.h
+++ b/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
   /** \class LabelizeNeighborhoodConnectedImageFilter
    *  \brief Labels pixels that are connected to a seed and lie
    *         within a neighborhood
-   *  
+   *
    *  This class implements base class otb::LabelizeImageFilterBase
    *
    *  First seeds are obtained with a theshold filter
@@ -44,7 +44,7 @@ namespace otb
       typedef otb::LabelizeImageFilterBase<TInputImage,TOutputImage, itk::NeighborhoodConnectedImageFilter<TInputImage, TOutputImage> > Superclass;
       typedef itk::SmartPointer<Self> Pointer;
       typedef itk::SmartPointer<const Self>  ConstPointer;
-      
+
       /** typedef to simplify variables definition and declaration. */
       typedef TInputImage InputImageType;
       typedef TOutputImage OutputImageType;
@@ -52,72 +52,72 @@ namespace otb
       typedef typename TInputImage::PixelType InputPixelType;
       typedef typename TInputImage::SizeType InputSizeType;
       typedef typename TInputImage::IndexType IndexType;
-      
+
       typedef typename TOutputImage::PixelType OutputPixelType;
-      
+
       /** "object factory" management method. */
       itkNewMacro(Self);
-      
+
       /** Return the class name. */
       itkTypeMacro(LabelizeNeighborhoodConnectedImageFilter, LabelizeImageFilterBase);
 
       /** Get delta lower threshold */
       itkGetMacro(LowerThresholdDelta, InputPixelType);
-      
+
       /** Set delta lower threshold */
       itkSetMacro(LowerThresholdDelta, InputPixelType);
-      
+
       /** Get delta upper threshold */
       itkGetMacro(UpperThresholdDelta, InputPixelType);
-      
+
       /** Set delta upper threshold */
       itkSetMacro(UpperThresholdDelta, InputPixelType);
-      
+
       /** Get replace value */
       itkGetMacro(ReplaceValue, OutputPixelType);
-      
+
       /** Set replace value */
       itkSetMacro(ReplaceValue, OutputPixelType);
-      
+
       /** Get radius */
       const InputSizeType& GetRadius() const
-      { 
+      {
           return this->m_RegionGrowingFilter->GetRadius();
       }
-      
+
       /** Set radius */
       void SetRadius( const InputSizeType radius )
-      { 
+      {
         this->m_RegionGrowingFilter->SetRadius(radius);
         this->Modified();
       }
-      
 
-      
+
+
     protected:
       LabelizeNeighborhoodConnectedImageFilter();
       virtual ~LabelizeNeighborhoodConnectedImageFilter() {};
       virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
       /** Region growing */
       virtual void RegionGrowing( const IndexType indexSeed );
-      
+
     private:
       LabelizeNeighborhoodConnectedImageFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
+
       /** Delta + threshold for growing region */
       InputPixelType m_UpperThresholdDelta;
-      
+
       /** Delta - threshold for growing region */
       InputPixelType m_LowerThresholdDelta;
-      
+
       /** Intial replace value*/
       OutputPixelType m_ReplaceValue;
-      
+
 
     }; // end class LabelizeconnectedThresholdImageFilter
-  
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.txx b/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.txx
index e986b4023f..415ead8983 100644
--- a/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.txx
+++ b/Code/BasicFilters/otbLabelizeNeighborhoodConnectedImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,10 +29,10 @@ namespace otb
   {
     m_LowerThresholdDelta = itk::NumericTraits<InputPixelType>::NonpositiveMin();
     m_UpperThresholdDelta = itk::NumericTraits<InputPixelType>::max();
-    
+
     m_ReplaceValue = itk::NumericTraits<OutputPixelType>::One;
   }
-  
+
   /** Region growing
    *
    */
@@ -42,15 +42,15 @@ namespace otb
   ::RegionGrowing( const IndexType indexSeed )
   {
     InputPixelType threshold = this->GetInput()->GetPixel(indexSeed);
-    
+
     this->m_RegionGrowingFilter->SetLower(threshold-m_LowerThresholdDelta);
     this->m_RegionGrowingFilter->SetUpper(threshold+m_UpperThresholdDelta);
-    
+
     this->m_RegionGrowingFilter->SetReplaceValue(m_ReplaceValue);
     this->m_RegionGrowingFilter->SetSeed(indexSeed);
     m_ReplaceValue++;
   }
-  
+
   /** PrintSelf Method
    *
    */
diff --git a/Code/BasicFilters/otbLeeImageFilter.h b/Code/BasicFilters/otbLeeImageFilter.h
index df49fc37ee..d0f607d200 100644
--- a/Code/BasicFilters/otbLeeImageFilter.h
+++ b/Code/BasicFilters/otbLeeImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,11 +47,11 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
-  
+
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
 
@@ -66,7 +66,7 @@ public:
 
   /** typemacro */
   itkTypeMacro(LeeImageFilter, ImageToImageFilter);
- 
+
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
   typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
@@ -79,7 +79,7 @@ public:
 
   /** Get the radius of the neighborhood used in this filter  */
   itkGetConstReferenceMacro(Radius, SizeType);
-  
+
   /** Set the number of look used for computation */
   itkSetMacro(NbLooks, double);
   /** Getthe number of look used for computation */
@@ -101,7 +101,7 @@ protected:
   /** LeeImageFilter can be multithreaded.
    * As such, it provides a definition of ThreadedGenerateData()
    *
-   *	LEE filter: 
+   *	LEE filter:
    *\f$ 	R = E[I] + b(I-E[I])\f$ with \f$	b  = C^2r / ( C^2r + C^2v )\f$
    *					\f$ Cv = 1 / \sqrt(L) \f$ with L the number of look.
    *					\f$ Cr = \sqrt(Var(I)) / E[I] avec Var(I) = E[I^2] - E[I]^2 \f$
@@ -126,5 +126,5 @@ private:
 #include "otbLeeImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/BasicFilters/otbLeeImageFilter.txx b/Code/BasicFilters/otbLeeImageFilter.txx
index a6eed54df1..9e5588e4f9 100644
--- a/Code/BasicFilters/otbLeeImageFilter.txx
+++ b/Code/BasicFilters/otbLeeImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -48,11 +48,11 @@ namespace otb
   {
     // call the superclass' implementation of this method
     Superclass::GenerateInputRequestedRegion();
-  
+
     // get pointers to the input and output
     typename Superclass::InputImagePointer inputPtr   =  const_cast< TInputImage * >( this->GetInput() );
     typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
     if ( !inputPtr || !outputPtr )
       {
 	return;
@@ -79,7 +79,7 @@ namespace otb
 
 	// store what we tried to request (prior to trying to crop)
 	inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
 	// build an exception
 	itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
 	itk::OStringStream msg;
@@ -94,7 +94,7 @@ namespace otb
 
 
   template< class TInputImage, class TOutputImage>
-  void LeeImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(	
+  void LeeImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
 									const 	OutputImageRegionType& 		outputRegionForThread,
 									int 	threadId
 									)
@@ -104,11 +104,11 @@ namespace otb
 
     itk::ConstNeighborhoodIterator<InputImageType> bit;
     itk::ImageRegionIterator<OutputImageType> it;
-  
+
     // Allocate output
     typename OutputImageType::Pointer     output = this->GetOutput();
     typename InputImageType::ConstPointer input  = this->GetInput();
-  
+
     // Find the data-set boundary "faces"
     typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType 		faceList;
     typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType::iterator 	fit;
@@ -119,14 +119,14 @@ namespace otb
 
     // support progress methods/callbacks
     itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
     //  InputRealType pixel;
     InputRealType sum;
     InputRealType sum2;
 
     double Cr2, Cv2, E_I, I, Var_I, dPixel;
-  
-  
+
+
     //  dPixel = this->getNbVues();
     dPixel = m_NbLooks;
     //Calcul du rapport
@@ -136,7 +136,7 @@ namespace otb
     // Process each of the boundary faces.  These are N-d regions which border
     // the edge of the buffer.
     for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-      { 
+      {
 	bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius, input, *fit);
 	unsigned int neighborhoodSize = bit.Size();
 	it = itk::ImageRegionIterator<OutputImageType>(output, *fit);
@@ -169,7 +169,7 @@ namespace otb
 	      }
 	    // get the mean value
 	    it.Set( static_cast<OutputPixelType>( dPixel ) );
-      
+
 	    ++bit;
 	    ++it;
 	    progress.CompletedPixel();
@@ -181,7 +181,7 @@ namespace otb
    * Standard "PrintSelf" method
    */
   template <class TInputImage, class TOutput>
-  void 
+  void
   LeeImageFilter<TInputImage, TOutput>::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
     Superclass::PrintSelf( os, indent );
diff --git a/Code/BasicFilters/otbLogPolarTransform.h b/Code/BasicFilters/otbLogPolarTransform.h
index 1956daa8db..177ff8c34b 100644
--- a/Code/BasicFilters/otbLogPolarTransform.h
+++ b/Code/BasicFilters/otbLogPolarTransform.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,12 +25,12 @@ namespace otb
   /** \class LogPolarTransform
    * \brief Implement the log-polar coordinate transform.
    *
-   * The log-polar coordinate system is a polar system where the 
+   * The log-polar coordinate system is a polar system where the
    * radial coordinate has a logarithmic scale.
-   * 
-   * Given \f$(\rho,\theta)\f$ the coordinate in the log-polar system, the 
-   * corresponding cartesian coordinates are 
-   * 
+   *
+   * Given \f$(\rho,\theta)\f$ the coordinate in the log-polar system, the
+   * corresponding cartesian coordinates are
+   *
    * \f$ x-xc=exp(\rho)*cos(\theta) \f$
    * \f$ y-yc=exp(\rho)*sin(\theta) \f$
    *
@@ -115,7 +115,7 @@ class ITK_EXPORT LogPolarTransform
   private:
     LogPolarTransform(const Self&); // purposely not implemented
     void operator=(const Self&); // purposely not implemented
-  
+
     InputPointType m_Center;
     ScaleType m_Scale;
   };
diff --git a/Code/BasicFilters/otbLogPolarTransform.txx b/Code/BasicFilters/otbLogPolarTransform.txx
index 865ffcf522..bc04b2d15a 100644
--- a/Code/BasicFilters/otbLogPolarTransform.txx
+++ b/Code/BasicFilters/otbLogPolarTransform.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -76,7 +76,7 @@ LogPolarTransform<TScalarType>
   this->m_Parameters[1]=m_Center[1];
   this->m_Parameters[2]=m_Scale[0];
   this->m_Parameters[3]=m_Scale[1];
-  
+
   return this->m_Parameters;
 }
 /**
@@ -117,14 +117,14 @@ LogPolarTransform<TScalarType>
   result[1]=0.;
   result[0]+=vcl_exp(logRho) *vcl_cos(theta);
   result[1]+=vcl_exp(logRho) *vcl_sin(theta);
- 
+
   return result;
 }
 /**
  * Transform a vnl vector representing a point.
  * \param vector The point to transform.
  * \return The transformed point.
- */  
+ */
 template <class TScalarType>
 typename LogPolarTransform<TScalarType>
 ::OutputVnlVectorType
diff --git a/Code/BasicFilters/otbMeanShiftImageFilter.h b/Code/BasicFilters/otbMeanShiftImageFilter.h
index 871fa92738..a46f506484 100644
--- a/Code/BasicFilters/otbMeanShiftImageFilter.h
+++ b/Code/BasicFilters/otbMeanShiftImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -51,16 +51,16 @@ namespace otb
     }
 
   /** \class MeanShiftImageFilter
-   *   
-   * 
+   *
+   *
    * Mean shift is a data clustering algorithm ofthen used in image processing and segmentation.
-   * For a given pixel, the mean shift will build a set of neighboring pixels within a given spatial 
-   * radius (can be set using SetSpatialRadius()) and a color range (can be set using SetRangeRadius()). 
+   * For a given pixel, the mean shift will build a set of neighboring pixels within a given spatial
+   * radius (can be set using SetSpatialRadius()) and a color range (can be set using SetRangeRadius()).
    * The spatial and color center of this set is then computed and the algorithm iterates with this new spatial
-   * and color center. 
+   * and color center.
    *
-   * Mean shift can be used for edge-preserving smoothing, or for clustering. The GetOutput() method will allow you to get the smoothed image, whereas the 
-   * GetClusteredOuptut() methods returns the clustered output. The GetLabeledClusteredOutput() returns a labeled clustered images, and the GetClusterBoundariesOutput() 
+   * Mean shift can be used for edge-preserving smoothing, or for clustering. The GetOutput() method will allow you to get the smoothed image, whereas the
+   * GetClusteredOuptut() methods returns the clustered output. The GetLabeledClusteredOutput() returns a labeled clustered images, and the GetClusterBoundariesOutput()
    * an image of the cluster boundaries.
    *
    * The MinimumRegionSize parameter allows you to prune small clustered regions.
@@ -68,15 +68,15 @@ namespace otb
    * Please note that the filtering part is multi-threaded, while the clustering one is not (this is not really noticeable, because the clustering step is really faster
    * than the filtering one).
    *
-   * Please note that if both parts are streamable, only the filtering part will ensure you to get the same results than without streaming. In the clustering results, you 
+   * Please note that if both parts are streamable, only the filtering part will ensure you to get the same results than without streaming. In the clustering results, you
    * might find region split due to tiling. Morover, the labeled output will not give consistent results when streamed. The cluster boundaries might work though.
-   * 
+   *
    * This filter uses the Edison mean shift algorithm implementation. Please note that data whose precision is more than float are casted to float before processing.
-   * 
-   * The Scale parameter allows you to stretch the data dynamic 
+   *
+   * The Scale parameter allows you to stretch the data dynamic
    *
    * For more information on mean shift techniques, one might consider reading the following article:
-   * 
+   *
    * D. Comaniciu, P. Meer, "Mean Shift: A Robust Approach Toward Feature Space Analysis," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp. 603-619, May, 2002
    * D. Comaniciu, P. Meer, "Robust analysis of feature spaces: color image segmentation," cvpr, p. 750, 1997 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'97), 1997
    * D. Comaniciu, P. Meer, "Mean Shift Analysis and Applications," iccv, p. 1197, Seventh International Conference on Computer Vision (ICCV'99) - Volume 2, 1999
@@ -103,7 +103,7 @@ namespace otb
       /** Type macro */
       itkTypeMacro(MeanShiftImageFilter,ImageToImageFilter);
       itkNewMacro(Self);
-    
+
       /** Template parameters typedefs */
       typedef TInputImage                                  InputImageType;
       typedef typename InputImageType::Pointer             InputImagePointerType;
@@ -127,20 +127,20 @@ namespace otb
       itkSetMacro(Scale,double);
       itkGetMacro(Scale,double);
 
-      /** Return the const output image direction */  
+      /** Return the const output image direction */
       const OutputImageType * GetClusteredOutput() const;
-      /** Return the output image direction */  
+      /** Return the output image direction */
       OutputImageType * GetClusteredOutput();
 
       const LabeledOutputType * GetLabeledClusteredOutput() const;
       LabeledOutputType * GetLabeledClusteredOutput();
 
       const LabeledOutputType * GetClusterBoundariesOutput() const;
-      
+
       LabeledOutputType * GetClusterBoundariesOutput();
-	
+
       protected:
-      /** This filters use a neighborhood around the pixel, so it needs to redfine the 
+      /** This filters use a neighborhood around the pixel, so it needs to redfine the
        * input requested region */
       virtual void GenerateInputRequestedRegion();
       /** Threaded generate data (handle the filtering part) */
@@ -161,7 +161,7 @@ namespace otb
       private:
       MeanShiftImageFilter(const Self&); //purposely not implemented
       void operator=(const Self&);             //purposely not implemented
- 
+
       /** Spatial radius for mean shift convergence */
       unsigned int m_SpatialRadius;
       /** Range radius for mean shift convergence */
diff --git a/Code/BasicFilters/otbMeanShiftImageFilter.txx b/Code/BasicFilters/otbMeanShiftImageFilter.txx
index 2783932a83..8c3f0715e6 100644
--- a/Code/BasicFilters/otbMeanShiftImageFilter.txx
+++ b/Code/BasicFilters/otbMeanShiftImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ namespace otb
     m_RangeRadius        = 10;
     m_MinimumRegionSize  = 10;
     m_Scale              = 100000.;
-    
+
     this->SetNumberOfOutputs(4);
     this->SetNthOutput(1,OutputImageType::New());
     this->SetNthOutput(2,LabeledOutputType::New());
@@ -93,7 +93,7 @@ namespace otb
     return static_cast< LabeledOutputType * >(this->itk::ProcessObject::GetOutput(2));
   }
 
-  
+
   template <class TInputImage,class TOutputImage, class TLabeledOutput, class TBufferConverter>
   const typename  MeanShiftImageFilter<TInputImage,TOutputImage,TLabeledOutput,TBufferConverter>::LabeledOutputType *
   MeanShiftImageFilter<TInputImage,TOutputImage,TLabeledOutput,TBufferConverter>
@@ -127,7 +127,7 @@ namespace otb
      typename OutputImageType::Pointer outputPtr = this->GetOutput();
      typename OutputImageType::Pointer clusteredOutputPtr = this->GetClusteredOutput();
      typename LabeledOutputType::Pointer labeledClusteredOutputPtr = this->GetLabeledClusteredOutput();
-     typename LabeledOutputType::Pointer clusterBoundariesOutputPtr = this->GetClusterBoundariesOutput(); 
+     typename LabeledOutputType::Pointer clusterBoundariesOutputPtr = this->GetClusterBoundariesOutput();
 
      outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion());
      outputPtr->Allocate();
@@ -149,25 +149,25 @@ namespace otb
   {
     // call the superclass' implementation of this method
     Superclass::GenerateInputRequestedRegion();
-    
+
     // get pointers to the input and output
-    typename Superclass::InputImagePointer inputPtr = 
+    typename Superclass::InputImagePointer inputPtr =
       const_cast< TInputImage * >( this->GetInput() );
     typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-    
+
     if ( !inputPtr || !outputPtr )
       {
 	return;
       }
-    
+
     // get a copy of the input requested region (should equal the output
     // requested region)
     typename TInputImage::RegionType inputRequestedRegion;
     inputRequestedRegion = inputPtr->GetRequestedRegion();
-    
+
     // pad the input requested region by the operator radius
     inputRequestedRegion.PadByRadius( static_cast<unsigned int>(m_SpatialRadius) );
-    
+
     // crop the input requested region at the input's largest possible region
     if ( inputRequestedRegion.Crop(inputPtr->GetLargestPossibleRegion()) )
       {
@@ -181,7 +181,7 @@ namespace otb
 
 	// store what we tried to request (prior to trying to crop)
 	inputPtr->SetRequestedRegion( inputRequestedRegion );
-	
+
 	// build an exception
 	itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
 	e.SetLocation(ITK_LOCATION);
@@ -195,7 +195,7 @@ namespace otb
   void
   MeanShiftImageFilter<TInputImage,TOutputImage,TLabeledOutput,TBufferConverter>
   ::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId )
-  {    
+  {
     // Input and output pointers
     typename  InputImageType::ConstPointer inputPtr  = this->GetInput();
     typename OutputImageType::Pointer outputPtr = this->GetOutput();
@@ -204,18 +204,18 @@ namespace otb
 
     RegionType inputRequestedRegion = outputRegionForThread;
     RegionType outputRequestedRegion = outputRegionForThread;
-    
+
     inputRequestedRegion.PadByRadius(m_SpatialRadius);
     inputRequestedRegion.Crop(inputPtr->GetRequestedRegion());
-    
+
     // Iterators
     itk::ImageRegionConstIteratorWithIndex<InputImageType> inputIt(inputPtr,inputRequestedRegion);
     itk::ImageRegionIterator<OutputImageType> outputIt(outputPtr,outputRequestedRegion);
-    
+
 
     //create image processing object
     msImageProcessor edisonProcessor;
-    
+
     float * data = new float[inputRequestedRegion.GetNumberOfPixels()*inputPtr->GetNumberOfComponentsPerPixel()];
 
     unsigned int index = 0;
@@ -227,12 +227,12 @@ namespace otb
       }
 
     edisonProcessor.DefineLInput(data,inputRequestedRegion.GetSize()[1],inputRequestedRegion.GetSize()[0],inputPtr->GetNumberOfComponentsPerPixel());
-   
+
     //define default kernel paramerters...
     kernelType	k[2] = {Uniform, Uniform};
     int		P[2] = {2, inputPtr->GetNumberOfComponentsPerPixel()};
     float   tempH[2] = {1.0 , 1.0};
-    
+
     edisonProcessor.DefineKernel(k, tempH, P, 2);
 
     edisonProcessor.Filter(m_SpatialRadius,m_RangeRadius*m_Scale,MED_SPEEDUP);
@@ -263,21 +263,21 @@ namespace otb
       {
 	OutputPixelType pixel;
 
-	TBufferConverter::FloatArrayToPixel(data,index,pixel,outputPtr->GetNumberOfComponentsPerPixel(),invScale);	
+	TBufferConverter::FloatArrayToPixel(data,index,pixel,outputPtr->GetNumberOfComponentsPerPixel(),invScale);
 	tmpIt.Set(pixel);
 	index+=outputPtr->GetNumberOfComponentsPerPixel();
       }
 
     tmp2It.GoToBegin();
     outputIt.GoToBegin();
-    
+
     while(!tmp2It.IsAtEnd() && !outputIt.IsAtEnd())
       {
 	outputIt.Set(tmp2It.Get());
 	++tmp2It;
 	++outputIt;
       }
-    
+
     delete [] data;
   }
 
@@ -291,17 +291,17 @@ namespace otb
     typename OutputImageType::Pointer outputPtr = this->GetOutput();
     typename OutputImageType::Pointer clusteredOutputPtr = this->GetClusteredOutput();
     typename LabeledOutputType::Pointer labeledClusteredOutputPtr = this->GetLabeledClusteredOutput();
-    typename LabeledOutputType::Pointer clusterBoudariesOutputPtr = this->GetClusterBoundariesOutput(); 
+    typename LabeledOutputType::Pointer clusterBoudariesOutputPtr = this->GetClusterBoundariesOutput();
 
     RegionType outputRequestedRegion = outputPtr->GetRequestedRegion();
 
     itk::ImageRegionIterator<OutputImageType> outputIt(outputPtr,outputRequestedRegion);
     itk::ImageRegionIterator<OutputImageType> clusteredOutputIt(clusteredOutputPtr,outputRequestedRegion);
-    
-    
+
+
     //create image processing object
     msImageProcessor edisonProcessor;
-    
+
     float * data = new float[outputRequestedRegion.GetNumberOfPixels()*outputPtr->GetNumberOfComponentsPerPixel()];
 
     unsigned int index = 0;
@@ -318,7 +318,7 @@ namespace otb
     kernelType	k[2] = {Uniform, Uniform};
     int		P[2] = {2, outputPtr->GetNumberOfComponentsPerPixel()};
     float   tempH[2] = {1.0 , 1.0};
-    
+
     edisonProcessor.DefineKernel(k, tempH, P, 2);
 
     edisonProcessor.FuseRegions(m_RangeRadius*m_Scale,m_MinimumRegionSize);
@@ -343,7 +343,7 @@ namespace otb
 	clusteredOutputIt.Set(pixel);
 	index+=clusteredOutputPtr->GetNumberOfComponentsPerPixel();
       }
-    
+
     delete [] data;
 
     int   * labels = NULL;
@@ -351,16 +351,16 @@ namespace otb
     int   * modesPointsCount = NULL;
 
     edisonProcessor.GetRegions(&labels,&modes,&modesPointsCount);
-   
+
     if(edisonProcessor.ErrorStatus)
       {
 	itkExceptionMacro(<<"Error while running edison!");
       }
-    
+
     itk::ImageRegionIteratorWithIndex<LabeledOutputType> lcIt(labeledClusteredOutputPtr,labeledClusteredOutputPtr->GetRequestedRegion());
 
     index = 0;
-    
+
     labeledClusteredOutputPtr->FillBuffer(0);
 
     for(lcIt.GoToBegin();!lcIt.IsAtEnd();++lcIt)
@@ -368,19 +368,19 @@ namespace otb
 	lcIt.Set(static_cast<LabelType>(labels[index]));
 	++index;
       }
-    
+
     delete [] labels;
     delete [] modes;
     delete [] modesPointsCount;
 
     clusterBoudariesOutputPtr->FillBuffer(0);
-    
+
     //define the boundaries
     RegionList *regionList        = edisonProcessor.GetBoundaries();
     int        *regionIndeces;
     int        numRegions         = regionList->GetNumRegions();
     int        numBoundaryPixels  = 0;
- 
+
     typename LabeledOutputType::IndexType boundIndex;
 
     // TODO: Here it would be possible to extract the polygon edges for each region
@@ -398,7 +398,7 @@ namespace otb
 	  }
       }
   }
-  
+
   template <class TInputImage,class TOutputImage, class TLabeledOutput, class TBufferConverter>
   void
   MeanShiftImageFilter<TInputImage,TOutputImage,TLabeledOutput,TBufferConverter>
diff --git a/Code/BasicFilters/otbMeanShiftVectorImageFilter.h b/Code/BasicFilters/otbMeanShiftVectorImageFilter.h
index 75cfe8ca8c..8ea8b0421b 100644
--- a/Code/BasicFilters/otbMeanShiftVectorImageFilter.h
+++ b/Code/BasicFilters/otbMeanShiftVectorImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -54,9 +54,9 @@ namespace otb
 	    }
 	};
     }
-  
+
   /** \class MeanShiftVectorImageFilter
-   *    
+   *
    * This is the implementation of the mean shift clustering and edge-preserving smoothing filter adapted to
    * otb::VectorImage or itk::VectorImage. For the full documentation, please refer to the
    * base class otb::MeanShiftImageFilterBase.
@@ -88,7 +88,7 @@ namespace otb
       MeanShiftVectorImageFilter(){};
       /** destructor */
       ~MeanShiftVectorImageFilter(){};
-      
+
       /**PrintSelf method */
       virtual void PrintSelf(std::ostream& os, itk::Indent indent) const
       {
diff --git a/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.h b/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.h
index 2ce8209357..0162ea3623 100644
--- a/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.h
+++ b/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,15 +24,15 @@ namespace otb {
 /**
  * \class OpeningClosingMorphologicalFilter
  * \brief This filter implements an opening grayscale morphological operation
- * followed by a closing grayscale morphological operation. It tends to simplify 
+ * followed by a closing grayscale morphological operation. It tends to simplify
  * image by obliterating details with a lower extent than the structuring element.
  *
  * This filter implements an opening grayscale morphological operation
- * followed by a closing grayscale morphological operation. It tends to simplify 
+ * followed by a closing grayscale morphological operation. It tends to simplify
  * image by obliterating details with a lower extent than the structuring element.
- * 
+ *
  * This filter can be used in the morphological pyramid analyse filter. Due to the order
- * of composition of the two basic morphological operation, the filtered details are dark 
+ * of composition of the two basic morphological operation, the filtered details are dark
  * on a brighter background.
  *
  * \sa ClosingOpeningMorphologicalFilter,
@@ -48,7 +48,7 @@ public :
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage>   Superclass;
   typedef itk::SmartPointer<Self>                             Pointer;
   typedef itk::SmartPointer<const Self>                       ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkNewMacro(Self);
 
@@ -59,12 +59,12 @@ public :
   typedef TInputImage                                         InputImageType;
   typedef TOutputImage                                        OutputImageType;
   typedef TKernel                                             KernelType;
-  
+
   /** Useful typedefs */
   typedef typename InputImageType::Pointer                    InputImagePointer;
   typedef typename OutputImageType::RegionType                OutputImageRegionType;
   typedef typename TInputImage::PixelType                     PixelType;
-  
+
   /** Kernel accessors */
   itkSetMacro(Kernel, KernelType);
   itkGetConstReferenceMacro(Kernel, KernelType);
diff --git a/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.txx b/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.txx
index a4be11706d..72167b1e4e 100644
--- a/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.txx
+++ b/Code/BasicFilters/otbOpeningClosingMorphologicalFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -44,7 +44,7 @@ void
 OpeningClosingMorphologicalFilter<TInputImage, TOutputImage, TKernel>
 ::GenerateData()
 {
-  // Filters Typedefs (this class is actually a composite filter) 
+  // Filters Typedefs (this class is actually a composite filter)
   typedef itk::GrayscaleMorphologicalOpeningImageFilter<InputImageType,OutputImageType, KernelType> OpenFilterType;
   typedef itk::GrayscaleMorphologicalClosingImageFilter<InputImageType,OutputImageType,KernelType> CloseFilterType;
   // Filters initialisation
@@ -58,8 +58,8 @@ OpeningClosingMorphologicalFilter<TInputImage, TOutputImage, TKernel>
   progress->SetMiniPipelineFilter(this);
   progress->RegisterInternalFilter(opening, .5f);
   progress->RegisterInternalFilter(closing, .5f);
-  // Internal Pipeline connexion 
-  closing->SetInput(this->GetInput()); 
+  // Internal Pipeline connexion
+  closing->SetInput(this->GetInput());
   opening->SetInput(closing->GetOutput());
   // Output connexion
   opening->GraftOutput(this->GetOutput());
diff --git a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h
index 79022317f8..46d1b23690 100644
--- a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h
+++ b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,23 +28,23 @@ namespace otb
 {
   /** \class OverlapSaveConvolutionImageFilter
    *
-   * This filter implements the convolution operation between a kernel and an 
+   * This filter implements the convolution operation between a kernel and an
    * image using the overlap save algorithm (http://wikipedia.org/wiki/Overlap-save_method).
-   * 
-   * This method takes advantages of the FFTW implementation of Fast Fourrier Transform to 
-   * exchange an intensive convolution product in the space domain for a simple term by term 
+   *
+   * This method takes advantages of the FFTW implementation of Fast Fourrier Transform to
+   * exchange an intensive convolution product in the space domain for a simple term by term
    * product in the Fourrier domain. This result in tremendous speed gain when using large kernel
    * with exactly the same result as the classical convolution filter.
    *
    * \note This filter could be threaded but requires additional design due to limited thread-safety
-   * of the FFTW library. 
+   * of the FFTW library.
    *
    * \note For the moment only constant zero boundary conditions are used in this filter. This could produce
    *  very different results from the classical convolution filter with zero flux neumann boundary condition,
    * especially with large kernels.
    *
    * \note ITK must be set to use FFTW (double implementation) for this filter to work properly. If not, exception
-   *  will be raised at filter creation. Install fftw and set the variable 
+   *  will be raised at filter creation. Install fftw and set the variable
    *  USE_FFTWD  to ON in ccmake.
    *
    * \sa ConvolutionImageFilter
@@ -53,8 +53,8 @@ namespace otb
    * \ingroup Streamed
    * \ingroup IntensityImageFilters
    */
-template <class TInputImage,class TOutputImage> 
-class ITK_EXPORT OverlapSaveConvolutionImageFilter 
+template <class TInputImage,class TOutputImage>
+class ITK_EXPORT OverlapSaveConvolutionImageFilter
   : public itk::ImageToImageFilter< TInputImage, TOutputImage >
     {
     public:
@@ -77,7 +77,7 @@ class ITK_EXPORT OverlapSaveConvolutionImageFilter
 
       /** Run-time type information (and related methods). */
       itkTypeMacro(OverlapSaveConvolutionImageFilter, ImageToImageFilter);
-  
+
       /** Image typedef support. */
       typedef typename InputImageType::PixelType InputPixelType;
       typedef typename OutputImageType::PixelType OutputPixelType;
@@ -86,13 +86,13 @@ class ITK_EXPORT OverlapSaveConvolutionImageFilter
       typedef typename OutputImageType::RegionType OutputImageRegionType;
       typedef typename InputImageType::SizeType InputSizeType;
       typedef typename itk::Array<InputRealType> ArrayType;
-  
+
       /** Set the radius of the neighborhood used to compute the mean. */
-      virtual void SetRadius (const InputSizeType rad) 
-	{ 
-	  itkDebugMacro("setting radius to " << rad); 
-	  if (this->m_Radius != rad) 
-	    { 
+      virtual void SetRadius (const InputSizeType rad)
+	{
+	  itkDebugMacro("setting radius to " << rad);
+	  if (this->m_Radius != rad)
+	    {
 	      this->m_Radius = rad;
 	      unsigned int arraySize=1;
 	      for (unsigned int i=0; i<m_Radius.GetSizeDimension(); i++)
@@ -101,13 +101,13 @@ class ITK_EXPORT OverlapSaveConvolutionImageFilter
 		}
 	      this->m_Filter.SetSize(arraySize);
 	      this->m_Filter.Fill(1);
-	      this->Modified(); 
-	    } 
+	      this->Modified();
+	    }
 	}
 
       /** Get the radius of the neighborhood used to compute the mean */
       itkGetConstReferenceMacro(Radius, InputSizeType);
-  
+
       /** Set the input filter */
       void SetFilter(ArrayType filter)
 	{
@@ -120,25 +120,25 @@ class ITK_EXPORT OverlapSaveConvolutionImageFilter
 	      m_Filter = filter;
 	    }
 	  this->Modified();
-    	}	
+    	}
       /** Get the filter */
       itkGetConstReferenceMacro(Filter,ArrayType);
- 
+
       /** Set/Get methods for the normalization of the filter */
       itkSetMacro(NormalizeFilter, bool);
       itkGetMacro(NormalizeFilter, bool);
       itkBooleanMacro(NormalizeFilter);
-  
-      /** Since this filter implements a neighborhood operation, it requests a largest input 
-       * region than the output region. 
-       */ 
+
+      /** Since this filter implements a neighborhood operation, it requests a largest input
+       * region than the output region.
+       */
       virtual void GenerateInputRequestedRegion() throw(itk::InvalidRequestedRegionError);
 
       #ifdef ITK_USE_CONCEPT_CHECKING
       /** Begin concept checking */
       itkConceptMacro(InputHasNumericTraitsCheck,(itk::Concept::HasNumericTraits<InputPixelType>));
       /** End concept checking */
-      #endif 
+      #endif
 
     protected:
       /** Constructor */
@@ -146,8 +146,8 @@ class ITK_EXPORT OverlapSaveConvolutionImageFilter
       /** destructor */
       virtual ~OverlapSaveConvolutionImageFilter() {}
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
-	
-      /** TODO For the moment this class provide only a GenerateData(), 
+
+      /** TODO For the moment this class provide only a GenerateData(),
        * due to limited thread-safety of FFTW plan creation.
        */
       void GenerateData();
@@ -164,8 +164,8 @@ class ITK_EXPORT OverlapSaveConvolutionImageFilter
       ArrayType m_Filter;
 
       /** Flag for filter normalization */
-      bool m_NormalizeFilter; 
-    };  
+      bool m_NormalizeFilter;
+    };
 } // end namespace otb
 
 #ifndef ITK_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx
index 30aee562b3..0fd0f71377 100644
--- a/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx
+++ b/Code/BasicFilters/otbOverlapSaveConvolutionImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,8 +34,8 @@
 namespace otb
 {
 
-template <class TInputImage, class TOutputImage> 
-OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage> 
+template <class TInputImage, class TOutputImage>
+OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
 ::OverlapSaveConvolutionImageFilter()
   {
     m_Radius.Fill(1);
@@ -45,18 +45,18 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
   }
 
 template <class TInputImage, class TOutputImage>
-void 
-OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage> 
+void
+OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
 ::GenerateInputRequestedRegion() throw (itk::InvalidRequestedRegionError)
   {
 #if defined USE_FFTWD
     // call the superclass' implementation of this method
     Superclass::GenerateInputRequestedRegion();
-  
+
     // get pointers to the input and output
     typename Superclass::InputImagePointer inputPtr = const_cast< TInputImage * >( this->GetInput() );
     typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
     if ( !inputPtr || !outputPtr )
       {
 	return;
@@ -66,10 +66,10 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
     // requested region)
     typename TInputImage::RegionType inputRequestedRegion;
     inputRequestedRegion = inputPtr->GetRequestedRegion();
-    
+
     // Pad by filter radius
     inputRequestedRegion.PadByRadius(m_Radius);
- 
+
     // crop the input requested region at the input's largest possible region
     if(inputRequestedRegion.Crop(inputPtr->GetLargestPossibleRegion()))
       {
@@ -95,14 +95,14 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
       }
   }
 
-  template< class TInputImage, class TOutputImage> 
-  void 
+  template< class TInputImage, class TOutputImage>
+  void
   OverlapSaveConvolutionImageFilter< TInputImage, TOutputImage>
-  /** TODO commented out since multi-threading is not supported for the moment 
+  /** TODO commented out since multi-threading is not supported for the moment
    * ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,int threadId) */
   ::GenerateData()
-  {  
-    // Input/Output pointers 
+  {
+    // Input/Output pointers
     typename OutputImageType::Pointer output = this->GetOutput();
     typename InputImageType::ConstPointer input = this->GetInput();
 
@@ -110,15 +110,15 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
 	once multi-threading problem is solved */
     this->AllocateOutputs();
     OutputImageRegionType outputRegionForThread = output->GetRequestedRegion();
-	
+
     // Size of the filter
     typename InputImageType::SizeType sizeOfFilter;
     sizeOfFilter[0]=2*m_Radius[0]+1;
     sizeOfFilter[1]=2*m_Radius[1]+1;
-  
+
     // Filter normalization
     InputRealType norm;
-   
+
     // Compute the input region for the given thread
     OutputImageRegionType inputRegionForThread = outputRegionForThread;
     inputRegionForThread.PadByRadius(m_Radius);
@@ -128,11 +128,11 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
     typename InputImageType::RegionType pieceRegion = inputRegionForThread;
     typename InputImageType::SizeType pieceSize = pieceRegion.GetSize();
     typename InputImageType::IndexType pieceIndex = pieceRegion.GetIndex();
-    
+
     // Compute the size of the FFT and the size of the piece
     unsigned int pieceNbOfPixel = pieceRegion.GetNumberOfPixels();
     unsigned int sizeFFT=(pieceSize[0]/2+1)*pieceSize[1];
-    
+
     // Achieve the computation of the inputRegionForThread
     inputRegionForThread.Crop(input->GetLargestPossibleRegion());
     typename InputImageType::IndexType inputIndex = inputRegionForThread.GetIndex();
@@ -143,17 +143,17 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
     itk::ConstNeighborhoodIterator<InputImageType> bit(m_Radius,input,inputRegionForThread);
     bit.OverrideBoundaryCondition(&nbc);
     bit.GoToBegin();
-		
+
     //Iterator of output image
     itk::ImageRegionIteratorWithIndex<OutputImageType> it;
     it = itk::ImageRegionIteratorWithIndex<OutputImageType>(output,outputRegionForThread);
 
     //variables for loops
     unsigned int i,j,k,l;
-    
+
     // ITK proxy to the fftw library
     typedef typename itk::fftw::Proxy<double> FFTWProxyType;
-	
+
     //memory allocation
     InputPixelType* resampledFilterPiece;
     resampledFilterPiece=static_cast<FFTWProxyType::PixelType*>(fftw_malloc(pieceNbOfPixel*sizeof(InputPixelType)));
@@ -166,7 +166,7 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
 
     FFTWProxyType::ComplexType* inputPieceFFT;
     inputPieceFFT=static_cast<FFTWProxyType::ComplexType*>(fftw_malloc(sizeFFT*sizeof(FFTWProxyType::ComplexType)));
-   
+
     // Image piece FFT
     FFTWProxyType::PlanType inputPlan=FFTWProxyType::Plan_dft_r2c_2d(pieceSize[1],pieceSize[0],inputPiece,inputPieceFFT,FFTW_MEASURE);
 
@@ -194,25 +194,25 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
     for(j=0;j<sizeOfFilter[1];j++)
       {
 	for(i=0;i<sizeOfFilter[0];i++)
-	  {	
+	  {
 	    resampledFilterPiece[i+j*pieceSize[0]]=m_Filter.GetElement(k);//Copy values
 	    k++;
 	  }
       }
 
     FFTWProxyType::Execute(filterPlan);
-		
+
     // memory allocation for inverse FFT
     FFTWProxyType::ComplexType* multipliedFFTarray;
     multipliedFFTarray=static_cast<FFTWProxyType::ComplexType*>(fftw_malloc(sizeFFT*sizeof(FFTWProxyType::ComplexType)));
 
     FFTWProxyType::PixelType* inverseFFTpiece;
     inverseFFTpiece=static_cast<FFTWProxyType::PixelType*>(fftw_malloc(pieceNbOfPixel*sizeof(FFTWProxyType::PixelType)));
-    
+
 
     // Inverse FFT of the product of FFT (actually do filtering here)
     FFTWProxyType::PlanType outputPlan=FFTWProxyType::Plan_dft_c2r_2d(pieceSize[1],pieceSize[0],multipliedFFTarray,inverseFFTpiece,FFTW_MEASURE);
-    
+
     // Filling the buffer with complex product values
     for(k=0;k<sizeFFT;k++)
       {
@@ -252,20 +252,20 @@ OverlapSaveConvolutionImageFilter<TInputImage, TOutputImage>
       {
 	typename InputImageType::IndexType index = it.GetIndex();
 	unsigned int linearIndex = (index[1]+sizeOfFilter[1]-1-outputRegionForThread.GetIndex()[1])*pieceSize[0]-1+index[0]+sizeOfFilter[0]-outputRegionForThread.GetIndex()[0];
-	it.Set( static_cast<OutputPixelType>((inverseFFTpiece[linearIndex]/pieceNbOfPixel)*static_cast<double>(norm) ));   
+	it.Set( static_cast<OutputPixelType>((inverseFFTpiece[linearIndex]/pieceNbOfPixel)*static_cast<double>(norm) ));
 	++it;
       }
-		
+
     // destroy the FFT plans
     FFTWProxyType::DestroyPlan(inputPlan);
     FFTWProxyType::DestroyPlan(filterPlan);
     FFTWProxyType::DestroyPlan(outputPlan);
 
     //frees memory
-    fftw_free(resampledFilterPiece); 
+    fftw_free(resampledFilterPiece);
     fftw_free(inputPiece);
     fftw_free(filterPieceFFT);
-    fftw_free(inputPieceFFT);		
+    fftw_free(inputPieceFFT);
     fftw_free(multipliedFFTarray);
     fftw_free(inverseFFTpiece);
 #else
diff --git a/Code/BasicFilters/otbPathMeanDistanceFunctor.h b/Code/BasicFilters/otbPathMeanDistanceFunctor.h
index 4d70a784df..7be4d21f8e 100644
--- a/Code/BasicFilters/otbPathMeanDistanceFunctor.h
+++ b/Code/BasicFilters/otbPathMeanDistanceFunctor.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ namespace otb
   class PathMeanDistanceFunctor
   {
     public:
-      
+
 
       void SetThreshold(double threshold )
       {
@@ -47,16 +47,16 @@ namespace otb
       {
         return (  m_Threshold );
       }
-      
-      PathMeanDistanceFunctor() 
+
+      PathMeanDistanceFunctor()
       {
         m_Threshold = 0.2;
       };
       ~PathMeanDistanceFunctor() {};
-      
+
       inline bool operator()(const TInput1 & input)
       {
-        
+
         double meanDistance = 0.0;
         typedef typename TInput1::ObjectType::VertexListType::ConstIterator VertexListConstIteratorType;
         typedef typename TInput1::ObjectType::VertexType VertexType;
@@ -82,10 +82,10 @@ namespace otb
         {
           itkGenericExceptionMacro(<<"Object with only one vertex!" );
         }
-        
+
         std::cout << "Num vertex: " << nbVertices << std::endl;
         std::cout << "Mean dist: " << meanDistance << std::endl;
-      
+
         if ( meanDistance > m_Threshold)
         {
           return true;
@@ -95,9 +95,9 @@ namespace otb
           return false;
         }
       }
-      
-      
-      
+
+
+
     private:
       double m_Threshold;
   };
diff --git a/Code/BasicFilters/otbPerBandVectorImageFilter.h b/Code/BasicFilters/otbPerBandVectorImageFilter.h
index 5dd0c50b55..e27c5ba861 100644
--- a/Code/BasicFilters/otbPerBandVectorImageFilter.h
+++ b/Code/BasicFilters/otbPerBandVectorImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
 {
 /** \class PerBandVectorImageFilter
  *  \brief This filter is a helper class to apply per band a standard ImageToImageFilter to a VectorImage.
- * 
+ *
  *  This filter is a composite filter composed of the following filters :
  *  - VectorImageToImageListFilter
  *  - ImageListToImageListApplyFilter
@@ -38,7 +38,7 @@ namespace otb
  * \sa VectorImageToImageListFilter
  * \sa ImageListToImageListApplyFilter
  * \sa ImageListToVectorImageFilter
- * \ingroup Streamed 
+ * \ingroup Streamed
  */
 template <class TInputImage, class TOutputImage, class TFilter>
 class ITK_EXPORT PerBandVectorImageFilter
@@ -50,13 +50,13 @@ class ITK_EXPORT PerBandVectorImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PerBandVectorImageFilter, ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputVectorImageType;
   typedef typename InputVectorImageType::Pointer InputVectorImagePointerType;
@@ -88,7 +88,7 @@ class ITK_EXPORT PerBandVectorImageFilter
 
   itkSetMacro(OutputIndex,unsigned int);
   itkGetMacro(OutputIndex,unsigned int);
-  
+
 
   virtual void GenerateInputRequestedRegion(void);
   virtual void GenerateOutputInformation(void);
@@ -106,10 +106,10 @@ protected:
 private:
   PerBandVectorImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
- 
+
   /// The processing filter
   FilterPointerType m_Filter;
-  
+
   /// The index of the output of the filter to gather
   unsigned m_OutputIndex;
 };
diff --git a/Code/BasicFilters/otbPerBandVectorImageFilter.txx b/Code/BasicFilters/otbPerBandVectorImageFilter.txx
index ebb852e8b4..bce104aa16 100644
--- a/Code/BasicFilters/otbPerBandVectorImageFilter.txx
+++ b/Code/BasicFilters/otbPerBandVectorImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/BasicFilters/otbPolygonCompacityFunctor.h b/Code/BasicFilters/otbPolygonCompacityFunctor.h
index 3214693c62..8b3319b54f 100644
--- a/Code/BasicFilters/otbPolygonCompacityFunctor.h
+++ b/Code/BasicFilters/otbPolygonCompacityFunctor.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,8 +32,8 @@ namespace otb
    * The compacity is defined as:
    *
    *  \f$ 4\pi \frac{S}{L}\f$
-    * 
-   * where \f$ S \f$ is the surface (obtained by the method GetSurface() ) 
+    *
+   * where \f$ S \f$ is the surface (obtained by the method GetSurface() )
     * and \f$ L \f$ the perimeter (obtained by the method GetLength() ).
      *
      *  \ingroup Functor
@@ -42,7 +42,7 @@ namespace otb
   class PolygonCompacityFunctor
   {
     public:
-      
+
 
       void SetThreshold(double threshold )
       {
@@ -52,18 +52,18 @@ namespace otb
       {
         return (  m_Threshold );
       }
-      
-      PolygonCompacityFunctor() 
+
+      PolygonCompacityFunctor()
       {
         m_Threshold = 0.2;
       };
       ~PolygonCompacityFunctor() {};
-      
+
       inline bool operator()(const TInput1 & input)
       {
         double circularityRatio = 4*M_PI*input->GetSurface()
             / M_SQUARE(input->GetLength());
-      
+
         if (circularityRatio > m_Threshold)
         {
           return true;
@@ -73,9 +73,9 @@ namespace otb
           return false;
         }
       }
-      
-      
-      
+
+
+
     private:
       double m_Threshold;
   };
diff --git a/Code/BasicFilters/otbPrintableImageFilter.h b/Code/BasicFilters/otbPrintableImageFilter.h
index dbc9f0e927..93fefe32bc 100644
--- a/Code/BasicFilters/otbPrintableImageFilter.h
+++ b/Code/BasicFilters/otbPrintableImageFilter.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
     Language:  C++
     Date:      $Date$
@@ -18,14 +18,14 @@
         PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
-        
+
 #ifndef __otbPrintableImageFilter_h
 #define __otbPrintableImageFilter_h
 
 #include "itkImageToImageFilter.h"
 #include "otbVectorRescaleIntensityImageFilter.h"
 #include "otbMultiChannelExtractROI.h"
-    
+
 namespace otb {
   /**
        * \class PrintableImageFilter
@@ -44,7 +44,7 @@ class ITK_EXPORT PrintableImageFilter :
 	  <TInputImage, otb::VectorImage<unsigned char,2> >     Superclass;
         typedef itk::SmartPointer<Self>                         Pointer;
         typedef itk::SmartPointer<const Self>                   ConstPointer;
-        
+
 	typedef TInputImage                                     InputImageType;
 	typedef typename InputImageType::PixelType              InputPixelType;
 	typedef unsigned char                                   OutputPixelType;
@@ -55,18 +55,18 @@ class ITK_EXPORT PrintableImageFilter :
         typedef otb::MultiChannelExtractROI
             <OutputPixelType,OutputPixelType>                   ChannelExtractorType;
         typedef typename ChannelExtractorType::ChannelsType     ChannelsType;
-          
-          
+
+
         /** Method for creation through object factory */
         itkNewMacro(Self);
 
         /** Run-time type information */
-        itkTypeMacro(PrintableImageFilter, 
+        itkTypeMacro(PrintableImageFilter,
                      itk::ImageToImageFilter);
 
         /** Display */
         void PrintSelf( std::ostream& os, itk::Indent indent ) const;
-          
+
         void SetChannel( unsigned int channel);
         const ChannelsType GetChannels(void) const;
 
@@ -76,7 +76,7 @@ class ITK_EXPORT PrintableImageFilter :
 	otbGetObjectMemberMacro(Rescaler,InputMinimum,InputPixelType);
 	otbSetObjectMemberMacro(Rescaler,InputMaximum,InputPixelType);
 	otbGetObjectMemberMacro(Rescaler,InputMaximum,InputPixelType);
-          
+
       protected:
 
         PrintableImageFilter();
@@ -91,7 +91,7 @@ class ITK_EXPORT PrintableImageFilter :
         typename VectorRescalerType::Pointer m_Rescaler;
         typename ChannelExtractorType::Pointer m_Extractor;
     };
-      
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbPrintableImageFilter.txx b/Code/BasicFilters/otbPrintableImageFilter.txx
index 1806108bc3..e65efcd6c0 100644
--- a/Code/BasicFilters/otbPrintableImageFilter.txx
+++ b/Code/BasicFilters/otbPrintableImageFilter.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -26,19 +26,19 @@
 
 namespace otb
 {
-  
+
   template <class TInputImage>
       PrintableImageFilter<TInputImage>
   ::PrintableImageFilter()
   {
-    
+
     m_Rescaler = VectorRescalerType::New();
     m_Extractor = ChannelExtractorType::New();
-    
+
     m_Extractor->SetInput( m_Rescaler->GetOutput() );
-    
+
   }
-  
+
   template <class TInputImage>
       void
       PrintableImageFilter<TInputImage>
@@ -47,7 +47,7 @@ namespace otb
     m_Extractor->SetChannel(channel);
     this->Modified();
   }
-  
+
   template <class TInputImage>
       const typename PrintableImageFilter<TInputImage>::ChannelsType
       PrintableImageFilter<TInputImage>
@@ -55,36 +55,36 @@ namespace otb
   {
     return m_Extractor->GetChannels();
   }
-  
-  
+
+
   template <class TInputImage>
       void
       PrintableImageFilter<TInputImage>
   ::GenerateData()
   {
-    
+
     if(m_Extractor->GetNbChannels() == 0){
       m_Extractor->SetChannel(2);
       m_Extractor->SetChannel(3);
-      m_Extractor->SetChannel(4); 
+      m_Extractor->SetChannel(4);
     }
-    
+
     typename TInputImage::PixelType minimum,maximum;
     minimum.SetSize(this->GetInput()->GetNumberOfComponentsPerPixel());
     maximum.SetSize(this->GetInput()->GetNumberOfComponentsPerPixel());
     minimum.Fill(0);
     maximum.Fill(255);
-    
+
     m_Rescaler->SetInput(this->GetInput());
     m_Rescaler->SetOutputMinimum(minimum);
     m_Rescaler->SetOutputMaximum(maximum);
     m_Rescaler->SetClampThreshold(0.01);
-        
+
     m_Extractor->GraftOutput( this->GetOutput() );
     m_Extractor->Update();
     this->GraftOutput( m_Extractor->GetOutput() );
   }
-      
+
   template <class TInputImage>
       void
       PrintableImageFilter<TInputImage>
@@ -92,7 +92,7 @@ namespace otb
   {
     Superclass::PrintSelf(os,indent);
   }
-          
+
 } // end namespace otb
 
 #endif
diff --git a/Code/BasicFilters/otbProlateInterpolateImageFunction.h b/Code/BasicFilters/otbProlateInterpolateImageFunction.h
index 0089924d58..73c11f1f0a 100644
--- a/Code/BasicFilters/otbProlateInterpolateImageFunction.h
+++ b/Code/BasicFilters/otbProlateInterpolateImageFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,12 +25,12 @@ PURPOSE.  See the above copyright notices for more information.
 #include "vnl/algo/vnl_fft_1d.h"
 namespace otb
 {
-  
-namespace Function 
+
+namespace Function
 {
 /**
- * Prolate function give the value of the prolate profile following 
- * one of the 2 image dimension. 
+ * Prolate function give the value of the prolate profile following
+ * one of the 2 image dimension.
  */
 template<class TInput, class TOutput>
 class ProlateFunction
@@ -44,11 +44,11 @@ class ProlateFunction
   void SetRadius(unsigned int rad){ m_Radius = rad; }
   unsigned int GetRadius() const { return m_Radius; }
   unsigned int GetOriginalProfileSize() const { return m_OriginalProfileSize; }
-  VectorType GetOriginalProfile() const { return m_OriginalProfile;}   
+  VectorType GetOriginalProfile() const { return m_OriginalProfile;}
   double ComputeEnergy(double resampleRatio);
 
   inline TOutput operator()( const TInput & A ) const
-    { 
+    {
       TOutput val = itk::NumericTraits< TOutput >::Zero;
       if ( A != itk::NumericTraits< TInput >::Zero && vcl_abs(A) != static_cast<TInput>(m_Radius) && m_Radius!=0 )
 	{
@@ -89,42 +89,42 @@ class ProlateFunction
   /** Length of the original profil. */
   static const unsigned int m_OriginalProfileSize;
   /** Original prolate profil */
-  static const double m_OriginalProfile[721]; 
+  static const double m_OriginalProfile[721];
+
+};
 
-}; 
- 
 }//namespace Function
 
 /** \class ProlateInterpolateImageFunction
  * \brief Prolate interpolation of an otb::image.
  *
- * ProlateInterpolateImageFunction interpolates image intensity according to a 
+ * ProlateInterpolateImageFunction interpolates image intensity according to a
  * resampling profil.
  * \ingroup ImageFunctions ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT ProlateInterpolateImageFunction : 
-public GenericInterpolateImageFunction< TInputImage, 
-                                        ITK_TYPENAME Function::ProlateFunction< TInputInterpolator, TOutputInterpolator>, 
-                                        TBoundaryCondition, 
-                                        TCoordRep > 
+class ITK_EXPORT ProlateInterpolateImageFunction :
+public GenericInterpolateImageFunction< TInputImage,
+                                        ITK_TYPENAME Function::ProlateFunction< TInputInterpolator, TOutputInterpolator>,
+                                        TBoundaryCondition,
+                                        TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef ProlateInterpolateImageFunction                                                               Self;
-    typedef GenericInterpolateImageFunction<TInputImage, 
-                                            Function::ProlateFunction< TInputInterpolator, TOutputInterpolator>, 
-                                            TBoundaryCondition, 
+    typedef GenericInterpolateImageFunction<TInputImage,
+                                            Function::ProlateFunction< TInputInterpolator, TOutputInterpolator>,
+                                            TBoundaryCondition,
                                             TCoordRep>                                                    Superclass;
     typedef itk::SmartPointer<Self>                                                                            Pointer;
     typedef itk::SmartPointer<const Self>                                                                      ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(ProlateInterpolateImageFunction, GenericInterpolateImageFunction);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
@@ -133,7 +133,7 @@ public GenericInterpolateImageFunction< TInputImage,
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                                             IndexType;
     typedef typename Superclass::SizeType                                              SizeType;
@@ -142,9 +142,9 @@ public GenericInterpolateImageFunction< TInputImage,
     typedef typename Superclass::IteratorType                                          IteratorType;
     typedef typename Superclass::ContinuousIndexType                                   ContinuousIndexType;
     typedef typename std::vector<double>                                               VectorType;
-   
+
     unsigned int GetOriginalProfileSize() const { return this->GetFunction().GetOriginalProfileSize; };
-    VectorType GetOriginalProfile() const { return this->GetFunction().GetOriginalProfile();}; 
+    VectorType GetOriginalProfile() const { return this->GetFunction().GetOriginalProfile();};
 
     protected:
     ProlateInterpolateImageFunction();
@@ -153,7 +153,7 @@ public GenericInterpolateImageFunction< TInputImage,
 
     private:
     ProlateInterpolateImageFunction(const Self&); //purposely not implemented
-    void operator=(const Self&); //purposely not implemented  
+    void operator=(const Self&); //purposely not implemented
   };
 
 } // end namespace otb
diff --git a/Code/BasicFilters/otbProlateInterpolateImageFunction.txx b/Code/BasicFilters/otbProlateInterpolateImageFunction.txx
index 3d824a06be..05ae6c8d89 100644
--- a/Code/BasicFilters/otbProlateInterpolateImageFunction.txx
+++ b/Code/BasicFilters/otbProlateInterpolateImageFunction.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace Function
   const unsigned int
   ProlateFunction<TInput, TOutput>
   ::m_OriginalProfileSize = 721;
-  
+
 
   template<class TInput, class TOutput>
   const double
@@ -67,7 +67,7 @@ namespace Function
     0.000885052,  0.000883208,  0.000881361,  0.000879511,  0.000877658,  0.000875802, 0.000873943,  0.000872081,  0.000870216,  0.000868347,  0.000866476,  0.000864602,
     0.000862724,  0.000860844,  0.000858961,  0.000857075,  0.000855186,  0.000853294, 0.000851399,  0.000849502,  0.000847601,  0.000845698,  0.000843791,  0.000841882,
     0.000839971,  0.000838056,  0.000836139,  0.000834219,  0.000832296,  0.000830371, 0.000828442,  0.000826511,  0.000824578,  0.000822642,  0.000820703,  0.000818761,
-    0.000816817,  0.000814871,  0.000812922,  0.00081097,   0.000809016,  0.000807059, 0.000805099,  0.000803138,  0.000801173,  0.000799207,  0.000797237,  0.000795266, 
+    0.000816817,  0.000814871,  0.000812922,  0.00081097,   0.000809016,  0.000807059, 0.000805099,  0.000803138,  0.000801173,  0.000799207,  0.000797237,  0.000795266,
     0.000793292,  0.000791315,  0.000789337,  0.000787355,  0.000785372,  0.000783386, 0.000781398,  0.000779407,  0.000777415,  0.00077542,   0.000773422,  0.000771423,
     0.000769421,  0.000767417,  0.000765411,  0.000763403,  0.000761393,  0.00075938,  0.000757365,  0.000755349,  0.00075333,   0.000751309,  0.000749286,  0.000747261,
     0.000745234,  0.000743205,  0.000741173,  0.00073914,   0.000737105,  0.000735069, 0.00073303,   0.000730989,  0.000728946,  0.000726902,  0.000724855,  0.000722807,
@@ -94,9 +94,9 @@ namespace Function
     0.000214923,  0.000212918,  0.000210915,  0.000208914,  0.000206915,  0.000204919, 0.000202924,  0.000200932,  0.000198942,  0.000196955,  0.000194969,  0.000192986,
     0.000191005,  0.000189026,  0.00018705,   0.000185076,  0.000183104,  0.000181135, 0.000179167,  0.000177203,  0.00017524,   0.000173281,  0.000171323,  0.000169368,
     0.000167415,  0.000165465,  0.000163517,  0.000161572,  0.000159629,  0.000157689, 0.000155752,  0.000153816,  0.000151884,  0.000149954,  0.000148026,  0.000146101,
-    0.000144179 
+    0.000144179
   };
-  
+
 template<class TInput, class TOutput>
 double
 ProlateFunction<TInput, TOutput>
@@ -104,7 +104,7 @@ ProlateFunction<TInput, TOutput>
 {
   vnl_vector<vcl_complex<double> > resampledProfile(1024);
   resampledProfile.fill(0);
-  
+
   for (unsigned int i = 0; i<m_Radius+1; i++)
     {
       unsigned int ival = static_cast<unsigned int>(static_cast<double>(m_OriginalProfileSize*i)/static_cast<double>(m_Radius+1));
@@ -112,10 +112,10 @@ ProlateFunction<TInput, TOutput>
     }
   vnl_fft_1d<double> v1d(1024);
   v1d.fwd_transform(resampledProfile);
-  
+
   // Carrful, spectrum is symmetrical
   unsigned int sampleNb = static_cast<unsigned int>( 1024/(2*resampleRatio) );
-  
+
   double energy = 0.;
   // First part of spectrum
   for (unsigned int j = 0; j<sampleNb+1; j++)
@@ -127,7 +127,7 @@ ProlateFunction<TInput, TOutput>
     {
       energy += std::abs(resampledProfile[j])*std::abs(resampledProfile[j]);
     }
-  
+
   double totalEnergy = energy;
   // Middle part
   for (unsigned int j = sampleNb+1; j<1023-sampleNb+1; j++)
@@ -151,7 +151,7 @@ ProlateInterpolateImageFunction<TInputImage, TBoundaryCondition, TCoordRep, TInp
   //VectorType m_ResampledProfil(1, 0.);
   this->SetNormalizeWeight(true);
 }
-  
+
 /** Destructor */
 template<class TInputImage, class TBoundaryCondition, class TCoordRep, class TInputInterpolator, class TOutputInterpolator>
 ProlateInterpolateImageFunction<TInputImage, TBoundaryCondition, TCoordRep, TInputInterpolator, TOutputInterpolator>
@@ -163,7 +163,7 @@ template<class TInputImage, class TBoundaryCondition, class TCoordRep, class TIn
 void
 ProlateInterpolateImageFunction<TInputImage, TBoundaryCondition, TCoordRep, TInputInterpolator, TOutputInterpolator>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
-{ 
+{
   Superclass::PrintSelf( os, indent );
 }
 
diff --git a/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h b/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h
index 6d9a140b0a..8fef16ee86 100644
--- a/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h
+++ b/Code/BasicFilters/otbQuaternaryFunctorImageFilter.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,23 +26,23 @@
 
 namespace otb
 {
-  
+
 /** \class QuaternaryFunctorImageFilter
  * \brief Implements pixel-wise generic operation of four images.
  *
  * This class is parameterized over the types of the four input images
  * and the type of the output image.  It is also parameterized by the
  * operation to be applied, using a Functor style.
- * 
+ *
  * \sa TernaryFunctorImageFilter,BinaryFunctorImageFilter UnaryFunctorImageFilter
  *
  * \ingroup IntensityImageFilters Multithreaded
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TInputImage3, class TInputImage4,
           class TOutputImage, class TFunction    >
 class ITK_EXPORT QuaternaryFunctorImageFilter :
-    public itk::InPlaceImageFilter<TInputImage1,TOutputImage> 
+    public itk::InPlaceImageFilter<TInputImage1,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -61,20 +61,20 @@ public:
   typedef TFunction   FunctorType;
   typedef TInputImage1 Input1ImageType;
   typedef typename Input1ImageType::ConstPointer Input1ImagePointer;
-  typedef typename Input1ImageType::RegionType Input1ImageRegionType; 
-  typedef typename Input1ImageType::PixelType Input1ImagePixelType; 
+  typedef typename Input1ImageType::RegionType Input1ImageRegionType;
+  typedef typename Input1ImageType::PixelType Input1ImagePixelType;
   typedef TInputImage2 Input2ImageType;
   typedef typename Input2ImageType::ConstPointer Input2ImagePointer;
-  typedef typename Input2ImageType::RegionType Input2ImageRegionType; 
-  typedef typename Input2ImageType::PixelType Input2ImagePixelType; 
+  typedef typename Input2ImageType::RegionType Input2ImageRegionType;
+  typedef typename Input2ImageType::PixelType Input2ImagePixelType;
   typedef TInputImage3 Input3ImageType;
   typedef typename Input3ImageType::ConstPointer Input3ImagePointer;
-  typedef typename Input3ImageType::RegionType Input3ImageRegionType; 
-  typedef typename Input3ImageType::PixelType Input3ImagePixelType; 
+  typedef typename Input3ImageType::RegionType Input3ImageRegionType;
+  typedef typename Input3ImageType::PixelType Input3ImagePixelType;
   typedef TInputImage4 Input4ImageType;
   typedef typename Input4ImageType::ConstPointer Input4ImagePointer;
-  typedef typename Input4ImageType::RegionType Input4ImageRegionType; 
-  typedef typename Input4ImageType::PixelType Input4ImagePixelType; 
+  typedef typename Input4ImageType::RegionType Input4ImageRegionType;
+  typedef typename Input4ImageType::PixelType Input4ImagePixelType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointer;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
diff --git a/Code/BasicFilters/otbQuaternaryFunctorImageFilter.txx b/Code/BasicFilters/otbQuaternaryFunctorImageFilter.txx
index bc7552f831..59e857da12 100644
--- a/Code/BasicFilters/otbQuaternaryFunctorImageFilter.txx
+++ b/Code/BasicFilters/otbQuaternaryFunctorImageFilter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ namespace otb
 /**
  * Constructor
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
 ::QuaternaryFunctorImageFilter()
@@ -44,11 +44,11 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 void
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
-::SetInput1( const TInputImage1 *image1 ) 
+::SetInput1( const TInputImage1 *image1 )
 {
   // The ProcessObject is not const-correct so the const_cast is required here
   SetNthInput( 0, const_cast<TInputImage1 *>( image1 ) );
@@ -58,11 +58,11 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 void
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
-::SetInput2( const TInputImage2 *image2 ) 
+::SetInput2( const TInputImage2 *image2 )
 {
   // The ProcessObject is not const-correct so the const_cast is required here
   SetNthInput( 1, const_cast<TInputImage2 *>( image2 ) );
@@ -73,11 +73,11 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 void
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
-::SetInput3( const TInputImage3 *image3 ) 
+::SetInput3( const TInputImage3 *image3 )
 {
   // The ProcessObject is not const-correct so the const_cast is required here
   SetNthInput( 2, const_cast<TInputImage3 *>( image3 ) );
@@ -87,11 +87,11 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 void
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
-::SetInput4( const TInputImage4 *image4 ) 
+::SetInput4( const TInputImage4 *image4 )
 {
   // The ProcessObject is not const-correct so the const_cast is required here
   SetNthInput( 3, const_cast<TInputImage4 *>( image4 ) );
@@ -100,7 +100,7 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
 /**
  * BeforeThreadedGenerateData function. Validate inputs
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 void
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
@@ -121,14 +121,14 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
 			<< " Input2 is " << inputPtr2.GetPointer() << ", "
 			<< " Input3 is " << inputPtr3.GetPointer() << ", "
 			<< " Input4 is " << inputPtr4.GetPointer());
-                     
+
     }
 }
 
 /**
  * ThreadedGenerateData function. Performs the pixel-wise addition
  */
-template < class TInputImage1, class TInputImage2,class TInputImage3, 
+template < class TInputImage1, class TInputImage2,class TInputImage3,
 	   class TInputImage4, class TOutputImage, class TFunction  >
 void
 QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4,TOutputImage,TFunction>
@@ -142,12 +142,12 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
     = dynamic_cast<const TInputImage1*>((itk::ProcessObject::GetInput(0)));
   Input2ImagePointer inputPtr2
     = dynamic_cast<const TInputImage2*>((itk::ProcessObject::GetInput(1)));
-  Input3ImagePointer inputPtr3 
+  Input3ImagePointer inputPtr3
     = dynamic_cast<const TInputImage3*>((itk::ProcessObject::GetInput(2)));
   Input4ImagePointer inputPtr4
     = dynamic_cast<const TInputImage4*>((itk::ProcessObject::GetInput(3)));
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
   itk::ImageRegionConstIterator<TInputImage1> inputIt1(inputPtr1, outputRegionForThread);
   itk::ImageRegionConstIterator<TInputImage2> inputIt2(inputPtr2, outputRegionForThread);
   itk::ImageRegionConstIterator<TInputImage3> inputIt3(inputPtr3, outputRegionForThread);
@@ -162,7 +162,7 @@ QuaternaryFunctorImageFilter<TInputImage1,TInputImage2,TInputImage3,TInputImage4
   outputIt.GoToBegin();
 
 
-  while( !inputIt1.IsAtEnd() ) 
+  while( !inputIt1.IsAtEnd() )
     {
     outputIt.Set( m_Functor(inputIt1.Get(), inputIt2.Get(), inputIt3.Get(), inputIt4.Get()) );
     ++inputIt1;
diff --git a/Code/BasicFilters/otbRationalQuotientResampleImageFilter.h b/Code/BasicFilters/otbRationalQuotientResampleImageFilter.h
index 3ebd66c867..a5a7712998 100644
--- a/Code/BasicFilters/otbRationalQuotientResampleImageFilter.h
+++ b/Code/BasicFilters/otbRationalQuotientResampleImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -42,10 +42,10 @@ namespace otb
       typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
       typedef itk::SmartPointer<Self> Pointer;
       typedef itk::SmartPointer<const Self> ConstPointer;
-      
+
       /** Creation through object factory macro */
       itkNewMacro(Self);
-      
+
       /** Type macro */
       itkTypeMacro(RationalQuotientResampleImageFilter, ImageToImageFilter);
 
@@ -53,7 +53,7 @@ namespace otb
 			  TInputImage::ImageDimension);
       itkStaticConstMacro(OutputImageDimension, unsigned int,
 			  TOutputImage::ImageDimension );
-      
+
       /** Display */
       void PrintSelf( std::ostream& os, itk::Indent indent ) const;
 
@@ -62,12 +62,12 @@ namespace otb
       typedef typename InputImageType::Pointer InputImagePointerType;
       typedef TOutputImage OutputImageType;
       typedef typename OutputImageType::Pointer OutputImagePointerType;
-      
+
       /** Set numerator factors
        *  \param numerator The factor for expand filter, same for each dimension
        */
       virtual void SetNumeratorFactors(const unsigned int numerator);
-      
+
       /** Set numerator factors
        *  \param numerators Tab of expand filter factors, along each dimension
        */
@@ -79,18 +79,18 @@ namespace otb
        */
       virtual void SetNumeratorFactors( const unsigned int i,
 					const unsigned int numerator);
-      
+
       /** Get numerator factors
        *  \return tab of numerator factors
        */
       virtual const unsigned int* GetNumeratorFactors() const
 	{ return m_Numerators;}
-      
+
       /** Set denominator factors
        *  \param denominator The factor for shrink filter, same along each dimension
        */
       virtual void SetDenominatorFactors(const unsigned int denominator);
-      
+
       /** Set denominator factors
         *  \param denominators Tab of shrink filter factors, along each dimension
 	*/
@@ -102,50 +102,50 @@ namespace otb
        */
       virtual void SetDenominatorFactors(const unsigned int i,
 					 const unsigned int denominator);
-      
+
       /** Get denominator factors
         * \return tab of denominator factors
 	*/
       virtual const unsigned int* GetDenominatorFactors() const
 	{ return m_Denominators;}
-      
+
     protected:
 
       /** Internal filters typedefs */
       typedef itk::ShrinkImageFilter<InputImageType, OutputImageType>
 	ShrinkFilterType;
       typedef typename ShrinkFilterType::Pointer ShrinkFilterPointerType;
-      
+
       typedef itk::ExpandImageFilter<InputImageType, OutputImageType>
 	ExpandFilterType;
       typedef typename ExpandFilterType::Pointer ExpandFilterPointerType;
-      
+
       /** Actually process the input */
       virtual void GenerateData();
-      
+
       /** Constructor */
       RationalQuotientResampleImageFilter();
-      
+
       /** Expand filter */
       ExpandFilterPointerType m_ExpandFilter;
-      
+
       /** Shrink filter */
       ShrinkFilterPointerType m_ShrinkFilter;
-      
+
       /** Destructor */
       virtual ~RationalQuotientResampleImageFilter() {}
 
       /** Numerator factors*/
       unsigned int m_Numerators[ImageDimension];
-      
+
       /** Denominator factors*/
       unsigned int m_Denominators[ImageDimension];
-      
+
     private:
 
       RationalQuotientResampleImageFilter(Self&);   // intentionally not implemented
       void operator=(const Self&);          // intentionally not implemented
-      
+
     };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbRationalQuotientResampleImageFilter.txx b/Code/BasicFilters/otbRationalQuotientResampleImageFilter.txx
index 1ffff1bcbb..513317b216 100644
--- a/Code/BasicFilters/otbRationalQuotientResampleImageFilter.txx
+++ b/Code/BasicFilters/otbRationalQuotientResampleImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -33,31 +33,31 @@ namespace otb
 	m_Numerators[dimension]=1;
 	m_Denominators[dimension]=1;
       }
-    
+
     // Internal filter
     m_ExpandFilter = ExpandFilterType::New();
     m_ShrinkFilter = ShrinkFilterType::New();
-    
+
     m_ShrinkFilter->SetInput(m_ExpandFilter->GetOutput());
-    
+
   }
 
-  
+
   template <class TInputImage, class TOutputImage>
   void
   RationalQuotientResampleImageFilter<TInputImage,TOutputImage>
   ::GenerateData()
   {
     m_ExpandFilter->SetInput(this->GetInput());
-    
+
     // Set expand factors as the numerator
     m_ExpandFilter->SetExpandFactors(m_Numerators);
-    
+
     // Set shrink factors as the denominator
     m_ShrinkFilter->SetShrinkFactors(m_Denominators);
-    
+
     m_ShrinkFilter->GraftOutput(this->GetOutput());
-    
+
     m_ShrinkFilter->Update();
     this->GraftOutput(m_ShrinkFilter->GetOutput());
   }
@@ -76,7 +76,7 @@ namespace otb
       }
     os << std::endl;
   }
-  
+
   template <class TInputImage, class TOutputImage>
   void
   RationalQuotientResampleImageFilter<TInputImage, TOutputImage>::
@@ -95,7 +95,7 @@ namespace otb
 	  }
       }
   }
-  
+
   template <class TInputImage, class TOutputImage>
   void
   RationalQuotientResampleImageFilter<TInputImage, TOutputImage>::
@@ -114,7 +114,7 @@ namespace otb
 	  }
       }
   }
-    
+
   template <class TInputImage, class TOutputImage>
   void
   RationalQuotientResampleImageFilter<TInputImage, TOutputImage>::
@@ -148,7 +148,7 @@ namespace otb
 	  }
       }
   }
-  
+
   template <class TInputImage, class TOutputImage>
   void
   RationalQuotientResampleImageFilter<TInputImage, TOutputImage>::
@@ -167,7 +167,7 @@ namespace otb
 	  }
       }
   }
-    
+
   template <class TInputImage, class TOutputImage>
   void
   RationalQuotientResampleImageFilter<TInputImage, TOutputImage>::
diff --git a/Code/BasicFilters/otbScalarImageTextureFunctor.h b/Code/BasicFilters/otbScalarImageTextureFunctor.h
index eaa4cab1f8..bb192df5c7 100644
--- a/Code/BasicFilters/otbScalarImageTextureFunctor.h
+++ b/Code/BasicFilters/otbScalarImageTextureFunctor.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,44 +26,44 @@ namespace otb
 namespace Functor
 {
 /** \class ScalarImageTextureFunctor
- *  \brief Unary neighborhood functor to compute the value of a pixel which is a sum 
+ *  \brief Unary neighborhood functor to compute the value of a pixel which is a sum
  *   of the surrounding pixels value ponderated by a coefficient.
- *  
+ *
  *  \ingroup Functor
 */
 template <class TNeighIter, class TInputImage, class TOutput>
 class ScalarImageTextureFunctor
 {
  public:
-  ScalarImageTextureFunctor() 
+  ScalarImageTextureFunctor()
     {
       m_FeatureIndex=0;
     };
   ~ScalarImageTextureFunctor() { };
-  
+
   void SetFeatureIndex(int i){ m_FeatureIndex = i;};
   int GetFeatureIndex(){ return m_FeatureIndex; };
-  
+
   typedef TInputImage InputImageType;
   typedef typename itk::Statistics::ScalarImageTextureCalculator< InputImageType> TextureCalcType;
-  
+
   inline TOutput operator()(const TNeighIter & it)
-    {	 
+    {
       unsigned int neighborhoodSize = it.Size();
-   
+
       typename TextureCalcType::Pointer textureFilter = TextureCalcType::New();
       typename InputImageType::Pointer image = InputImageType::New();
-      
+
       typename InputImageType::IndexType index;
       index.Fill(0);
       typename InputImageType::RegionType region;
-      
+
       region = it.GetBoundingBoxAsImageRegion();
       region.SetIndex(index);
-      
+
       image->SetRegions( region );
       image->Allocate();
-   
+
       typedef itk::ImageRegionIterator< InputImageType > IteratorType;
       IteratorType inputIt( image, image->GetLargestPossibleRegion() );
       inputIt.GoToBegin();
@@ -76,15 +76,15 @@ class ScalarImageTextureFunctor
       textureFilter->FastCalculationsOn();
       textureFilter->SetInput(image);
       textureFilter->Compute();
-    
+
       return (static_cast<TOutput>(textureFilter->GetFeatureMeans()->at(m_FeatureIndex)));
-      
+
     }
  private:
   int m_FeatureIndex;
-  
+
 };
- 
+
 }
 }
 
diff --git a/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.h b/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.h
index 0c00e66965..c37f0586d2 100644
--- a/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.h
+++ b/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,21 +24,21 @@
 
 namespace otb {
 
-namespace Functor {  
+namespace Functor {
 
 /**
  * \class ScalarToRainbowRGBPixelFunctor
  * \brief Function object which maps a scalar value into a rainbow RGB pixel value.
  *
  *  This class is useful for visualizing images which cannot be mapped
- *  succefully into grayscale images.  
- * 
- *  Grayscale image is mapped to a color image where blue represents 
+ *  succefully into grayscale images.
+ *
+ *  Grayscale image is mapped to a color image where blue represents
  * small values and red represents big values.
  *
  */
 template< class TScalar >
-class ITK_EXPORT ScalarToRainbowRGBPixelFunctor : 
+class ITK_EXPORT ScalarToRainbowRGBPixelFunctor :
     public itk::Functor::ScalarToRGBPixelFunctor<TScalar>
 {
 public:
@@ -48,15 +48,15 @@ public:
   typedef unsigned char               RGBComponentType;
   typedef itk::RGBPixel<RGBComponentType>  RGBPixelType;
   typedef TScalar                     ScalarType;
-  
+
   RGBPixelType operator()( const TScalar &) const;
-  
+
   /** Set the input maximum to be mapped to red */
   void SetMaximum(ScalarType max)
   {
     this->m_Maximum = max;
   }
-  
+
   /** Set the input minimum to be mapped to blue */
   void SetMinimum(ScalarType min)
   {
@@ -65,12 +65,12 @@ public:
 
   protected:
   RGBPixelType HSVToRGB(double h, double s, double v) const;
-  
+
 private:
   ScalarType m_Maximum;
   ScalarType m_Minimum;
 };
-  
+
 } // end namespace functor
 
 } // end namespace itk
diff --git a/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.txx b/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.txx
index cf0b16b87e..df2767b9fe 100644
--- a/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.txx
+++ b/Code/BasicFilters/otbScalarToRainbowRGBPixelFunctor.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,7 +23,7 @@
 
 namespace otb {
 
-namespace Functor {  
+namespace Functor {
 
 template <class TScalar>
 ScalarToRainbowRGBPixelFunctor<TScalar>
@@ -31,21 +31,21 @@ ScalarToRainbowRGBPixelFunctor<TScalar>
 {
   m_Minimum = 0;
   m_Maximum = itk::NumericTraits<ScalarType>::max();
-  
+
 }
 
-  
+
 template <class TScalar>
 typename ScalarToRainbowRGBPixelFunctor<TScalar>::RGBPixelType
 ScalarToRainbowRGBPixelFunctor<TScalar>
 ::operator()( const TScalar & v) const
 {
-  
+
   double hinc, sinc, vinc;
   hinc=0.6/(m_Maximum-m_Minimum);
   sinc=0.0;
   vinc=0.0;
-  
+
   double hue, sat, val;
 
   hue = 0.6 - (v-m_Minimum)*hinc;
@@ -56,12 +56,12 @@ ScalarToRainbowRGBPixelFunctor<TScalar>
   if (v > m_Maximum)
   {
     hue =0.0;
-  }  
+  }
   sat = 0.99 + v*sinc;
   val = itk::NumericTraits<RGBComponentType>::max() + v*vinc;
-  
+
   return HSVToRGB(hue, sat, val);
-  
+
 }
 
 
@@ -76,7 +76,7 @@ ScalarToRainbowRGBPixelFunctor<TScalar>
   double twothird = 2.0 / 3.0;
   double fivesixth = 5.0 / 6.0;
   double r, g, b;
-  
+
   // compute RGB from HSV
   if (h > onesixth && h <= onethird) // green/red
     {
@@ -114,22 +114,22 @@ ScalarToRainbowRGBPixelFunctor<TScalar>
     g = h / onesixth;
     b = 0.0;
     }
-  
+
   // add Saturation to the equation.
   r = (s * r + (1.0 - s));
   g = (s * g + (1.0 - s));
   b = (s * b + (1.0 - s));
-  
+
   r *= v;
   g *= v;
   b *= v;
-  
+
   RGBPixelType ans;
   ans[0] = static_cast<RGBComponentType>( r );
   ans[1] = static_cast<RGBComponentType>( g );
   ans[2] = static_cast<RGBComponentType>( b );
   return ans;
-  
+
 }
 
 
diff --git a/Code/BasicFilters/otbScalarVectorImageTextureFunctor.h b/Code/BasicFilters/otbScalarVectorImageTextureFunctor.h
index 4ebb8bfc19..66013ad457 100644
--- a/Code/BasicFilters/otbScalarVectorImageTextureFunctor.h
+++ b/Code/BasicFilters/otbScalarVectorImageTextureFunctor.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,45 +28,45 @@ namespace otb
 namespace Functor
 {
 /** \class ScalarVectorImageTextureFunctor
- *  \brief Unary neighborhood functor to compute the value of a pixel which is a sum 
+ *  \brief Unary neighborhood functor to compute the value of a pixel which is a sum
  *   of the surrounding pixels value ponderated by a coefficient.
- *  
+ *
  *  \ingroup Functor
 */
 template <class TNeighIter, class TInputImage, class TOutput>
 class ScalarVectorImageTextureFunctor
 {
  public:
-  ScalarVectorImageTextureFunctor() 
+  ScalarVectorImageTextureFunctor()
     {
       m_FeatureIndex.clear();
     };
   ~ScalarVectorImageTextureFunctor() { };
-  
+
   typedef std::vector<int> IndexSelectFeaturesType;
   typedef TInputImage InputImageType;
   typedef typename itk::Statistics::ScalarImageTextureCalculator< InputImageType> TextureCalcType;
-  
+
   void SetFeatureIndex(const IndexSelectFeaturesType & listIndex){ m_FeatureIndex = listIndex;};
   const IndexSelectFeaturesType & GetFeatureIndex(){ return m_FeatureIndex; };
 
   inline TOutput operator()(const TNeighIter & it)
-    {	 
+    {
       unsigned int neighborhoodSize = it.Size();
-   
+
       typename TextureCalcType::Pointer textureFilter = TextureCalcType::New();
       typename InputImageType::Pointer image = InputImageType::New();
-      
+
       typename InputImageType::IndexType index;
       index.Fill(0);
       typename InputImageType::RegionType region;
-      
+
       region = it.GetBoundingBoxAsImageRegion();
       region.SetIndex(index);
-      
+
       image->SetRegions( region );
       image->Allocate();
-   
+
       typedef itk::ImageRegionIterator< InputImageType > IteratorrrType;
       IteratorrrType inputIt( image, image->GetLargestPossibleRegion() );
       inputIt.GoToBegin();
@@ -79,24 +79,24 @@ class ScalarVectorImageTextureFunctor
       textureFilter->FastCalculationsOn();
       textureFilter->SetInput(image);
       textureFilter->Compute();
-      
+
       TOutput resultvalue;
       resultvalue.SetSize(m_FeatureIndex.size());
       resultvalue.AllocateElements(m_FeatureIndex.size());
-      
+
       for(unsigned int cpt=0 ; cpt < m_FeatureIndex.size() ; cpt++)
       {
         resultvalue[cpt] = textureFilter->GetFeatureMeans()->at(m_FeatureIndex[cpt]);
       }
-    
+
       return (static_cast<TOutput>(resultvalue));
-      
+
     }
  private:
   IndexSelectFeaturesType m_FeatureIndex;
-  
+
 };
- 
+
 }
 }
 
diff --git a/Code/BasicFilters/otbSimplifyPathFunctor.h b/Code/BasicFilters/otbSimplifyPathFunctor.h
index cb4bd4d085..a42aebda06 100644
--- a/Code/BasicFilters/otbSimplifyPathFunctor.h
+++ b/Code/BasicFilters/otbSimplifyPathFunctor.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,17 +25,17 @@ namespace otb
 
     /** \class SimplifyPathFunctor
    *    \brief This filter performs a simplification of the input path.
-   * 
-   *  It reduces the number of vertices in each path, according to a tolerance criterion. It aims at 
+   *
+   *  It reduces the number of vertices in each path, according to a tolerance criterion. It aims at
    *  removing aligned vertices while keeping sharp angular points.
    *
-   *  In order to ensure the unicity of its output, each path is considered first from begin to end, then 
-   *  from begin to the first vertex before the end. At each step, the consistency of the path is checked : 
+   *  In order to ensure the unicity of its output, each path is considered first from begin to end, then
+   *  from begin to the first vertex before the end. At each step, the consistency of the path is checked :
    *  the equation of the line passing by the first and last vertices is computed. Then, for each
    *  vertices between them, the euclidean distance to this line is computed. If for one vertex, this distance
    *  is upper than the tolerance threshold, the path is considered to be inconsistent and no vertices can be removed.
    *
-   *  If the path is considered consistent (which will occure at least with a 2 vertices path), 
+   *  If the path is considered consistent (which will occure at least with a 2 vertices path),
    * only the beginning and ending
    *  vertices are kept and a new search iteration begin at its end.
    *
@@ -49,12 +49,12 @@ namespace otb
   class SimplifyPathFunctor
   {
     public:
-      
+
       typedef typename TInput::ObjectType::VertexListType::ConstIterator VertexListConstIteratorType;
       typedef typename TInput::ObjectType::VertexListType::ConstPointer VertexListConstPointerType;
       typedef TOutput OutputPathPointerType;
       typedef typename OutputPathPointerType::ObjectType OutputPathType;
-      
+
       void SetTolerance(double Tolerance )
       {
         m_Tolerance = Tolerance;
@@ -63,13 +63,13 @@ namespace otb
       {
         return (  m_Tolerance );
       }
-      
-      SimplifyPathFunctor() 
+
+      SimplifyPathFunctor()
       {
         m_Tolerance = 1.0;
       };
       ~SimplifyPathFunctor() {};
-      
+
       inline OutputPathPointerType operator()(const TInput & input)
       {
 
@@ -79,12 +79,12 @@ namespace otb
         VertexListConstPointerType  vertexList = input->GetVertexList();
         VertexListConstIteratorType beginIt = vertexList->Begin();
         VertexListConstIteratorType beforeTheEndIt = --(vertexList->End());
-       
+
 	// Add the first vertex
         newPath->AddVertex(beginIt.Value());
-      
+
         while ( beginIt != beforeTheEndIt)
-        {    
+        {
           VertexListConstIteratorType endIt = beforeTheEndIt;
       // while the segment is not consistent, decrement endIt
           while (!this->TestPathConsistency(vertexList,beginIt, endIt))
@@ -96,18 +96,18 @@ namespace otb
           beginIt=endIt;
         }
         return newPath;
-   
+
       }
-      
-      
-      
+
+
+
     private:
       double m_Tolerance;
-      
-      bool TestPathConsistency(VertexListConstPointerType vertexList, 
-                          VertexListConstIteratorType begin, 
+
+      bool TestPathConsistency(VertexListConstPointerType vertexList,
+                          VertexListConstIteratorType begin,
                           VertexListConstIteratorType end)
-      {   
+      {
         VertexListConstIteratorType segmentIt = begin;
         ++segmentIt;
     //Compute the distance of a point to a segment based on the cross product
@@ -119,7 +119,7 @@ namespace otb
                 +(end.Value()[1]-begin.Value()[1])*(end.Value()[1]-begin.Value()[1]);
           if (lenghtSeg == 0) return false;
           double distsq = crossProduct*crossProduct/lenghtSeg;
-          if (distsq > static_cast<double>(m_Tolerance) ) 
+          if (distsq > static_cast<double>(m_Tolerance) )
           {
             return false;
           }
@@ -127,7 +127,7 @@ namespace otb
         }
         return true;
       }
-      
+
   };
 
 }
diff --git a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h
index 76707fdb2a..2522bca933 100644
--- a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h
+++ b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,13 +24,13 @@
 
 namespace otb
 {
-  
+
 /** \class SpatialObjectToImageDrawingFilter
- * \brief Base class for filters that take a SpatialObject 
+ * \brief Base class for filters that take a SpatialObject
  *        as input and produce an image as output.
  *  By default, if the user does not specify the size of the output image,
- *  the maximum size of the object's bounding box is used. 
- *  The spacing of the image is given by the spacing of the input 
+ *  the maximum size of the object's bounding box is used.
+ *  The spacing of the image is given by the spacing of the input
  *  Spatial object.
  */
 template <class TInputSpatialObject, class TOutputImage>
@@ -48,10 +48,10 @@ public:
   typedef typename OutputImageType::Pointer OutputImagePointer;
   typedef typename OutputImageType::ValueType  ValueType;
   typedef typename OutputImageType::SpacingType SpacingType;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(SpatialObjectToImageDrawingFilter,itk::ImageSource);
 
@@ -85,18 +85,18 @@ public:
   virtual void SetSpacing( const float* spacing);
   virtual const double* GetSpacing() const;
 
-  /** Set/Get the value for pixels inside the spatial object. 
+  /** Set/Get the value for pixels inside the spatial object.
   * By default, this filter will return an image
-  * that contains values from the spatial object specified as input. 
+  * that contains values from the spatial object specified as input.
   * If this "inside" value is changed to a non-null value,
-  * the output produced by this filter will be a mask with inside/outside values 
+  * the output produced by this filter will be a mask with inside/outside values
   * specified by the user. */
   itkSetMacro(InsideValue, ValueType);
   itkGetMacro(InsideValue, ValueType);
 
   /** Set/Get the value for pixels outside the spatial object.
   * By default, this filter will return an image
-  * that contains values from the spatial object specified as input. 
+  * that contains values from the spatial object specified as input.
   * If this "outside" value is changed to a non-null value,
   * the output produced by this filter will be a mask with inside/outside values
   * specified by the user. */
@@ -128,13 +128,13 @@ public:
   itkSetMacro(UseObjectValue,bool);
   itkGetMacro(UseObjectValue,bool);
 
-  
-  
-  
+
+
+
   typedef itk::SpatialObject<InputSpatialObjectType::ObjectDimension> SpatialObjectType;
   typedef typename SpatialObjectType::ChildrenListType* ChildrenType;
   typedef typename SpatialObjectType::ChildrenListType::iterator IteratorType;
-  
+
 protected:
   SpatialObjectToImageDrawingFilter();
   ~SpatialObjectToImageDrawingFilter();
diff --git a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx
index f43e6b24a1..0691ee1a91 100644
--- a/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx
+++ b/Code/BasicFilters/otbSpatialObjectToImageDrawingFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
diff --git a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.h b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.h
index dc0aa9f9d1..a8c5bf8c9c 100644
--- a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.h
+++ b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,13 +25,13 @@ namespace otb
 /** \class SpectralAngleDistanceImageFilter
  *  \brief This filter implements the computation of the spectral angle
  * distance with respect to a reference pixel.
- * 
+ *
  * Spectral angle distance is an efficient way to convert spectral information to
- * scalar data with respect to a reference pixel. The spectral angle distance 
+ * scalar data with respect to a reference pixel. The spectral angle distance
  * is defined as:
- * 
+ *
  * \f[SA = cos^{-1}\Big(\frac{{\sum_{b=1}^{n_{b}}}r(b)\cdot p(b)}{\sqrt{{\sum_{b=1}^{n_{b}}}r(b)^{2}{\sum_{b=1}^{n_{b}}p(b)^{2}}}}\Big) \f]
- * with \f$b\f$ being the spectral band, \f$r\f$ the reference pixel and \f$p\f$ 
+ * with \f$b\f$ being the spectral band, \f$r\f$ the reference pixel and \f$p\f$
  * the current pixel.
  *
  * Since the spectral angle deals with multi-bands image, the InputImage pixels are suposed to
@@ -55,13 +55,13 @@ class ITK_EXPORT SpectralAngleDistanceImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(SpectralAngleDistanceImageFilter,itk::ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::ConstPointer InputImageConstPointerType;
diff --git a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx
index 3eb0b245cc..b974c8a9e0 100644
--- a/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx
+++ b/Code/BasicFilters/otbSpectralAngleDistanceImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,7 +23,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkImageRegionConstIterator.h"
 #include "itkProgressReporter.h"
 #include "otbMacro.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -41,7 +41,7 @@ void
 SpectralAngleDistanceImageFilter<TInputImage,TOutputImage>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,int threadId)
 {
-  
+
   if (m_ReferencePixel == 0)
     {
       itkExceptionMacro(<<"Reference pixel is not set!");
@@ -58,7 +58,7 @@ SpectralAngleDistanceImageFilter<TInputImage,TOutputImage>
 			<<inputPtr->GetNumberOfComponentsPerPixel()<<") don't match!");
     }
 
-  
+
   // Define the portion of the input to walk for this thread, using
   // the CallCopyOutputRegionToInputRegion method allows for the input
   // and output images to be different dimensions
@@ -73,7 +73,7 @@ SpectralAngleDistanceImageFilter<TInputImage,TOutputImage>
   inputIt.GoToBegin();
   outputIt.GoToBegin();
 
-  while(!inputIt.IsAtEnd() && !outputIt.IsAtEnd()) 
+  while(!inputIt.IsAtEnd() && !outputIt.IsAtEnd())
     {
       double dist=0.0;
       double scalarProd=0.0;
diff --git a/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.h b/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.h
index 841119e354..a453faf724 100644
--- a/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.h
+++ b/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,17 +31,17 @@
 #include "otbPersistentFilterStreamingDecorator.h"
 
 namespace otb {
-  
+
   /** \class PersistentMatrixTransposeMatrixImageFilter
    * \brief Compute \f[X^T.Y \f]. Allow a padding of ones.
-   * 
+   *
    * \f[X\f] and \f[Y\f] are the input images.
    * The padding has the effect of adding a component filled with ones to the image
    *
    *  This filter persists its temporary data. It means that if you Update it n times on n different
    * requested regions, the output statistics will be the result for the whole set of n regions.
    *
-   * To reset the temporary data, one should call the Reset() function. 
+   * To reset the temporary data, one should call the Reset() function.
    *
    * To get the statistics once the regions have been processed via the pipeline, use the Synthetize() method.
    *
@@ -59,13 +59,13 @@ namespace otb {
       typedef PersistentImageFilter<TInputImage,TInputImage>       Superclass;
       typedef itk::SmartPointer<Self>                              Pointer;
       typedef itk::SmartPointer<const Self>                        ConstPointer;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
-      
+
       /** Runtime information support. */
       itkTypeMacro(PersistentMatrixTransposeMatrixImageFilter, PersistentImageFilter);
-      
+
       /** Image related typedefs. */
       // First Input
       typedef TInputImage                                                             ImageType;
@@ -80,8 +80,8 @@ namespace otb {
       typedef typename TInputImage2::PixelType                                        PixelType2;
       typedef typename TInputImage2::InternalPixelType                                InternalPixelType2;
 
-      itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);     
-      
+      itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
+
       itkSetMacro(UsePadFirstInput,bool);
       itkGetMacro(UsePadFirstInput,bool);
       itkSetMacro(UsePadSecondInput,bool);
@@ -89,16 +89,16 @@ namespace otb {
 
       /** Image related typedefs. */
       itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension );
-      
+
       /** Type to use for computations. */
       // First Input
       typedef double                                                   RealType;
       typedef itk::VariableLengthVector<RealType>                      RealPixelType;
-      
-      
+
+
       /** Smart Pointer type to a DataObject. */
       typedef typename itk::DataObject::Pointer DataObjectPointer;
-      
+
       /** Type of DataObjects used for scalar outputs */
       typedef typename itk::Array<long>                     ArrayLongPixelType;
       typedef typename itk::VariableSizeMatrix<RealType>    MatrixType;
@@ -108,19 +108,19 @@ namespace otb {
       typedef itk::SimpleDataObjectDecorator<RealPixelType> RealPixelObjectType;
       typedef itk::SimpleDataObjectDecorator<PixelType>     PixelObjectType;
       typedef itk::SimpleDataObjectDecorator<MatrixType>    MatrixObjectType;
-      
-      
+
+
       /** Return the computed transpose(Image1)*Image2. */
       MatrixType GetResult() const { return this->GetResultOutput()->Get(); };
       MatrixObjectType* GetResultOutput();
       const MatrixObjectType* GetResultOutput() const;
-      
-      
+
+
       /** Make a DataObject of the correct type to be used as the specified
-       * output. 
+       * output.
        */
       virtual DataObjectPointer MakeOutput(unsigned int idx);
-      
+
       /** Pass the input through unmodified. Do this by Grafting in the
        *  AllocateOutputs method.
        */
@@ -144,7 +144,7 @@ namespace otb {
 	  else
 	    return( static_cast<const TInputImage *>(this->itk::ProcessObject::GetInput(0)) );
 	}
-      
+
       const TInputImage2* GetSecondInput()
 	{
 	  if( this->GetNumberOfInputs() < 2 )
@@ -154,18 +154,18 @@ namespace otb {
 	  else
 	    return( static_cast<const TInputImage2 *>(this->itk::ProcessObject::GetInput(1)) );
 	}
-      
+
     protected:
       PersistentMatrixTransposeMatrixImageFilter();
       ~PersistentMatrixTransposeMatrixImageFilter(){};
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
       /** Multi-thread version GenerateData. */
       virtual void  ThreadedGenerateData (const RegionType& outputRegionForThread,int threadId);
-      
+
     private:
       PersistentMatrixTransposeMatrixImageFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
+
       ArrayMatrixType  m_ThreadSum;
       bool             m_UsePadFirstInput;
       bool             m_UsePadSecondInput;
@@ -174,17 +174,17 @@ namespace otb {
       unsigned int m_NumberOfComponents1;
       unsigned int m_NumberOfComponents2;
     }; // end of class
-  
+
 /**===========================================================================*/
 
 /** \class StreamingMatrixTransposeMatrixImageFilter
  * \brief This class streams the whole input image through the PersistentMatrixTransposeMatrixImageFilter.
  *
  * This way, it allows to compute \f[X^T.Y \f] where \f[X\f] and \f[Y\f] are the input images.
- * first order global statistics of this image. It calls the Reset() method of the 
- * PersistentMatrixTransposeMatrixImageFilter before streaming the image and the 
+ * first order global statistics of this image. It calls the Reset() method of the
+ * PersistentMatrixTransposeMatrixImageFilter before streaming the image and the
  * Synthetize() method of the PersistentMatrixTransposeMatrixImageFilter after having streamed the image
- * to compute the statistics. The accessor on the results are wrapping the accessors of the 
+ * to compute the statistics. The accessor on the results are wrapping the accessors of the
  * internal PersistentStatisticsImageFilter. The accessor on the pad options are also provided.
  *
  * \sa PersistentMatrixTransposeMatrixImageFilter
@@ -212,14 +212,14 @@ public:
 
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(StreamingMatrixTransposeMatrixImageFilter,PersistentFilterStreamingDecorator);
 
   typedef typename Superclass::FilterType MatrixToTransposeMatrixFilterType;
   typedef typename MatrixToTransposeMatrixFilterType::MatrixType MatrixType;
   typedef itk::SimpleDataObjectDecorator<MatrixType> MatrixObjectType;
-  
+
   typedef TInputImage1 InputImage1Type;
   typedef TInputImage2 InputImage2Type;
 
@@ -249,9 +249,9 @@ public:
       return this->GetFilter()->GetUsePadSecondInput();
     }
   /** Return the computed transpose(Image1)*Image2. */
-  MatrixType GetResult(void) const 
-    { 
-      return this->GetResultOutput()->Get(); 
+  MatrixType GetResult(void) const
+    {
+      return this->GetResultOutput()->Get();
     }
   MatrixObjectType* GetResultOutput(void)
     {
@@ -266,7 +266,7 @@ public:
   StreamingMatrixTransposeMatrixImageFilter(){};
   /** Destructor */
   virtual ~StreamingMatrixTransposeMatrixImageFilter(){};
-  
+
  private:
   StreamingMatrixTransposeMatrixImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.txx b/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.txx
index 8e9299a950..5450ca73f3 100644
--- a/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingMatrixTransposeMatrixImageFilter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,18 +36,18 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 ::PersistentMatrixTransposeMatrixImageFilter()
 {
   this->SetNumberOfRequiredInputs(2);
-  
+
   // first output is a copy of the image, DataObject created by
   // superclass
   //
   // allocate the data objects for the outputs which are
   // just decorators around pixel types
-  
+
   typename ImageType::Pointer output1 = static_cast<ImageType*>(this->MakeOutput(0).GetPointer());
   this->itk::ProcessObject::SetNthOutput(0, output1.GetPointer());
   typename MatrixObjectType::Pointer output2 = static_cast<MatrixObjectType*>(this->MakeOutput(1).GetPointer());
   this->itk::ProcessObject::SetNthOutput(1, output2.GetPointer());
-  
+
   // false means no pad added
   m_UsePadFirstInput = false;
   m_UsePadSecondInput = false;
@@ -76,7 +76,7 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
       return static_cast<itk::DataObject*>(TInputImage::New().GetPointer());
       break;
     }
-    
+
 }
 template<class TInputImage, class TInputImage2>
 typename PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>::MatrixObjectType*
@@ -101,11 +101,11 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 ::GenerateInputRequestedRegion()
 {
   Superclass::GenerateInputRequestedRegion();
-  
+
   if ( this->GetFirstInput() && this->GetSecondInput() )
     {
       InputImagePointer image = const_cast< typename Superclass::InputImageType * >( this->GetFirstInput() );
-      InputImagePointer image2 = const_cast< typename Superclass::InputImageType * >( this->GetSecondInput() );    
+      InputImagePointer image2 = const_cast< typename Superclass::InputImageType * >( this->GetSecondInput() );
       image->SetRequestedRegion(this->GetOutput()->GetRequestedRegion());
       image2->SetRequestedRegion(this->GetOutput()->GetRequestedRegion());
     }
@@ -144,7 +144,7 @@ template<class TInputImage, class TInputImage2>
 void
 PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 ::Reset()
-{ 
+{
 
   TInputImage * inputPtr1 = const_cast<TInputImage * >(this->GetFirstInput());
   inputPtr1->UpdateOutputInformation();
@@ -159,7 +159,7 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
   if ( inputPtr1->GetLargestPossibleRegion().GetSize() !=  inputPtr2->GetLargestPossibleRegion().GetSize() )
     {
       itkExceptionMacro( <<" Can't multiply the transposed matrix of a "
-			 << inputPtr1->GetLargestPossibleRegion().GetSize() 
+			 << inputPtr1->GetLargestPossibleRegion().GetSize()
 			 << " and a "
 			 << inputPtr2->GetLargestPossibleRegion().GetSize()
 			 << " matrix " );
@@ -168,7 +168,7 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
   m_NumberOfComponents1 = inputPtr1->GetNumberOfComponentsPerPixel();
   m_NumberOfComponents2 = inputPtr2->GetNumberOfComponentsPerPixel();
   unsigned int numberOfThreads = this->GetNumberOfThreads();
-  
+
   if ( m_UsePadFirstInput == true )
     {
       m_NumberOfComponents1++;
@@ -185,7 +185,7 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 
   initMatrix.SetSize(m_NumberOfComponents2, m_NumberOfComponents2);
   initMatrix.Fill(itk::NumericTraits<RealType>::Zero);
-  this->GetResultOutput()->Set( initMatrix );  
+  this->GetResultOutput()->Set( initMatrix );
 }
 
 
@@ -200,7 +200,7 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
   MatrixType resultMatrix;
   resultMatrix.SetSize(m_NumberOfComponents1, m_NumberOfComponents2);
   resultMatrix.Fill(itk::NumericTraits<RealType>::Zero);
-  
+
 
   for( unsigned int thread = 0; thread < numberOfThreads; thread++)
     {
@@ -223,34 +223,34 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 template<class TInputImage, class TInputImage2>
 void
 PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
-::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId) 
+::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId)
 {
   /**
    * Grab the input
    */
   InputImagePointer input1Ptr = const_cast< TInputImage * >( this->GetFirstInput() );
   InputImagePointer input2Ptr = const_cast< TInputImage2 * >( this->GetSecondInput() );
-  
+
   // support progress methods/callbacks
-  itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());  
+  itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
   input1Ptr->SetRequestedRegion(outputRegionForThread);
   input2Ptr->SetRequestedRegion(outputRegionForThread);
   input1Ptr->PropagateRequestedRegion();
   input1Ptr->UpdateOutputData();
   input2Ptr->PropagateRequestedRegion();
-  input2Ptr->UpdateOutputData(); 
-  
-  itk::ImageRegionConstIterator<TInputImage> it1 (input1Ptr, outputRegionForThread); 
+  input2Ptr->UpdateOutputData();
+
+  itk::ImageRegionConstIterator<TInputImage> it1 (input1Ptr, outputRegionForThread);
   itk::ImageRegionConstIterator<TInputImage2> it2 (input2Ptr, outputRegionForThread);
   it1.GoToBegin();
   it2.GoToBegin();
-  
+
   // loop the second image and get one pixel a time
   while (!it1.IsAtEnd())
     {
       PixelType vectorValue1 = it1.Get();
       PixelType2 vectorValue2 = it2.Get();
-      
+
       // Add a first component to vectorValue2 and vectorValue1 filled with ones.
       if (m_UsePadFirstInput == true)
 	{
@@ -259,32 +259,32 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 	  for (unsigned int n=0; n<vectorValue1.Size(); n++)
 	    {
 		   vectortemp1[n+1] = vectorValue1[n];
-		   
+
 	    }
 	  vectorValue1.SetSize(vectortemp1.Size());
 	  vectorValue1 = vectortemp1;
 	}
-      
+
       if (m_UsePadSecondInput == true)
-	{ 
+	{
 	  PixelType2 vectortemp2(vectorValue2.Size()+1);
 	  vectortemp2[0] = 1;
 	  for (unsigned int m=0; m<vectorValue2.Size(); m++)
 	    {
 	      vectortemp2[m+1] = vectorValue2[m];
-	      
+
 	    }
 	  vectorValue2.SetSize(vectortemp2.Size());
 	  vectorValue2 = vectortemp2;
 	}
-      
+
       for (unsigned int i=0; i<vectorValue1.Size(); i++)
 	{
 	  for (unsigned int j=0; j<vectorValue2.Size(); j++)
 	    {
 	      m_ThreadSum[threadId](i, j) += static_cast<RealType>(vectorValue1[i])*static_cast<RealType>(vectorValue2[j]);
 	    }
-	  
+
 	}
       ++it1;
       ++it2;
@@ -293,12 +293,12 @@ PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 }
 
 template<class TInputImage, class TInputImage2>
-void 
+void
 PersistentMatrixTransposeMatrixImageFilter<TInputImage, TInputImage2>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os,indent);
-  
+
   os << indent << "Result: "  <<this->GetResultOutput()->Get()<< std::endl;
 }
 
diff --git a/Code/BasicFilters/otbStreamingResampleImageFilter.h b/Code/BasicFilters/otbStreamingResampleImageFilter.h
index 1d0127919a..24dc67ff45 100644
--- a/Code/BasicFilters/otbStreamingResampleImageFilter.h
+++ b/Code/BasicFilters/otbStreamingResampleImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
 /** \class StreamingResampleImageFilter
  * \brief Resample image filter
  *
- * This class add streaming aspect on it::ResampleImageFilter 
+ * This class add streaming aspect on it::ResampleImageFilter
  */
 
 template <class TInputImage, class TOutputImage, class TInterpolatorPrecisionType=double>
@@ -41,12 +41,12 @@ public:
   typedef itk::ResampleImageFilter< TInputImage, TOutputImage, TInterpolatorPrecisionType> Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-	
+
   /** Image related typedefs. */
   typedef typename TInputImage::Pointer InputImagePointer;
   typedef typename TOutputImage::Pointer OutputImagePointer;
-	
-	typedef typename TInputImage::IndexType IndexType;	
+
+	typedef typename TInputImage::IndexType IndexType;
 	typedef typename TInputImage::SizeType SizeType;
 
   /** Method for creation through the object factory. */
@@ -54,14 +54,14 @@ public:
 
    /** Run-time type information (and related methods). */
   itkTypeMacro(StreamingResampleImageFilter, itk::ResampleImageFilter);
-  
+
 	/** Type definitions */
   typedef typename TInputImage::PixelType InputPixelType;
   typedef typename TOutputImage::PixelType OutputPixelType;
-	
+
 	typedef typename TInputImage::RegionType InputImageRegionType;
   typedef typename TOutputImage::RegionType OutputImageRegionType;
-	
+
 	typedef typename Superclass::InterpolatorType InterpolatorType;
 	typedef typename InterpolatorType::PointType  PointType;
 
@@ -75,23 +75,23 @@ public:
    * the output requested region.  As such, ResampleImageFilter needs
    * to provide an implementation for GenerateInputRequestedRegion()
    * in order to inform the pipeline execution model.
-   * \sa ProcessObject::GenerateInputRequestedRegion() 
+   * \sa ProcessObject::GenerateInputRequestedRegion()
 	 */
   virtual void GenerateInputRequestedRegion() ;
-	
+
 protected:
   StreamingResampleImageFilter();
   virtual ~StreamingResampleImageFilter() {};
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-	
+
 
 private:
   StreamingResampleImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-	
+
 	// Determine size of pad needed for interpolators neighborhood
 	unsigned int m_InterpolatorNeighborhoodRadius;
-	
+
 	// Used to be sure that each final region will be contiguous
 	unsigned int m_AddedRadius;
 
@@ -103,5 +103,5 @@ private:
 #include "otbStreamingResampleImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/BasicFilters/otbStreamingResampleImageFilter.txx b/Code/BasicFilters/otbStreamingResampleImageFilter.txx
index 3cffa74290..9bf7790f69 100644
--- a/Code/BasicFilters/otbStreamingResampleImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingResampleImageFilter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType
 StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType>
 ::StreamingResampleImageFilter()
 {
-  
+
   // Default neighborhood interpolation radius is one pixel
   m_InterpolatorNeighborhoodRadius = 1 ;
 	m_AddedRadius = 2;
@@ -50,118 +50,118 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
 ::GenerateInputRequestedRegion()
 {
 	Superclass::GenerateInputRequestedRegion();
-  
+
 	if ( this->GetInput() )
   {
 		otbMsgDevMacro(<< "-------------- GenerateInputRequestedRegion	---------------" << std::endl);
-		
+
 		InputImagePointer inputImage = const_cast< typename Superclass::InputImageType *>( this->GetInput() );
     OutputImagePointer outputImage = const_cast< typename Superclass::OutputImageType *>( this->GetOutput() );
 
     IndexType index = outputImage->GetRequestedRegion().GetIndex();
     SizeType size = outputImage->GetRequestedRegion().GetSize();
-		
+
 		// Obtain coordinates of upperleft, upperright, lowerleft and lowerright points in the image
 		IndexType indexTmp ;
 		std::vector<IndexType> vPoints;
 		typename std::vector<IndexType>::iterator it;
-		  		
+
 		otbMsgDevMacro(<< "Size : " << size[0] << " " << size[1]);
-		
+
 		indexTmp[0]=index[0];
-		indexTmp[1]=index[1]; 
-		vPoints.push_back(indexTmp); 
+		indexTmp[1]=index[1];
+		vPoints.push_back(indexTmp);
 		//otbGenericMsgDebugMacro(<< "indexUL : (" << indexTmp[0] << "," << indexTmp[1] << ")");
 
 		indexTmp[0]=index[0]+size[0];
-		indexTmp[1]=index[1];  
-		vPoints.push_back(indexTmp); 
+		indexTmp[1]=index[1];
+		vPoints.push_back(indexTmp);
 		//otbGenericMsgDebugMacro(<< "indexUR : (" << indexTmp[0] << "," << indexTmp[1] << ")");
-		
+
 		indexTmp[0]=index[0]+size[0];
-		indexTmp[1]=index[1]+size[1]; 
-		vPoints.push_back(indexTmp); 
+		indexTmp[1]=index[1]+size[1];
+		vPoints.push_back(indexTmp);
 		//otbGenericMsgDebugMacro(<< "indexLR : (" << indexTmp[0] << "," << indexTmp[1] << ")");
-		
+
 		indexTmp[0]=index[0];
-		indexTmp[1]=index[1]+size[1];  
-		vPoints.push_back(indexTmp); 
+		indexTmp[1]=index[1]+size[1];
+		vPoints.push_back(indexTmp);
 		//otbGenericMsgDebugMacro(<< "indexLL : (" << indexTmp[0] << "," << indexTmp[1] << ")");
 
 		typedef itk::ContinuousIndex<TInterpolatorPrecisionType, 2> ContinuousIndexType;
 		typename ContinuousIndexType::ValueType minX = itk::NumericTraits<typename ContinuousIndexType::ValueType>::max();
 		typename ContinuousIndexType::ValueType maxX = 0;
 		typename ContinuousIndexType::ValueType minY = itk::NumericTraits<typename ContinuousIndexType::ValueType>::max();
-		typename ContinuousIndexType::ValueType maxY = 0;	
+		typename ContinuousIndexType::ValueType maxY = 0;
 
 		// Coordinates of current output pixel
-		PointType outputPoint;         
+		PointType outputPoint;
 	  PointType inputPoint;
-		
+
 		// Transform each "corner" point
 		for (it = vPoints.begin(); it != vPoints.end(); it++)
 		{
 			ContinuousIndexType indexTmpTr;
-			
+
 			// Calculate transformed points needed for previous filter in the pipeline
 //			std::cout << "Origin : " << outputImage->GetOrigin() << std::endl;
 //			std::cout << "Spacing : " << outputImage->GetSpacing() << std::endl;
-			
+
 			outputImage->TransformIndexToPhysicalPoint( *it, outputPoint );
 
       otbMsgDevMacro(<< "Ncurrent Index :(" << (*it)[0]<<","<< (*it)[1] << ")"<<  std::endl
-                << "Physical point: ("<<  outputPoint[0]<< ","<<  outputPoint[1]<< ")"); 
+                << "Physical point: ("<<  outputPoint[0]<< ","<<  outputPoint[1]<< ")");
 
     	// Compute corresponding input pixel continuous index
     	inputPoint = this->GetTransform()->TransformPoint(outputPoint);
      	inputImage->TransformPhysicalPointToContinuousIndex(inputPoint, indexTmpTr);
-	
+
 	    otbMsgDevMacro(<< " -> Point Index:" << std::endl
                  << indexTmpTr[0] << ","<< indexTmpTr[1] );
-		
+
 			if (indexTmpTr[0]>maxX)
 				maxX = indexTmpTr[0];
-			
+
 			if (indexTmpTr[0]<minX)
 				minX = indexTmpTr[0];
-			
+
 			if (indexTmpTr[1]>maxY)
 				maxY = indexTmpTr[1];
-			
+
 			if (indexTmpTr[1]<minY)
 				minY = indexTmpTr[1];
-	
+
 			//otbGenericMsgDebugMacro(<< "indexTr : (" << indexTmpTr[0] << "," << indexTmpTr[1] << ")");
 		}
-		
+
 		otbMsgDevMacro(<< "MinX : " << minX << " MinY : " << minY << " MaxX : " << maxX << " MaxY " << maxY);
-		
+
 		// Create region needed in previous filter in the pipeline, which is the bounding box of previous transformed points
     InputImageRegionType region;
 		index[0] = static_cast<long int>(minX);
 		index[1] = static_cast<long int>(minY);
 		size[0] = static_cast<long unsigned int>(maxX - minX);
 		size[1] = static_cast<long unsigned int>(maxY - minY);
-		
+
 		otbMsgDevMacro(<< "Index : (" << index[0] << "," << index[1] << ") Size : (" << size[0] << "," << size[1] << ")");
-					
+
     region.SetSize(size);
     region.SetIndex(index);
-		
+
 		// Grow region to be sure that interpolator can found needed point on image borders
 		unsigned int neededRadius =	StreamingTraits<typename Superclass::InputImageType>::CalculateNeededRadiusForInterpolator(this->GetInterpolator());
-		
+
 		if (neededRadius == 0)
 		{
 			itkGenericOutputMacro(<< "If you haven't fixed interpolator radius,	default is 1");
 			neededRadius = m_InterpolatorNeighborhoodRadius;
 		}
-		
+
 		otbMsgDevMacro(<< "Interpolation needed radius : " << neededRadius);
 		region.PadByRadius(neededRadius+m_AddedRadius);
-		
+
 		otbMsgDevMacro(<< "Initial Region : Index(" << inputImage->GetLargestPossibleRegion().GetIndex()[0] << "," << inputImage->GetLargestPossibleRegion().GetIndex()[1] << ") Size(" <<	inputImage->GetLargestPossibleRegion().GetSize()[0] << "," << inputImage->GetLargestPossibleRegion().GetSize()[1] << ")");
-		
+
 		// To be sure that requested region in pipeline is not largest than real input image
 		otbMsgDevMacro(<< "Final Region (Before Crop) : Index(" << region.GetIndex()[0] << "," << region.GetIndex()[1] << ") Size(" <<	region.GetSize()[0] << "," << region.GetSize()[1] << ")");
 
@@ -175,9 +175,9 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
 			region.SetIndex(index);
 			region.SetSize(size);
 		}
-		
+
 		inputImage->SetRequestedRegion(region);
-		
+
 		otbMsgDevMacro(<< "Final Region (After  Crop) : Index(" << region.GetIndex()[0] << "," << region.GetIndex()[1] << ") Size(" <<	region.GetSize()[0] << "," << region.GetSize()[1] << ")");
   }
 }
@@ -185,7 +185,7 @@ StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType
 
 
 template<class TInputImage, class TOutputImage, class TInterpolatorPrecisionType>
-void 
+void
 StreamingResampleImageFilter<TInputImage,TOutputImage,TInterpolatorPrecisionType>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/BasicFilters/otbStreamingShrinkImageFilter.h b/Code/BasicFilters/otbStreamingShrinkImageFilter.h
index 2cc32cccc6..f879a31b8f 100644
--- a/Code/BasicFilters/otbStreamingShrinkImageFilter.h
+++ b/Code/BasicFilters/otbStreamingShrinkImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,17 +26,17 @@ namespace otb
   /** \class StreamingShrinkImageFilter
    *  \brief This class performs a streaming isotropic shrinking operation without smoothing.
    *
-   * It is intended to be used where a fast quicklook generation is needed for huge images 
+   * It is intended to be used where a fast quicklook generation is needed for huge images
    * (for instance for visualization applications).
    *
-   * It computes the size of the output according to the size of the input image, a read only 
-   * the strip of the input image needed to build a line of the output image. In this strip, 
-   * the pixel are directly selected and passed to the output image. 
+   * It computes the size of the output according to the size of the input image, a read only
+   * the strip of the input image needed to build a line of the output image. In this strip,
+   * the pixel are directly selected and passed to the output image.
    *
-   * For example, with a 6000X6000 image and a 10 shrinkFactor, it will read 600 lines of 5990 pixels 
+   * For example, with a 6000X6000 image and a 10 shrinkFactor, it will read 600 lines of 5990 pixels
    * instead of the whole image.
    */
-template <class TInputImage,class TOutputImage> 
+template <class TInputImage,class TOutputImage>
 class ITK_EXPORT StreamingShrinkImageFilter
 : public itk::ImageToImageFilter<TInputImage,TOutputImage>
 {
@@ -46,24 +46,24 @@ class ITK_EXPORT StreamingShrinkImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage>   Superclass;
   typedef itk::SmartPointer<Self>                  Pointer;
   typedef itk::SmartPointer<const Self>            ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkNewMacro(Self);
-  
+
   /** Type macro */
   itkTypeMacro(StreamingShrinkImageFilter,ImageToImageFilter);
-  
+
   /** Template parameter typedefs */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::Pointer InputImagePointerType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointerType;
-  
+
   /** Shrink factor accessor */
   itkSetMacro(ShrinkFactor,unsigned int);
   itkGetMacro(ShrinkFactor, unsigned int);
 
-  /** 
+  /**
    * StreamingShrinkImageFilter produces an ouptut whose size is different from its input.
    * As such, it must override the GenerateOutputInformation method in order to compute
    * the output size from the input size.
@@ -73,7 +73,7 @@ class ITK_EXPORT StreamingShrinkImageFilter
   virtual void GenerateInputRequestedRegion(void);
   /** Main computation method */
   virtual void UpdateOutputData(itk::DataObject *itkNotUsed(output));
-  
+
  protected:
   /** Constructor */
   StreamingShrinkImageFilter();
@@ -81,7 +81,7 @@ class ITK_EXPORT StreamingShrinkImageFilter
   ~StreamingShrinkImageFilter();
   /** PrintSelf method */
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
  private:
   StreamingShrinkImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/BasicFilters/otbStreamingShrinkImageFilter.txx b/Code/BasicFilters/otbStreamingShrinkImageFilter.txx
index c8231b7c1e..773da00d23 100644
--- a/Code/BasicFilters/otbStreamingShrinkImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingShrinkImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ template <class TInputImage, class TOutputImage>
 StreamingShrinkImageFilter<TInputImage, TOutputImage>
 ::~StreamingShrinkImageFilter()
 {}
-/** 
+/**
  * StreamingShrinkImageFilter produces an output whose size is different from its input.
  * As such, it must override the GenerateOutputInformation method in order to compute
  * the output size from the input size.
@@ -140,18 +140,18 @@ StreamingShrinkImageFilter<TInputImage, TOutputImage>
    */
   this->InvokeEvent(itk::StartEvent());
   /**
-   * Allocate the output buffer. 
+   * Allocate the output buffer.
    */
   OutputImagePointerType outputPtr = this->GetOutput(0);
   typename OutputImageType::RegionType outputRegion = outputPtr->GetRequestedRegion();
   outputPtr->SetBufferedRegion( outputRegion );
   outputPtr->Allocate();
-  
+
   /**
    * Grab the input
    */
   InputImagePointerType inputPtr =  const_cast<InputImageType * >( this->GetInput(0) );
-  
+
   // otbMsgDebugMacro(<<"Input Largest possible region: "<<inputPtr->GetLargestPossibleRegion());
   typename InputImageType::IndexType origin = inputPtr->GetLargestPossibleRegion().GetIndex();
 
@@ -160,7 +160,7 @@ StreamingShrinkImageFilter<TInputImage, TOutputImage>
 
   OutputIteratorType it(outputPtr,outputRegion);
   it.GoToBegin();
-  
+
   typename OutputImageType::SizeType size = outputRegion.GetSize();
 
   for(unsigned int i=0;i<size[1]&&!it.IsAtEnd();++i)
@@ -209,12 +209,12 @@ StreamingShrinkImageFilter<TInputImage, TOutputImage>
   if (this->GetOutput(0))
       {
 	this->GetOutput(0)->DataHasBeenGenerated();
-      }  
+      }
   /**
    * Release any inputs if marked for release
    */
   this->ReleaseInputs();
-  
+
   // Mark that we are no longer updating the data in this filter
   this->m_Updating = false;
 }
diff --git a/Code/BasicFilters/otbStreamingStatisticsImageFilter.h b/Code/BasicFilters/otbStreamingStatisticsImageFilter.h
index da875f8215..a38a2e8a82 100644
--- a/Code/BasicFilters/otbStreamingStatisticsImageFilter.h
+++ b/Code/BasicFilters/otbStreamingStatisticsImageFilter.h
@@ -13,8 +13,8 @@ Some parts of this code are derived from ITK. See ITKCopyright.txt
 for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -35,7 +35,7 @@ namespace otb {
    *  This filter persists its temporary data. It means that if you Update it n times on n different
    * requested regions, the output statistics will be the statitics of the whole set of n regions.
    *
-   * To reset the temporary data, one should call the Reset() function. 
+   * To reset the temporary data, one should call the Reset() function.
    *
    * To get the statistics once the regions have been processed via the pipeline, use the Synthetize() method.
    *
@@ -68,11 +68,11 @@ namespace otb {
       typedef typename TInputImage::RegionType RegionType;
       typedef typename TInputImage::SizeType   SizeType;
       typedef typename TInputImage::IndexType  IndexType;
-      typedef typename TInputImage::PixelType  PixelType;  
-  
+      typedef typename TInputImage::PixelType  PixelType;
+
       itkStaticConstMacro(InputImageDimension, unsigned int,
 			  TInputImage::ImageDimension);
- 
+
       /** Image related typedefs. */
       itkStaticConstMacro(ImageDimension, unsigned int,
 			  TInputImage::ImageDimension );
@@ -139,7 +139,7 @@ namespace otb {
       PersistentStatisticsImageFilter();
       ~PersistentStatisticsImageFilter(){};
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
- 
+
       /** Multi-thread version GenerateData. */
       void  ThreadedGenerateData (const RegionType&
 				  outputRegionForThread,
@@ -162,9 +162,9 @@ namespace otb {
    * \brief This class streams the whole input image through the PersistentStatisticsImageFilter.
    *
    * This way, it allows to compute the first order global statistics of this image. It calls the
-   * Reset() method of the PersistentStatisticsImageFilter before streaming the image and the 
+   * Reset() method of the PersistentStatisticsImageFilter before streaming the image and the
    * Synthetize() method of the PersistentStatisticsImageFilter after having streamed the image
-   * to compute the statistics. The accessor on the results are wrapping the accessors of the 
+   * to compute the statistics. The accessor on the results are wrapping the accessors of the
    * internal PersistentStatisticsImageFilter.
    *
    * This filter can be used as:
@@ -176,7 +176,7 @@ namespace otb {
    * std::cout << statistics-> GetMaximum() << std::endl;
    * std::cout << statistics-> GetMinimum() << std::endl;
    * \endcode
-   * 
+   *
    * \sa PersistentStatisticsImageFilter
    * \sa PersistentImageFilter
    * \sa PersistentFilterStreamingDecorator
@@ -200,7 +200,7 @@ namespace otb {
 
       /** Type macro */
       itkNewMacro(Self);
-  
+
       /** Creation through object factory macro */
       itkTypeMacro(StreamingStatisticsImageFilter,PersistentFilterStreamingDecorator);
 
@@ -208,11 +208,11 @@ namespace otb {
       typedef typename StatFilterType::PixelType PixelType;
       typedef typename StatFilterType::RealType RealType;
       typedef TInputImage InputImageType;
-  
+
       /** Type of DataObjects used for scalar outputs */
       typedef itk::SimpleDataObjectDecorator<RealType>  RealObjectType;
       typedef itk::SimpleDataObjectDecorator<PixelType> PixelObjectType;
-  
+
       void SetInput(InputImageType * input)
 	{
 	  this->GetFilter()->SetInput(input);
@@ -220,8 +220,8 @@ namespace otb {
 
       /** Return the computed Minimum. */
       PixelType GetMinimum() const
-	{ 
-	  return this->GetFilter()->GetMinimumOutput()->Get(); 
+	{
+	  return this->GetFilter()->GetMinimumOutput()->Get();
 	}
       PixelObjectType* GetMinimumOutput()
 	{
@@ -233,8 +233,8 @@ namespace otb {
 	}
       /** Return the computed Maximum. */
       PixelType GetMaximum() const
-	{ 
-	  return this->GetFilter()->GetMaximumOutput()->Get(); 
+	{
+	  return this->GetFilter()->GetMaximumOutput()->Get();
 	}
       PixelObjectType* GetMaximumOutput()
 	{
@@ -246,8 +246,8 @@ namespace otb {
 	}
       /** Return the computed Mean. */
       RealType GetMean() const
-	{ 
-	  return this->GetFilter()->GetMeanOutput()->Get(); 
+	{
+	  return this->GetFilter()->GetMeanOutput()->Get();
 	}
       RealObjectType* GetMeanOutput()
 	{
@@ -257,11 +257,11 @@ namespace otb {
 	{
 	  return this->GetFilter()->GetMeanOutput();
 	}
-  
+
       /** Return the computed Standard Deviation. */
       RealType GetSigma() const
-	{ 
-	  return this->GetSigmaOutput()->Get(); 
+	{
+	  return this->GetSigmaOutput()->Get();
 	}
       RealObjectType* GetSigmaOutput()
 	{
@@ -271,11 +271,11 @@ namespace otb {
 	{
 	  return this->GetFilter()->GetSigmaOutput();
 	}
-  
+
       /** Return the computed Variance. */
       RealType GetVariance() const
-	{ 
-	  return this->GetFilter()->GetVarianceOutput()->Get(); 
+	{
+	  return this->GetFilter()->GetVarianceOutput()->Get();
 	}
       RealObjectType* GetVarianceOutput()
 	{
@@ -288,8 +288,8 @@ namespace otb {
 
       /** Return the compute Sum. */
       RealType GetSum() const
-	{ 
-	  return this->GetFilter()->GetSumOutput()->Get(); 
+	{
+	  return this->GetFilter()->GetSumOutput()->Get();
 	}
       RealObjectType* GetSumOutput()
 	{
@@ -306,7 +306,7 @@ namespace otb {
       StreamingStatisticsImageFilter(){};
       /** Destructor */
       virtual ~StreamingStatisticsImageFilter(){};
-  
+
     private:
       StreamingStatisticsImageFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
diff --git a/Code/BasicFilters/otbStreamingStatisticsImageFilter.txx b/Code/BasicFilters/otbStreamingStatisticsImageFilter.txx
index 3472051e91..fbe23c2d01 100644
--- a/Code/BasicFilters/otbStreamingStatisticsImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingStatisticsImageFilter.txx
@@ -13,8 +13,8 @@ Some parts of this code are derived from ITK. See ITKCopyright.txt
 for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -231,7 +231,7 @@ namespace otb {
     int i;
     long count;
     RealType sumOfSquares;
-    
+
     int numberOfThreads = this->GetNumberOfThreads();
 
     PixelType minimum;
@@ -240,7 +240,7 @@ namespace otb {
     RealType  sigma;
     RealType  variance;
     RealType  sum;
-  
+
     sum = sumOfSquares = itk::NumericTraits<RealType>::Zero;
     count = 0;
 
@@ -286,14 +286,14 @@ namespace otb {
   ::Reset()
   {
     int numberOfThreads = this->GetNumberOfThreads();
-    
+
     // Resize the thread temporaries
     m_Count.SetSize(numberOfThreads);
     m_SumOfSquares.SetSize(numberOfThreads);
     m_ThreadSum.SetSize(numberOfThreads);
     m_ThreadMin.SetSize(numberOfThreads);
     m_ThreadMax.SetSize(numberOfThreads);
-    
+
     // Initialize the temporaries
     m_Count.Fill(itk::NumericTraits<long>::Zero);
     m_ThreadSum.Fill(itk::NumericTraits<RealType>::Zero);
@@ -307,7 +307,7 @@ namespace otb {
   void
   PersistentStatisticsImageFilter<TInputImage>
   ::ThreadedGenerateData(const RegionType& outputRegionForThread,
-			 int threadId) 
+			 int threadId)
   {
     /**
      * Grab the input
@@ -320,7 +320,7 @@ namespace otb {
     PixelType value;
 
     itk::ImageRegionConstIterator<TInputImage> it (inputPtr, outputRegionForThread);
-      
+
     it.GoToBegin();
     // do the work
     while (!it.IsAtEnd())
@@ -335,7 +335,7 @@ namespace otb {
 	  {
 	    m_ThreadMax[threadId] = value;
 	  }
-	  
+
 	m_ThreadSum[threadId] += realValue;
 	m_SumOfSquares[threadId] += (realValue * realValue);
 	m_Count[threadId]++;
@@ -344,7 +344,7 @@ namespace otb {
       }
   }
 template <class TImage>
-void 
+void
 PersistentStatisticsImageFilter<TImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.h b/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.h
index cf71a5f279..8b02faebeb 100644
--- a/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.h
+++ b/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANT2ABILITY or FITNESS FOR A PARTICULAR 
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANT2ABILITY or FITNESS FOR A PARTICULAR
      PURPOSE.  See the above copyright notices for more information.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ namespace otb {
  *  This filter persists its temporary data. It means that if you Update it n times on n different
  * requested regions, the output statistics will be the statitics of the whole set of n regions.
  *
- * To reset the temporary data, one should call the Reset() function. 
+ * To reset the temporary data, one should call the Reset() function.
  *
  * To get the statistics once the regions have been processed via the pipeline, use the Synthetize() method.
  *
@@ -60,13 +60,13 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
     typedef PersistentImageFilter<TInputImage,TInputImage>  Superclass;
     typedef itk::SmartPointer<Self>                           Pointer;
     typedef itk::SmartPointer<const Self>                     ConstPointer;
-    
+
     /** Method for creation through the object factory. */
     itkNewMacro(Self);
-    
+
     /** Runtime information support. */
     itkTypeMacro(PersistentStatisticsVectorImageFilter,PersistentImageFilter);
-    
+
     /** Image related typedefs. */
     typedef TInputImage                                                            ImageType;
     typedef typename TInputImage::Pointer                                          InputImagePointer;
@@ -75,19 +75,19 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
     typedef typename TInputImage::IndexType                                        IndexType;
     typedef typename TInputImage::PixelType                                        PixelType;
     typedef typename TInputImage::InternalPixelType                                InternalPixelType;
-  
+
     itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
-    
+
        /** Image related typedefs. */
     itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension );
-    
+
     /** Type to use for computations. */
     typedef typename itk::NumericTraits<InternalPixelType>::RealType RealType;
     typedef itk::VariableLengthVector<RealType>                      RealPixelType;
-    
+
     /** Smart Pointer type to a DataObject. */
     typedef typename itk::DataObject::Pointer DataObjectPointer;
-    
+
     /** Type of DataObjects used for scalar outputs */
     typedef typename itk::VariableSizeMatrix<RealType>    MatrixType;
     typedef typename std::vector<MatrixType>              ArrayMatrixType;
@@ -103,12 +103,12 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
     PixelType GetMinimum() const { return this->GetMinimumOutput()->Get(); };
     PixelObjectType* GetMinimumOutput();
     const PixelObjectType* GetMinimumOutput() const;
-    
+
     /** Return the computed Maximum. */
     PixelType GetMaximum() const { return this->GetMaximumOutput()->Get(); };
     PixelObjectType* GetMaximumOutput();
     const PixelObjectType* GetMaximumOutput() const;
-    
+
     /** Return the computed Mean. */
     RealPixelType GetMean() const { return this->GetMeanOutput()->Get(); };
     RealPixelObjectType* GetMeanOutput();
@@ -118,7 +118,7 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
     RealPixelType GetSum() const { return this->GetSumOutput()->Get(); };
     RealPixelObjectType* GetSumOutput();
     const RealPixelObjectType* GetSumOutput() const;
-    
+
     /** Return the computed Covariance. */
     MatrixType GetCovariance() const { return this->GetCovarianceOutput()->Get(); };
     MatrixObjectType* GetCovarianceOutput();
@@ -126,10 +126,10 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
 
 
     /** Make a DataObject of the correct type to be used as the specified
-     * output. 
+     * output.
      */
     virtual DataObjectPointer MakeOutput(unsigned int idx);
-    
+
     /** Pass the input through unmodified. Do this by Grafting in the
      *  AllocateOutputs method.
      */
@@ -144,11 +144,11 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
     virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
      /** Multi-thread version GenerateData. */
     void  ThreadedGenerateData (const RegionType& outputRegionForThread,int threadId);
-    
+
   private:
     PersistentStatisticsVectorImageFilter(const Self&); //purposely not implemented
     void operator=(const Self&); //purposely not implemented
-    
+
     ArrayRealPixelType m_ThreadSum;
     ArrayLongPixelType m_Count;
     ArrayPixelType     m_ThreadMin;
@@ -163,9 +163,9 @@ class ITK_EXPORT PersistentStatisticsVectorImageFilter :
  * \brief This class streams the whole input image through the PersistentStatisticsImageFilter.
  *
  * This way, it allows to compute the first order global statistics of this image. It calls the
- * Reset() method of the PersistentStatisticsImageFilter before streaming the image and the 
+ * Reset() method of the PersistentStatisticsImageFilter before streaming the image and the
  * Synthetize() method of the PersistentStatisticsImageFilter after having streamed the image
- * to compute the statistics. The accessor on the results are wrapping the accessors of the 
+ * to compute the statistics. The accessor on the results are wrapping the accessors of the
  * internal PersistentStatisticsImageFilter.
  *
  * \sa PersistentStatisticsVectorImageFilter
@@ -192,7 +192,7 @@ public:
 
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(StreamingStatisticsVectorImageFilter,PersistentFilterStreamingDecorator);
 
@@ -207,14 +207,14 @@ public:
   typedef typename StatFilterType::ArrayRealPixelType ArrayRealPixelType;
   typedef typename StatFilterType::ArrayPixelType ArrayPixelType;
 
-  
-  
-  
+
+
+
   /** Type of DataObjects used for scalar outputs */
   typedef typename StatFilterType::RealPixelObjectType RealPixelObjectType;
   typedef typename StatFilterType::PixelObjectType PixelObjectType;
   typedef typename StatFilterType::MatrixObjectType MatrixObjectType;
- 
+
   void SetInput(TInputImage * input)
     {
       this->GetFilter()->SetInput(input);
@@ -229,23 +229,23 @@ public:
   PixelType GetMinimum() const { return this->GetFilter()->GetMinimumOutput()->Get(); };
   PixelObjectType* GetMinimumOutput(){ return this->GetFilter()->MinimumOutput(); };
   const PixelObjectType* GetMinimumOutput() const{ return this->GetFilter()->MinimumOutput(); };
-  
+
   /** Return the computed Maximum. */
   PixelType GetMaximum() const { return this->GetFilter()->GetMaximumOutput()->Get(); };
   PixelObjectType* GetMaximumOutput(){ return this->GetFilter()->MaximumOutput(); };
   const PixelObjectType* GetMaximumOutput() const{ return this->GetFilter()->MaximumOutput(); };
-  
-  
+
+
   /** Return the computed Mean. */
   RealPixelType GetMean() const { return this->GetFilter()->GetMeanOutput()->Get(); };
   RealPixelObjectType* GetMeanOutput(){ return this->GetFilter()->GetMeanOutput(); };
   const RealPixelObjectType* GetMeanOutput() const {return this->GetFilter()->GetMeanOutput();};
-  
+
   /** Return the compute Sum. */
   RealPixelType GetSum() const { return this->GetFilter()->GetSumOutput()->Get(); };
   RealPixelObjectType* GetSumOutput(){ return this->GetFilter()->GetSumOutput();};
   const RealPixelObjectType* GetSumOutput() const {return this->GetFilter()->GetSumOutput();};
-  
+
   /** Return the computed Covariance. */
   MatrixType GetCovariance() const { return this->GetFilter()->GetCovarianceOutput()->Get(); };
   MatrixObjectType* GetCovarianceOutput(){ return this->GetFilter()->GetCovarianceOutput(); };
@@ -256,7 +256,7 @@ public:
   StreamingStatisticsVectorImageFilter(){};
   /** Destructor */
   virtual ~StreamingStatisticsVectorImageFilter(){};
-  
+
 private:
   StreamingStatisticsVectorImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx b/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx
index a5eb349c8b..ffabb6045c 100644
--- a/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx
+++ b/Code/BasicFilters/otbStreamingStatisticsVectorImageFilter.txx
@@ -13,8 +13,8 @@ Some parts of this code are derived from ITK. See ITKCopyright.txt
 for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -39,16 +39,16 @@ namespace otb {
     //
     // allocate the data objects for the outputs which are
     // just decorators around pixel types
-  
+
     for (int i=1; i < 3; ++i)
       {
 	typename PixelObjectType::Pointer output = static_cast<PixelObjectType*>(this->MakeOutput(i).GetPointer());
 	this->itk::ProcessObject::SetNthOutput(i, output.GetPointer());
       }
-  
+
     // allocate the data objects for the outputs which are
     // just decorators around real types
-  
+
     for (int i=3; i < 5; ++i)
       {
 	typename RealPixelObjectType::Pointer output = static_cast<RealPixelObjectType*>(this->MakeOutput(i).GetPointer());
@@ -87,7 +87,7 @@ namespace otb {
 	return static_cast<itk::DataObject*>(TInputImage::New().GetPointer());
 	break;
       }
-    
+
   }
 
 
@@ -184,7 +184,7 @@ namespace otb {
       {
 	this->GetOutput()->CopyInformation(this->GetInput());
 	this->GetOutput()->SetLargestPossibleRegion(this->GetInput()->GetLargestPossibleRegion());
-      
+
 	if(this->GetOutput()->GetRequestedRegion().GetNumberOfPixels()==0)
 	  {
 	    this->GetOutput()->SetRequestedRegion(this->GetOutput()->GetLargestPossibleRegion());
@@ -208,7 +208,7 @@ namespace otb {
   void
   PersistentStatisticsVectorImageFilter<TInputImage>
   ::Reset()
-  { 
+  {
     TInputImage * inputPtr = const_cast<TInputImage * >(this->GetInput());
     inputPtr->UpdateOutputInformation();
 
@@ -260,13 +260,13 @@ namespace otb {
   void
   PersistentStatisticsVectorImageFilter<TInputImage>
   ::Synthetize()
-  { 
+  {
     int i;
     long count;
 
     int numberOfThreads = this->GetNumberOfThreads();
     unsigned int numberOfComponent = this->GetInput()->GetNumberOfComponentsPerPixel();
-  
+
     PixelType minimumVector;
     minimumVector.SetSize( numberOfComponent );
     minimumVector.Fill(itk::NumericTraits<InternalPixelType>::max());
@@ -287,7 +287,7 @@ namespace otb {
     count = 0;
 
     // Find the min/max over all threads and accumulate count, sum and
-    // sum of squares 
+    // sum of squares
     for( i = 0; i < numberOfThreads; i++)
       {
 	count += m_Count[i];
@@ -296,21 +296,21 @@ namespace otb {
 	 * crossedMatrix += m_XX[i];
 	 **/
 	if( (m_XX[i].Rows() != crossedMatrix.Rows()) || (m_XX[i].Cols() != crossedMatrix.Cols()))
-	  { 
-	    itkExceptionMacro( << "Matrix with size (" << m_XX[i].Rows() << "," << 
+	  {
+	    itkExceptionMacro( << "Matrix with size (" << m_XX[i].Rows() << "," <<
 			       m_XX[i].Cols() << ") cannot be subtracted from matrix with size (" <<
 			       crossedMatrix.Rows() << "," << crossedMatrix.Cols() );
 	  }
-      
-	for( unsigned int r=0; r<m_XX[i].Rows(); r++) 
+
+	for( unsigned int r=0; r<m_XX[i].Rows(); r++)
 	  {
-	    for( unsigned int c=0; c<m_XX[i].Cols(); c++ ) 
+	    for( unsigned int c=0; c<m_XX[i].Cols(); c++ )
 	      {
 		crossedMatrix(r,c) += m_XX[i](r,c);
 	      }
 	  }
 	//**** END TODO ****
-  
+
 	for (unsigned int j=0; j<numberOfComponent; j++)
 	  {
 	    sumVector[j] += m_ThreadSum[i][j];
@@ -330,7 +330,7 @@ namespace otb {
 	// compute statistics
 	meanVector[j] = sumVector[j] / static_cast<RealType>(count);
       }
-  
+
     // Compute Matrix Covariance
     MatrixType pixelSumMatrix;
     pixelSumMatrix.SetSize(static_cast<unsigned int>(numberOfComponent), 1);
@@ -344,8 +344,8 @@ namespace otb {
     covMatrix.SetSize(static_cast<unsigned int>(numberOfComponent), static_cast<unsigned int>(numberOfComponent));
     covMatrixTemp.SetSize(static_cast<unsigned int>(numberOfComponent), static_cast<unsigned int>(numberOfComponent));
     tempTranspose.SetSize(1, static_cast<unsigned int>(numberOfComponent));
-  
-    covMatrix = crossedMatrix/static_cast<RealType>(count); 
+
+    covMatrix = crossedMatrix/static_cast<RealType>(count);
     pixelSumMatrix/=static_cast<RealType>(count);
     tempTranspose = pixelSumMatrix.GetTranspose();
     covMatrixTemp = pixelSumMatrix*tempTranspose;
@@ -354,15 +354,15 @@ namespace otb {
      *covMatrix -= covMatrixTemp;
      **/
     if( (covMatrix.Rows() != covMatrixTemp.Rows()) || (covMatrix.Cols() != covMatrixTemp.Cols()))
-      { 
-	itkExceptionMacro( << "Matrix with size (" << covMatrix.Rows() << "," << 
+      {
+	itkExceptionMacro( << "Matrix with size (" << covMatrix.Rows() << "," <<
 			   covMatrix.Cols() << ") cannot be subtracted from matrix with size (" <<
 			   covMatrixTemp.Rows() << "," << covMatrixTemp.Cols() );
       }
-  
-    for( unsigned int r=0; r<covMatrix.Rows(); r++) 
+
+    for( unsigned int r=0; r<covMatrix.Rows(); r++)
       {
-	for( unsigned int c=0; c<covMatrix.Cols(); c++ ) 
+	for( unsigned int c=0; c<covMatrix.Cols(); c++ )
 	  {
 	    covMatrix(r,c) -= covMatrixTemp(r,c);
 	  }
@@ -380,7 +380,7 @@ namespace otb {
   template<class TInputImage>
   void
   PersistentStatisticsVectorImageFilter<TInputImage>
-  ::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId) 
+  ::ThreadedGenerateData(const RegionType& outputRegionForThread, int threadId)
   {
     /**
      * Grab the input
@@ -389,9 +389,9 @@ namespace otb {
     // support progress methods/callbacks
     itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
 
-  
+
     MatrixType pixelVector, pixelTransposeVector, pixelSumVector, tempMatrix;
-  
+
     pixelVector.SetSize(this->GetInput()->GetNumberOfComponentsPerPixel(), 1);
     pixelVector.Fill(itk::NumericTraits<RealType>::Zero);
     pixelTransposeVector.SetSize(1, this->GetInput()->GetNumberOfComponentsPerPixel());
@@ -399,10 +399,10 @@ namespace otb {
     pixelSumVector.SetSize(this->GetInput()->GetNumberOfComponentsPerPixel(), this->GetInput()->GetNumberOfComponentsPerPixel());
     pixelSumVector.Fill(itk::NumericTraits<RealType>::Zero);
     tempMatrix.SetSize(this->GetInput()->GetNumberOfComponentsPerPixel(), this->GetInput()->GetNumberOfComponentsPerPixel());
-  
-  
-  
-    itk::ImageRegionConstIteratorWithIndex<TInputImage> it (inputPtr, outputRegionForThread);   
+
+
+
+    itk::ImageRegionConstIteratorWithIndex<TInputImage> it (inputPtr, outputRegionForThread);
     it.GoToBegin();
     // do the work
     while (!it.IsAtEnd())
@@ -412,7 +412,7 @@ namespace otb {
 	for (unsigned int j=0; j<vectorValue.GetSize(); j++)
 	  {
 	    InternalPixelType value = vectorValue[j];
-	  
+
 	    RealType realValue = static_cast<RealType>( value );
 	    if (value < m_ThreadMin[threadId][j])
 	      {
@@ -425,7 +425,7 @@ namespace otb {
 	    m_ThreadSum[threadId][j] += realValue;
 	    pixelVector(j, 0) = realValue;
 	  }
-      
+
 	++it;
 	progress.CompletedPixel();
 	pixelTransposeVector = pixelVector.GetTranspose();
@@ -435,15 +435,15 @@ namespace otb {
 	 **/
 	tempMatrix = pixelVector*pixelTransposeVector;
 	if( (m_XX[threadId].Rows() != tempMatrix.Rows()) || (m_XX[threadId].Cols() != tempMatrix.Cols()))
-	  { 
-	    itkExceptionMacro( << "Matrix with size (" << m_XX[threadId].Rows() << "," << 
+	  {
+	    itkExceptionMacro( << "Matrix with size (" << m_XX[threadId].Rows() << "," <<
 			       m_XX[threadId].Cols() << ") cannot be subtracted from matrix with size (" <<
 			       tempMatrix.Rows() << "," << tempMatrix.Cols() );
 	  }
-      
-	for( unsigned int r=0; r<m_XX[threadId].Rows(); r++) 
+
+	for( unsigned int r=0; r<m_XX[threadId].Rows(); r++)
 	  {
-	    for( unsigned int c=0; c<m_XX[threadId].Cols(); c++ ) 
+	    for( unsigned int c=0; c<m_XX[threadId].Cols(); c++ )
 	      {
 		m_XX[threadId](r,c) += tempMatrix(r,c);
 	      }
@@ -454,18 +454,18 @@ namespace otb {
   }
 
   template <class TImage>
-  void 
+  void
   PersistentStatisticsVectorImageFilter<TImage>
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
     Superclass::PrintSelf(os,indent);
-  
+
     os << indent << "Minimum: "  <<this->GetMinimumOutput()->Get()<< std::endl;
     os << indent << "Maximum: "<<  this->GetMaximumOutput()->Get() << std::endl;
     os << indent << "Sum: "      << this->GetSumOutput()->Get() << std::endl;
     os << indent << "Mean: "     << this->GetMeanOutput()->Get() << std::endl;
     os << indent << "Covariance: " << this->GetCovarianceOutput()->Get() << std::endl;
-  
+
   }
 
 
diff --git a/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.h b/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.h
index 2c4d1c7602..2373bb1796 100644
--- a/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.h
+++ b/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@
 
 namespace otb
 {
-  
+
 /** \class UnaryFunctorObjectListBooleanFilter
  * \brief Filter an ObjectList and keep elements according to the functor value
  *
@@ -44,7 +44,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(UnaryFunctorObjectListBooleanFilter, ObjectListToObjectListFilter);
 
@@ -55,7 +55,7 @@ public:
   typedef typename TInputList::ConstPointer InputListPointer;
   typedef typename TOutputList::Pointer OutputListPointer;
   typedef typename TInputList::ConstIterator InputListIterator;
-  
+
 //   typedef itk::DataObject::Pointer DataObjectPointer;
 
 
@@ -80,8 +80,8 @@ public:
       this->Modified();
       }
   }
-  
-  
+
+
 protected:
   UnaryFunctorObjectListBooleanFilter();
   virtual ~UnaryFunctorObjectListBooleanFilter() {};
diff --git a/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.txx b/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.txx
index c0ab03a8c2..adc0dea1e2 100644
--- a/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.txx
+++ b/Code/BasicFilters/otbUnaryFunctorObjectListBooleanFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -44,12 +44,12 @@ UnaryFunctorObjectListBooleanFilter<TInputList,TOutputList,TFunction>
 ::GenerateData(void)
 {
   this->AllocateOutputs();
-  
+
   InputListPointer inputPtr = this->GetInput();
   OutputListPointer outputPtr = this->GetOutput();
 
   itk::ProgressReporter progress(this, 0, inputPtr->Size());
-  
+
   // Define the iterators
   for(InputListIterator it = inputPtr->Begin(); it != inputPtr->End(); ++it)
   {
@@ -58,10 +58,10 @@ UnaryFunctorObjectListBooleanFilter<TInputList,TOutputList,TFunction>
       outputPtr->PushBack(it.Get());
     }
 
-    progress.CompletedPixel(); 
+    progress.CompletedPixel();
 
   }
-  
+
 }
 
 } // end namespace otb
diff --git a/Code/BasicFilters/otbUnaryFunctorObjectListFilter.h b/Code/BasicFilters/otbUnaryFunctorObjectListFilter.h
index aad5788617..50c23fcc49 100644
--- a/Code/BasicFilters/otbUnaryFunctorObjectListFilter.h
+++ b/Code/BasicFilters/otbUnaryFunctorObjectListFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,11 +22,11 @@
 
 namespace otb
 {
-  
+
 /** \class UnaryFunctorObjectListFilter
   * \brief Process each element in the ObjectList with the functor
   *
-  * Each element of the ObjectList is processed by the functor. 
+  * Each element of the ObjectList is processed by the functor.
   * This is similar to the python map() function.
   *
   *
@@ -44,7 +44,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(UnaryFunctorObjectListFilter, ObjectListToObjectListFilter);
 
@@ -55,7 +55,7 @@ public:
   typedef typename TInputList::ConstPointer InputListPointer;
   typedef typename TOutputList::Pointer OutputListPointer;
   typedef typename TInputList::ConstIterator InputListIterator;
-  
+
 //   typedef itk::DataObject::Pointer DataObjectPointer;
 
   /** Get the functor object.  The functor is returned by reference.
@@ -79,8 +79,8 @@ public:
       this->Modified();
       }
   }
-  
-  
+
+
 protected:
   UnaryFunctorObjectListFilter();
   virtual ~UnaryFunctorObjectListFilter() {};
diff --git a/Code/BasicFilters/otbUnaryFunctorObjectListFilter.txx b/Code/BasicFilters/otbUnaryFunctorObjectListFilter.txx
index 6fc5c126c4..295804e9c9 100644
--- a/Code/BasicFilters/otbUnaryFunctorObjectListFilter.txx
+++ b/Code/BasicFilters/otbUnaryFunctorObjectListFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -44,21 +44,21 @@ UnaryFunctorObjectListFilter<TInputList,TOutputList,TFunction>
 ::GenerateData(void)
 {
   this->AllocateOutputs();
-  
+
   InputListPointer inputPtr = this->GetInput();
   OutputListPointer outputPtr = this->GetOutput();
 
   itk::ProgressReporter progress(this, 0, inputPtr->Size());
-  
+
   // Define the iterators
   for(InputListIterator it = inputPtr->Begin(); it != inputPtr->End(); ++it)
   {
     outputPtr->PushBack(m_Functor(it.Get()));
 
-    progress.CompletedPixel(); 
+    progress.CompletedPixel();
 
   }
-  
+
 }
 
 } // end namespace otb
diff --git a/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.h b/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.h
index b4d346de12..2839193c6f 100644
--- a/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.h
+++ b/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.h
@@ -8,7 +8,7 @@
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -31,7 +31,7 @@
 namespace otb
 {
  /** \class UnaryImageFunctorWithVectorImageFilter
-  *  \brief  The aim of the class is to work with vector images but with a functor that uses as input a componant of the pixel. 
+  *  \brief  The aim of the class is to work with vector images but with a functor that uses as input a componant of the pixel.
   *
   *  For N components pixel, the fucntor will be called N times and completes the Nth component the corresponding output pixel.
   *
@@ -39,8 +39,8 @@ namespace otb
   * \ingroup VectorImage
   */
 template <class TInputImage, class TOutputImage, class TFunction>
-class ITK_EXPORT UnaryImageFunctorWithVectorImageFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage> 
- 
+class ITK_EXPORT UnaryImageFunctorWithVectorImageFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage>
+
 {
 public:
   /** Standard class typedefs. */
@@ -51,7 +51,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 
   /** 	Extract input and output images dimensions.*/
   itkStaticConstMacro( InputImageDimension, unsigned int, TInputImage::ImageDimension);
@@ -61,7 +61,7 @@ public:
   typedef TInputImage         InputImageType;
   typedef TOutputImage        OutputImageType;
   typedef TFunction           FunctorType;
-  
+
   /** Supported images definition. */
   typedef typename InputImageType::PixelType                           InputPixelType;
   typedef typename InputImageType::InternalPixelType                   InputInternalPixelType;
@@ -73,11 +73,11 @@ public:
   /** Image size "typedef" definition. */
   typedef typename InputImageType::SizeType SizeType;
 
-  typedef std::vector<FunctorType> FunctorVectorType; 
+  typedef std::vector<FunctorType> FunctorVectorType;
 
   /** return class name. */
   itkTypeMacro(UnaryImageFunctorWithVectorImageFilter, itk::InPlaceImageFilter);
-    
+
   /** Get the functor list */
   FunctorVectorType& GetFunctorVector(void)
     {
@@ -112,7 +112,7 @@ public:
   void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, int threadId);
 
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-                        
+
 private:
   /** Ponderation declaration*/
   FunctorVectorType m_FunctorVector;
diff --git a/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.txx b/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.txx
index 031678a28e..165c6b9dac 100644
--- a/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.txx
+++ b/Code/BasicFilters/otbUnaryImageFunctorWithVectorImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,22 +38,22 @@ UnaryImageFunctorWithVectorImageFilter<TInputImage,TOutputImage,TFunction>
   this->InPlaceOff();
 }
 
-/** 
+/**
  * UnaryImageFunctorWithVectorImageFilter can produce an image which is a different resolution
  * than its input image. As such, UnaryImageFunctorWithVectorImageFilter needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model. The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformation() 
+ * \sa ProcessObject::GenerateOutputInformation()
  */
 template <class TInputImage, class TOutputImage, class TFunction>
-void 
+void
 UnaryImageFunctorWithVectorImageFilter<TInputImage,TOutputImage,TFunction>
 ::GenerateOutputInformation()
 {
   Superclass::GenerateOutputInformation();
- 
+
   // get pointers to the input and output
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
   typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
@@ -64,11 +64,11 @@ UnaryImageFunctorWithVectorImageFilter<TInputImage,TOutputImage,TFunction>
     }
     outputPtr->SetNumberOfComponentsPerPixel( // propagate vector length info
         inputPtr->GetNumberOfComponentsPerPixel());
- 
+
     // TODO: Check this
     // The Functor vector is not initialised !
     for(unsigned int i = 0;i<inputPtr->GetNumberOfComponentsPerPixel();++i)
-    { 
+    {
       FunctorType functor;
       m_FunctorVector.push_back(functor);
     }
@@ -83,14 +83,14 @@ UnaryImageFunctorWithVectorImageFilter<TInputImage,TOutputImage,TFunction>
 ::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, int threadId )
 {
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
-  typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput(); 
-  
+  typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
+
   // Define the iterators
   itk::ImageRegionConstIterator<InputImageType>  inputIt(inputPtr, outputRegionForThread);
   itk::ImageRegionIterator<OutputImageType>      outputIt(outputPtr, outputRegionForThread);
-  
+
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   inputIt.GoToBegin();
   outputIt.GoToBegin();
 
@@ -99,7 +99,7 @@ UnaryImageFunctorWithVectorImageFilter<TInputImage,TOutputImage,TFunction>
   nullPixel.SetSize( inputPtr->GetNumberOfComponentsPerPixel() );
   nullPixel.Fill(itk::NumericTraits<OutputInternalPixelType>::Zero);
 
-  while( !inputIt.IsAtEnd() ) 
+  while( !inputIt.IsAtEnd() )
     {
       InputPixelType inPixel = inputIt.Get();
       OutputPixelType outPixel;
@@ -107,16 +107,16 @@ UnaryImageFunctorWithVectorImageFilter<TInputImage,TOutputImage,TFunction>
       outPixel.Fill(itk::NumericTraits<OutputInternalPixelType>::Zero);
       // if the input pixel in null, the output is considered as null ( no sensor informations )
       if( inPixel!= nullPixel)
-	{      
+	{
       for (unsigned int j=0; j<inputPtr->GetNumberOfComponentsPerPixel(); j++)
 	{
 	  outPixel[j] = m_FunctorVector[j]( inPixel[j] );
-	}	
+	}
 	}
       outputIt.Set(outPixel);
       ++inputIt;
       ++outputIt;
-      progress.CompletedPixel();  // potential exception thrown here    
+      progress.CompletedPixel();  // potential exception thrown here
     }
 }
 
diff --git a/Code/BasicFilters/otbVarianceImageFilter.h b/Code/BasicFilters/otbVarianceImageFilter.h
index 53d916eab4..40f43d689b 100644
--- a/Code/BasicFilters/otbVarianceImageFilter.h
+++ b/Code/BasicFilters/otbVarianceImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,7 +35,7 @@ namespace otb
  * \sa Neighborhood
  * \sa NeighborhoodOperator
  * \sa NeighborhoodIterator
- * 
+ *
  * \ingroup IntensityImageFilters
  */
 template <class TInputImage, class TOutputImage>
@@ -64,12 +64,12 @@ public:
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(VarianceImageFilter, ImageToImageFilter);
-  
+
   /** Image typedef support. */
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
   typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
@@ -80,7 +80,7 @@ public:
 
   /** Get the radius of the neighborhood used to compute the mean */
   itkGetConstReferenceMacro(Radius, InputSizeType);
-  
+
   /** VarianceImageFilter needs a larger input requested region than
    * the output requested region.  As such, VarianceImageFilter needs
    * to provide an implementation for GenerateInputRequestedRegion()
@@ -120,7 +120,7 @@ private:
 
   InputSizeType m_Radius;
 };
-  
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/BasicFilters/otbVarianceImageFilter.txx b/Code/BasicFilters/otbVarianceImageFilter.txx
index 1c70868d66..171a0eb05e 100644
--- a/Code/BasicFilters/otbVarianceImageFilter.txx
+++ b/Code/BasicFilters/otbVarianceImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,18 +39,18 @@ VarianceImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 VarianceImageFilter<TInputImage, TOutputImage>
 ::GenerateInputRequestedRegion() throw (itk::InvalidRequestedRegionError)
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
-  typename Superclass::InputImagePointer inputPtr = 
+  typename Superclass::InputImagePointer inputPtr =
     const_cast< TInputImage * >( this->GetInput() );
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -77,7 +77,7 @@ VarianceImageFilter<TInputImage, TOutputImage>
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     e.SetLocation(ITK_LOCATION);
@@ -99,11 +99,11 @@ VarianceImageFilter< TInputImage, TOutputImage>
 
   itk::ConstNeighborhoodIterator<InputImageType> bit;
   itk::ImageRegionIterator<OutputImageType> it;
-  
+
   // Allocate output
   typename OutputImageType::Pointer output = this->GetOutput();
   typename  InputImageType::ConstPointer input  = this->GetInput();
-  
+
   // Find the data-set boundary "faces"
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType faceList;
   itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType> bC;
@@ -113,14 +113,14 @@ VarianceImageFilter< TInputImage, TOutputImage>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   InputRealType sum;
   InputRealType sumOfSquares;
 
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-    { 
+    {
     bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius,
                                                     input, *fit);
     unsigned int neighborhoodSize = bit.Size();
@@ -138,11 +138,11 @@ VarianceImageFilter< TInputImage, TOutputImage>
 	sum += value;
 	sumOfSquares += value * value;
         }
-      
-      // get the mean value  
+
+      // get the mean value
       const double num = static_cast<double>( neighborhoodSize );
       it.Set( static_cast<OutputPixelType>(  sumOfSquares - ( sum*sum / num ) ) / ( num - 1.0 ) );
-      
+
       ++bit;
       ++it;
       progress.CompletedPixel();
@@ -157,7 +157,7 @@ template <class TInputImage, class TOutput>
 void
 VarianceImageFilter<TInputImage, TOutput>
 ::PrintSelf(
-  std::ostream& os, 
+  std::ostream& os,
   itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.h b/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.h
index a4ae85dfd6..9bccd70b42 100644
--- a/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.h
+++ b/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,8 +27,8 @@ namespace otb
  *  \brief This filter convert a 2 Dimension VectorImage to a 3 Dimension scalar image.
  *
  *  The third dimension of the output image is the index of the band in the vector image.
- *  
- *  No Dimension checking is done by the filter so it is up to the user to template the input 
+ *
+ *  No Dimension checking is done by the filter so it is up to the user to template the input
  * and output image dimension correctly.
  *
  * Casting is done through standard casting operators.
@@ -46,13 +46,13 @@ class ITK_EXPORT VectorImageTo3DScalarImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>                           Pointer;
   typedef itk::SmartPointer<const Self>                     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(VectorImageTo3DScalarImageFilter, ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::ConstPointer InputImageConstPointerType;
@@ -66,8 +66,8 @@ class ITK_EXPORT VectorImageTo3DScalarImageFilter
   typedef typename OutputImageType::IndexType OutputImageIndexType;
   typedef typename OutputImageType::SizeType OutputImageSizeType;
   typedef typename OutputImageType::PixelType OutputPixelType;
-  
- 
+
+
 protected:
 
   /** Generate output information */
@@ -75,7 +75,7 @@ protected:
 
   /** Generate input requested region */
   virtual void GenerateInputRequestedRegion(void);
-  
+
   /** Threaded Generate data */
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                             int threadId );
diff --git a/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx b/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx
index 0fe2c28131..91d16e54a4 100644
--- a/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx
+++ b/Code/BasicFilters/otbVectorImageTo3DScalarImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,10 +37,10 @@ void
 VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
 ::GenerateOutputInformation()
 {
-  
+
   const InputImageType* inputPtr = this->GetInput();
   OutputImageType* outputPtr = this->GetOutput();
-  
+
   InputImageRegionType inputLargestRegion = this->GetInput()->GetLargestPossibleRegion();
   OutputImageSizeType size;
   OutputImageIndexType index;
@@ -49,9 +49,9 @@ VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
       size[i] = inputLargestRegion.GetSize()[i];
       index[i]= inputLargestRegion.GetIndex()[i];
     }
-  size[OutputImageType::ImageDimension-1]=inputPtr->GetNumberOfComponentsPerPixel();  
+  size[OutputImageType::ImageDimension-1]=inputPtr->GetNumberOfComponentsPerPixel();
   index[OutputImageType::ImageDimension-1]=0;
-  
+
   OutputImageRegionType outputRegion;
   outputRegion.SetSize(size);
   outputRegion.SetIndex(index);
@@ -65,7 +65,7 @@ VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
 {
   InputImageType* inputPtr = const_cast<InputImageType *>(this->GetInput());
   OutputImageType* outputPtr = this->GetOutput();
-  
+
   OutputImageRegionType requestedRegion = outputPtr->GetRequestedRegion();
   InputImageRegionType inputRequestedRegion;
   InputImageSizeType size;
@@ -91,7 +91,7 @@ VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
 
   typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
   typedef itk::ImageSliceIteratorWithIndex<OutputImageType> OutputIteratorType;
-  
+
   InputImageRegionType inputRegion;
   InputImageSizeType size;
   InputImageIndexType index;
@@ -103,9 +103,9 @@ VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
     }
   inputRegion.SetSize(size);
   inputRegion.SetIndex(index);
- 
+
   InputIteratorType inIt(inputPtr,inputRegion);
-  
+
   OutputIteratorType outIt(outputPtr,outputRegionForThread);
   outIt.SetFirstDirection(0);
   outIt.SetSecondDirection(1);
@@ -116,7 +116,7 @@ VectorImageTo3DScalarImageFilter<TInputImage, TOutputImage>
   while(!outIt.IsAtEnd())
     {
       outIt.Set(static_cast<OutputPixelType>(inIt.Get()[outIt.GetIndex()[InputImageType::ImageDimension]]));
-      ++inIt; 
+      ++inIt;
       if(inIt.IsAtEnd())
       {
  	    inIt.GoToBegin();
diff --git a/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.h b/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.h
index adab40781a..01f47f4faa 100644
--- a/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.h
+++ b/Code/BasicFilters/otbVectorImageToAmplitudeImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
 	public:
 	  VectorToAmplitudeFunctor(){};
 	  ~VectorToAmplitudeFunctor(){};
-	  
+
 	  inline TOutput operator()(const TInput & A)
 	    {
 	      return static_cast<TOutput>(vcl_sqrt(A.GetSquaredNorm()));
@@ -58,13 +58,13 @@ class ITK_EXPORT VectorImageToAmplitudeImageFilter
   typename TInputImage::PixelType, typename TOutputImage::PixelType> > Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(VectorImageToAmplitudeImageFilter, UnaryFunctorImageFilter);
-   
+
 protected:
   /** Constructor */
   VectorImageToAmplitudeImageFilter(){};
diff --git a/Code/BasicFilters/otbVectorImageToImageListFilter.h b/Code/BasicFilters/otbVectorImageToImageListFilter.h
index b7495d7cf9..01441aaf5f 100644
--- a/Code/BasicFilters/otbVectorImageToImageListFilter.h
+++ b/Code/BasicFilters/otbVectorImageToImageListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@ namespace otb
 {
 /** \class VectorImageToImageListFilter
  *  \brief This class aims at converting a multi-band image to a list of scalar images.
- * 
+ *
  * This class takes a multi-band image represented as an otb::VectorImage and produces a list
  * of scalar images corresponding to each band of the input image.
  *
@@ -34,7 +34,7 @@ namespace otb
  */
 template <class TVectorImageType, class TImageList>
 class ITK_EXPORT VectorImageToImageListFilter
-  : public ImageToImageListFilter<TVectorImageType,typename TImageList::ImageType> 
+  : public ImageToImageListFilter<TVectorImageType,typename TImageList::ImageType>
 {
  public:
   /** Standard typedefs */
@@ -43,13 +43,13 @@ class ITK_EXPORT VectorImageToImageListFilter
     typename TImageList::ImageType>         Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(VectorImageToImageListFilter,ImageToImageListFilter);
-  
+
   /** Template parameters typedefs */
   typedef TVectorImageType InputVectorImageType;
   typedef typename InputVectorImageType::Pointer InputVectorImagePointerType;
@@ -57,10 +57,10 @@ class ITK_EXPORT VectorImageToImageListFilter
   typedef typename OutputImageListType::Pointer OutputImageListPointerType;
   typedef typename OutputImageListType::ImageType OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointerType;
- 
+
   /** Generate the input requested region from the first element in the list. */
   virtual void GenerateInputRequestedRegion(void);
-  
+
   /** Generate the output information by building the output list. */
   virtual void GenerateOutputInformation(void);
 
diff --git a/Code/BasicFilters/otbVectorImageToImageListFilter.txx b/Code/BasicFilters/otbVectorImageToImageListFilter.txx
index be66823147..645e7a2e56 100644
--- a/Code/BasicFilters/otbVectorImageToImageListFilter.txx
+++ b/Code/BasicFilters/otbVectorImageToImageListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -65,7 +65,7 @@ VectorImageToImageListFilter<TVectorImageType,TImageList>
 {
   OutputImageListPointerType outputPtr = this->GetOutput();
   InputVectorImagePointerType inputPtr = this->GetInput();
-  
+
   if(inputPtr)
     {
       if(outputPtr->Size()>0)
@@ -82,15 +82,15 @@ void
 VectorImageToImageListFilter<TVectorImageType,TImageList>
 ::GenerateData(void)
 {
-  
+
   OutputImageListPointerType outputPtr = this->GetOutput();
   InputVectorImagePointerType inputPtr = this->GetInput();
 
   typedef itk::ImageRegionConstIteratorWithIndex<InputVectorImageType> InputIteratorType;
   typedef itk::ImageRegionIteratorWithIndex<OutputImageType> OutputIteratorType;
-  
+
   std::vector<OutputIteratorType> outputIteratorList;
-  
+
  typename OutputImageListType::ConstIterator outputListIt = outputPtr->Begin();
   for(;outputListIt!=outputPtr->End();++outputListIt)
     {
diff --git a/Code/BasicFilters/otbVectorImageToIntensityImageFilter.h b/Code/BasicFilters/otbVectorImageToIntensityImageFilter.h
index 88c6b80bd8..288934e0e9 100644
--- a/Code/BasicFilters/otbVectorImageToIntensityImageFilter.h
+++ b/Code/BasicFilters/otbVectorImageToIntensityImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,12 +24,12 @@ namespace otb
 {
 /** \class VectorImageToIntensityImageFilter
  *  \brief This filter implements the computation of the mean of the spectral values of each pixel.
- * 
- * The spectral mean 
+ *
+ * The spectral mean
  * is defined as:
- * 
+ *
  * \f[ SM = \frac{1}{n_{b}} \times \sum_{b=1}^{n_{b}}p(b) \f]
- * with \f$b\f$ being the spectral band and \f$p\f$ 
+ * with \f$b\f$ being the spectral band and \f$p\f$
  * the current pixel.
  *
  * Since the spectral mean deals with multi-bands image, the InputImage pixels are suposed to
@@ -53,13 +53,13 @@ class ITK_EXPORT VectorImageToIntensityImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(VectorImageToIntensityImageFilter,itk::ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::ConstPointer InputImageConstPointerType;
diff --git a/Code/BasicFilters/otbVectorImageToIntensityImageFilter.txx b/Code/BasicFilters/otbVectorImageToIntensityImageFilter.txx
index 063e623c4f..e51a5d488f 100644
--- a/Code/BasicFilters/otbVectorImageToIntensityImageFilter.txx
+++ b/Code/BasicFilters/otbVectorImageToIntensityImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,7 +23,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkImageRegionConstIterator.h"
 #include "itkProgressReporter.h"
 #include "otbMacro.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -34,7 +34,7 @@ template <class TInputImage, class TOutputImage>
 VectorImageToIntensityImageFilter<TInputImage,TOutputImage>
 ::VectorImageToIntensityImageFilter()
 {
-  
+
 }
 
 template <class TInputImage, class TOutputImage>
@@ -42,12 +42,12 @@ void
 VectorImageToIntensityImageFilter<TInputImage,TOutputImage>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,int threadId)
 {
-  
+
 
   InputImageConstPointerType  inputPtr = this->GetInput();
   OutputImagePointerType outputPtr = this->GetOutput();
 
-  
+
   // Define the portion of the input to walk for this thread, using
   // the CallCopyOutputRegionToInputRegion method allows for the input
   // and output images to be different dimensions
@@ -62,7 +62,7 @@ VectorImageToIntensityImageFilter<TInputImage,TOutputImage>
   inputIt.GoToBegin();
   outputIt.GoToBegin();
 
-  while(!inputIt.IsAtEnd() && !outputIt.IsAtEnd()) 
+  while(!inputIt.IsAtEnd() && !outputIt.IsAtEnd())
     {
       double sum=0.0;
       InputPixelType pixel = inputIt.Get();
diff --git a/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h b/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h
index 18c125b535..f0836ce39e 100644
--- a/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h
+++ b/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,16 +26,16 @@
 
 namespace otb
 {
-namespace Functor {  
+namespace Functor {
   /** \class VectorAffineTransform
    *  \brief This functor performs a per band linear transform of its input.
-   *  
+   *
    *  Values upper than InputMaximum or lower than InputMinimum are clamped to OutputMaximum
    *  respectively OutputMinimum values.
    *
    *  TInput and TOutput type are supposed to be of type itk::VariableLengthVector.
    *
-   */ 
+   */
   template< typename TInput, typename  TOutput>
     class VectorAffineTransform
     {
@@ -57,8 +57,8 @@ namespace Functor {
       TOutput GetOutputMinimum(){return m_OutputMinimum;}
       TInput GetInputMinimum(){return m_InputMinimum;}
       TInput GetInputMaximum(){return m_InputMaximum;}
-      
-     
+
+
       bool operator!=( const VectorAffineTransform & other ) const
 	{
 	  if(m_OutputMaximum.Size()==other.GetOutputMaximum().Size())
@@ -116,14 +116,14 @@ namespace Functor {
 	  result.SetSize(x.GetSize());
 
 	  // consistency checking
-	  if(   result.GetSize()!=m_OutputMaximum.GetSize() 
-	     || result.GetSize() != m_OutputMaximum.GetSize() 
+	  if(   result.GetSize()!=m_OutputMaximum.GetSize()
+	     || result.GetSize() != m_OutputMaximum.GetSize()
 	     || result.GetSize() != m_InputMinimum.GetSize()
 	     || result.GetSize() != m_InputMaximum.GetSize())
 	    {
 	      itkGenericExceptionMacro(<<"Pixel size different from scale or shift size !");
 	    }
-	  
+
 	  // transformation
 	  for(unsigned int i=0; i<x.GetSize();++i)
 	    {
@@ -141,8 +141,8 @@ namespace Functor {
 		}
 	      else
 		{
-		  const RealType scaledComponent = static_cast<RealType>( x[i]-m_InputMinimum[i] ) 
-		    * static_cast<RealType> (m_OutputMaximum[i] - m_OutputMinimum[i]) 
+		  const RealType scaledComponent = static_cast<RealType>( x[i]-m_InputMinimum[i] )
+		    * static_cast<RealType> (m_OutputMaximum[i] - m_OutputMinimum[i])
 		    / static_cast<RealType> (m_InputMaximum[i] - m_InputMinimum[i]);
 		  result[i]= static_cast< typename TOutput::ValueType >( scaledComponent+m_OutputMinimum[i] );
 		}
@@ -153,8 +153,8 @@ namespace Functor {
       TOutput m_OutputMaximum;
       TOutput m_OutputMinimum;
       TInput m_InputMinimum;
-      TInput m_InputMaximum;      
-    }; 
+      TInput m_InputMaximum;
+    };
 }  // end namespace functor
 
 
@@ -163,7 +163,7 @@ namespace Functor {
  *
  * This filter rescales each band to match the [OutputMinimum,OutputMaximum] range.
  * In order to avoid odd values to alter the intensity extent, one can set a clamp percentage.
- * 
+ *
  * Values lower than the first quantile of this percentage are set to the OutputMinimum.
  * Values upper than the last quantile of this percentage are set to the OutputMaximum.
  *
@@ -171,32 +171,32 @@ namespace Functor {
  *  \ingroup MultiThreaded
  */
 template <class TInputImage, class TOutputImage=TInputImage>
-class ITK_EXPORT VectorRescaleIntensityImageFilter 
-  :  public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, 
-                                    Functor::VectorAffineTransform< 
-                                    typename TInputImage::PixelType, 
+class ITK_EXPORT VectorRescaleIntensityImageFilter
+  :  public itk::UnaryFunctorImageFilter<TInputImage,TOutputImage,
+                                    Functor::VectorAffineTransform<
+                                    typename TInputImage::PixelType,
                                     typename TOutputImage::PixelType>   >
 {
   public:
   /** Standard class typedefs. */
   typedef VectorRescaleIntensityImageFilter  Self;
-  typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage, 
-  Functor::VectorAffineTransform< 
-  typename TInputImage::PixelType, 
+  typedef itk::UnaryFunctorImageFilter<TInputImage,TOutputImage,
+  Functor::VectorAffineTransform<
+  typename TInputImage::PixelType,
   typename TOutputImage::PixelType> >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   typedef typename TOutputImage::PixelType OutputPixelType;
   typedef typename TInputImage::PixelType  InputPixelType;
   typedef typename InputPixelType::ValueType      InputValueType;
   typedef typename OutputPixelType::ValueType     OutputValueType;
   typedef typename itk::NumericTraits<InputValueType>::RealType InputRealType;
   typedef typename itk::NumericTraits<OutputValueType>::RealType OutputRealType;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   itkSetMacro( OutputMaximum, OutputPixelType );
   itkGetConstReferenceMacro( OutputMaximum, OutputPixelType );
   itkSetMacro( OutputMinimum, OutputPixelType );
@@ -217,10 +217,10 @@ class ITK_EXPORT VectorRescaleIntensityImageFilter
 
   /** Process to execute before entering the multithreaded section */
   void BeforeThreadedGenerateData(void);
-  
+
   /** Generate output information */
   void GenerateOutputInformation(void);
-  
+
   /** Generate input requested region */
   void GenerateInputRequestedRegion(void);
 
@@ -243,11 +243,11 @@ private:
   bool                   m_AutomaticInputMinMaxComputation;
 
 };
-  
+
 } // end namespace otb
-  
+
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbVectorRescaleIntensityImageFilter.txx"
 #endif
-  
+
 #endif
diff --git a/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.txx b/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.txx
index b094d879e7..e038f45a83 100644
--- a/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.txx
+++ b/Code/BasicFilters/otbVectorRescaleIntensityImageFilter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -56,7 +56,7 @@ VectorRescaleIntensityImageFilter<TInputImage,TOutputImage>
  * Generate input requested region.
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 VectorRescaleIntensityImageFilter<TInputImage,TOutputImage>
 ::GenerateInputRequestedRegion(void)
       {
@@ -72,7 +72,7 @@ VectorRescaleIntensityImageFilter<TInputImage,TOutputImage>
  * Process to execute before entering the multithreaded section.
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 VectorRescaleIntensityImageFilter<TInputImage, TOutputImage>
 ::BeforeThreadedGenerateData()
 {
@@ -81,34 +81,34 @@ VectorRescaleIntensityImageFilter<TInputImage, TOutputImage>
 
       typedef  typename Superclass::InputImageType      InputImageType;
       typedef  typename Superclass::InputImagePointer   InputImagePointer;
-      
+
       // Get the input
       InputImagePointer inputImage =   this->GetInput();
-      
+
       typedef itk::ImageRegionConstIterator< InputImageType >  InputIterator;
       typedef itk::Vector<typename InputImageType::InternalPixelType,1> MeasurementVectorType;
       typedef itk::Statistics::ListSample<MeasurementVectorType> ListSampleType;
       typedef float HistogramMeasurementType;
       typedef itk::Statistics::ListSampleToHistogramGenerator<ListSampleType,HistogramMeasurementType,
 	itk::Statistics::DenseFrequencyContainer,1> HistogramGeneratorType;
-      
+
       typedef ObjectList<ListSampleType> ListSampleListType;
-      
+
       m_InputMinimum.SetSize(inputImage->GetNumberOfComponentsPerPixel());
       m_InputMaximum.SetSize(inputImage->GetNumberOfComponentsPerPixel());
       typename ListSampleListType::Pointer sl =  ListSampleListType::New();
-      
+
       sl->Reserve(inputImage->GetNumberOfComponentsPerPixel());
-      
+
       for(unsigned int i = 0;i<m_InputMaximum.GetSize();++i)
 	{
 	  sl->PushBack(ListSampleType::New());
 	}
-      
+
       InputIterator it( inputImage, inputImage->GetBufferedRegion() );
-      
+
       it.GoToBegin();
-      
+
       while( !it.IsAtEnd() )
 	{
 	  InputPixelType pixel = it.Get();
@@ -118,7 +118,7 @@ VectorRescaleIntensityImageFilter<TInputImage, TOutputImage>
 	    }
 	  ++it;
 	}
-      
+
       for(unsigned int i = 0;i<m_InputMaximum.GetSize();++i)
 	{
 	  typename HistogramGeneratorType::Pointer generator = HistogramGeneratorType::New();
@@ -143,7 +143,7 @@ VectorRescaleIntensityImageFilter<TInputImage, TOutputImage>
  * Printself method
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 VectorRescaleIntensityImageFilter<TInputImage, TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunction.h b/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunction.h
index 6b9139be85..81298e56f7 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunction.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageBlackmanFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,9 +25,9 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-namespace Function 
-{ 
+
+namespace Function
+{
   /**
    * \class BlackmanWindowFunction
    * \brief Window function for sinc interpolation.
@@ -47,7 +47,7 @@ class BlackmanWindowFunction
     unsigned int  GetRadius() const { return m_Radius; };
     double GetFactor1() { return m_Factor1; };
     double GetFactor2() { return m_Factor2; };
-    
+
     inline TOutput operator()( const TInput & A ) const
     {
       double x = static_cast<double>(A);
@@ -63,60 +63,60 @@ class BlackmanWindowFunction
     double m_Factor2;
   };
 }//namespace Function
- 
+
 
 /**
  * \class WindowedSincInterpolateImageBlackmanFunction
  * \brief Use the WindowedSincInterpolateImageFunctionBase with a Blackman Function.
  *
  * \sa GenericInterpolatorImageFunction
- * \sa Function::GaussianWindowFunction 
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::GaussianWindowFunction
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT WindowedSincInterpolateImageBlackmanFunction : 
-public WindowedSincInterpolateImageFunctionBase< TInputImage, 
-                                                 ITK_TYPENAME Function::BlackmanWindowFunction< TInputInterpolator, TOutputInterpolator>, 
-                                                 TBoundaryCondition, 
-                                                 TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageBlackmanFunction :
+public WindowedSincInterpolateImageFunctionBase< TInputImage,
+                                                 ITK_TYPENAME Function::BlackmanWindowFunction< TInputInterpolator, TOutputInterpolator>,
+                                                 TBoundaryCondition,
+                                                 TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef WindowedSincInterpolateImageBlackmanFunction                                                                  Self;
-    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,  
-                                                     ITK_TYPENAME Function::BlackmanWindowFunction< TInputInterpolator, 
+    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,
+                                                     ITK_TYPENAME Function::BlackmanWindowFunction< TInputInterpolator,
                                                                                                     TOutputInterpolator>,
-                                                     TBoundaryCondition, 
+                                                     TBoundaryCondition,
                                                      TCoordRep>                                                           Superclass;
     typedef itk::SmartPointer<Self>                                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageBlackmanFunction, WindowedSincInterpolateImageFunctionBase);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                  IndexType;
     typedef typename Superclass::SizeType                   SizeType;
     typedef typename Superclass::RealType                   RealType;
     typedef typename Superclass::IteratorType               IteratorType;
     typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
-    
-  
+
+
     protected:
     WindowedSincInterpolateImageBlackmanFunction(){};
     ~WindowedSincInterpolateImageBlackmanFunction(){};
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunction.h b/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunction.h
index 06ed43f42b..ce150b2521 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunction.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageCosineFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,9 +25,9 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-namespace Function 
-{ 
+
+namespace Function
+{
   /**
    * \class HammingWindowFunction
    * \brief Window function for sinc interpolation.
@@ -45,7 +45,7 @@ class CosineWindowFunction
     }
     unsigned int GetRadius() const { return m_Radius; };
     double GetFactor() { return m_Factor; };
-    
+
     inline TOutput operator()( const TInput & A ) const
     {
       double x = static_cast<double>(A);
@@ -66,53 +66,53 @@ class CosineWindowFunction
  * \brief Use the WindowedSincInterpolateImageFunctionBase with a Cosine Function.
  *
  * \sa GenericInterpolatorImageFunction
- * \sa Function::GaussianWindowFunction 
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::GaussianWindowFunction
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT WindowedSincInterpolateImageCosineFunction : 
-public WindowedSincInterpolateImageFunctionBase< TInputImage, 
-                                                 ITK_TYPENAME Function::CosineWindowFunction< TInputInterpolator, TOutputInterpolator>, 
-                                                 TBoundaryCondition, 
-                                                 TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageCosineFunction :
+public WindowedSincInterpolateImageFunctionBase< TInputImage,
+                                                 ITK_TYPENAME Function::CosineWindowFunction< TInputInterpolator, TOutputInterpolator>,
+                                                 TBoundaryCondition,
+                                                 TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef WindowedSincInterpolateImageCosineFunction                                                                  Self;
-    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,  
-                                                     ITK_TYPENAME Function::CosineWindowFunction< TInputInterpolator, 
+    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,
+                                                     ITK_TYPENAME Function::CosineWindowFunction< TInputInterpolator,
                                                                                                     TOutputInterpolator>,
-                                                     TBoundaryCondition, 
+                                                     TBoundaryCondition,
                                                      TCoordRep>                                                           Superclass;
     typedef itk::SmartPointer<Self>                                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageCosineFunction, WindowedSincInterpolateImageFunctionBase);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                  IndexType;
     typedef typename Superclass::SizeType                   SizeType;
     typedef typename Superclass::RealType                   RealType;
     typedef typename Superclass::IteratorType               IteratorType;
     typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
-    
-  
+
+
     protected:
     WindowedSincInterpolateImageCosineFunction(){};
     ~WindowedSincInterpolateImageCosineFunction(){};
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h b/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h
index a9109a4409..1958a4ecbe 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,11 +31,11 @@ namespace otb
  *
  * \par THEORY
  *
- * This function is intended to provide an interpolation function that 
+ * This function is intended to provide an interpolation function that
  * has minimum aliasing artifacts, in contrast to linear interpolation.
- * According to sampling theory, the infinite-support sinc filter, 
+ * According to sampling theory, the infinite-support sinc filter,
  * whose Fourier transform is the box filter, is optimal for resampling
- * a function. In practice, the infinite support sinc filter is 
+ * a function. In practice, the infinite support sinc filter is
  * approximated using a limited support 'windowed' sinc filter.
  * Most of those functions are inspired of the itk::WindowedSincInterpolateImageFunction source code.
  *
@@ -48,14 +48,14 @@ namespace otb
  * Kernels for Medical Image Interpolation. MICCAI 1999, pp. 210-217
  *
  * \par
- * In this work, several 'windows' are estimated. In two dimensions, the 
+ * In this work, several 'windows' are estimated. In two dimensions, the
  * interpolation at a position (x,y) is given by the following
- * expression: 
+ * expression:
  *
  * \par
  * \f[
- *   I(x,y) = 
- *     \sum_{i = \lfloor x \rfloor + 1 - m}^{\lfloor x \rfloor + m} 
+ *   I(x,y) =
+ *     \sum_{i = \lfloor x \rfloor + 1 - m}^{\lfloor x \rfloor + m}
  *     \sum_{j = \lfloor y \rfloor + 1 - m}^{\lfloor y \rfloor + m}
  *     I_{i,j} K(x-i) K(y-j),
  * \f]
@@ -83,22 +83,22 @@ namespace otb
  * Use this filter the way you would use any ImageInterpolationFunction,
  * so for instance, you can plug it into the ResampleImageFilter class.
  * In order to initialize the filter you must choose several template
- * parameters. 
+ * parameters.
  *
  * \par
- * The first (TInputImage) is the image type, that's standard. 
+ * The first (TInputImage) is the image type, that's standard.
  *
  * \par
- * The second (TWindowFunction) is the window function object, which you 
- * can choose from about five different functions defined in this 
+ * The second (TWindowFunction) is the window function object, which you
+ * can choose from about five different functions defined in this
  * header. The default is the Hamming window, which is commonly used
- * but not optimal according to the cited paper. 
+ * but not optimal according to the cited paper.
  *
  * \par
  * The third (TBoundaryCondition) is the boundary condition class used
  * to determine the values of pixels that fall off the image boundary.
  * This class has the same meaning here as in the NeighborhoodItetator
- * classes. 
+ * classes.
  *
  * \par
  * The fouth (TCoordRep) is again standard for interpolating functions,
@@ -124,19 +124,19 @@ namespace otb
  *
  * \sa GenericInterpolatorImageFunctionBase
  * \sa LinearInterpolateImageFunctionBase ResampleImageFilter
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TWindowFunction, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double>
-class ITK_EXPORT WindowedSincInterpolateImageFunctionBase : 
-public GenericInterpolateImageFunction< TInputImage, 
-                                            TWindowFunction, 
-                                            TBoundaryCondition, 
-                                            TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageFunctionBase :
+public GenericInterpolateImageFunction< TInputImage,
+                                            TWindowFunction,
+                                            TBoundaryCondition,
+                                            TCoordRep >
   {
     public:
     /** Standard class typedefs. */
@@ -144,20 +144,20 @@ public GenericInterpolateImageFunction< TInputImage,
     typedef GenericInterpolateImageFunction<TInputImage, TWindowFunction, TBoundaryCondition, TCoordRep>  Superclass;
     typedef itk::SmartPointer<Self>                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageFunctionBase, GenericInterpolateImageFunction);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                                             IndexType;
     typedef typename Superclass::SizeType                                              SizeType;
@@ -167,10 +167,10 @@ public GenericInterpolateImageFunction< TInputImage,
     //typedef typename TWindowFunction                                                   FunctionType;
     typedef typename Superclass::FunctionType                                          FunctionType;
     typedef typename std::vector<double>                                               VectorType;
-    
+
     /** Compute a resampled profil according to the window size.*/
     void ComputeResampledWindowedSincProfil();
-   
+
     /** Positionne le sigma de l'interpolateur */
     void SetRadius(unsigned int sigma);
 
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.txx b/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.txx
index a7b5caf091..02f83a6a4d 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.txx
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageFunctionBase.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ WindowedSincInterpolateImageFunctionBase<TInputImage, TWindowFunction, TBoundary
 ::WindowedSincInterpolateImageFunctionBase()
 {
 }
-  
+
 /** Destructor */
 template<class TInputImage, class TWindowFunction, class TBoundaryCondition, class TCoordRep>
 WindowedSincInterpolateImageFunctionBase<TInputImage, TWindowFunction, TBoundaryCondition, TCoordRep>
@@ -52,7 +52,7 @@ template<class TInputImage, class TWindowFunction, class TBoundaryCondition, cla
 void
 WindowedSincInterpolateImageFunctionBase<TInputImage, TWindowFunction, TBoundaryCondition, TCoordRep>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
-{ 
+{
   Superclass::PrintSelf( os, indent );
 }
 
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunction.h b/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunction.h
index 24429c96bc..d07c5521d6 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunction.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageGaussianFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,14 +25,14 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-namespace Function 
+
+namespace Function
 {
-/** 
+/**
  * \class GaussianWindowFunction
  * \brief Gaussian interpolation windowing function.
  * \f[ w(x) = exp ( -2. \frac{sigma*sigma * \pi } ) \f]
- * \sa otbWindowedSincInterpolateImageFunctionBase 
+ * \sa otbWindowedSincInterpolateImageFunctionBase
  */
 template< class TInput=double, class TOutput=double>
 class GaussianWindowFunction
@@ -66,53 +66,53 @@ class GaussianWindowFunction
  * \brief Use the WindowedSincInterpolateImageFunctionBase with a Gaussian Function.
  *
  * \sa GenericInterpolatorImageFunction
- * \sa Function::GaussianWindowFunction 
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::GaussianWindowFunction
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT WindowedSincInterpolateImageGaussianFunction : 
-public WindowedSincInterpolateImageFunctionBase< TInputImage, 
-                                                 ITK_TYPENAME Function::GaussianWindowFunction< TInputInterpolator, TOutputInterpolator>, 
-                                                 TBoundaryCondition, 
-                                                 TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageGaussianFunction :
+public WindowedSincInterpolateImageFunctionBase< TInputImage,
+                                                 ITK_TYPENAME Function::GaussianWindowFunction< TInputInterpolator, TOutputInterpolator>,
+                                                 TBoundaryCondition,
+                                                 TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef WindowedSincInterpolateImageGaussianFunction                                                                  Self;
-    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,  
-                                                     ITK_TYPENAME Function::GaussianWindowFunction< TInputInterpolator, 
+    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,
+                                                     ITK_TYPENAME Function::GaussianWindowFunction< TInputInterpolator,
                                                                                                     TOutputInterpolator>,
-                                                     TBoundaryCondition, 
+                                                     TBoundaryCondition,
                                                      TCoordRep>                                                           Superclass;
     typedef itk::SmartPointer<Self>                                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageGaussianFunction, WindowedSincInterpolateImageFunctionBase);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                  IndexType;
     typedef typename Superclass::SizeType                   SizeType;
     typedef typename Superclass::RealType                   RealType;
     typedef typename Superclass::IteratorType               IteratorType;
     typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
-    
-  
+
+
     protected:
     WindowedSincInterpolateImageGaussianFunction(){};
     ~WindowedSincInterpolateImageGaussianFunction(){};
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunction.h b/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunction.h
index 36f7d89cf9..c4d2c3bdc2 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunction.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageHammingFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,8 +25,8 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-namespace Function 
+
+namespace Function
 {
   /**
    * \class HammingWindowFunction
@@ -68,53 +68,53 @@ private:
  * \brief Use the WindowedSincInterpolateImageFunctionBase with a Hamming Function.
  *
  * \sa GenericInterpolatorImageFunction
- * \sa Function::GaussianWindowFunction 
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::GaussianWindowFunction
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT WindowedSincInterpolateImageHammingFunction : 
-public WindowedSincInterpolateImageFunctionBase< TInputImage, 
-                                                 ITK_TYPENAME Function::HammingWindowFunction< TInputInterpolator, TOutputInterpolator>, 
-                                                 TBoundaryCondition, 
-                                                 TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageHammingFunction :
+public WindowedSincInterpolateImageFunctionBase< TInputImage,
+                                                 ITK_TYPENAME Function::HammingWindowFunction< TInputInterpolator, TOutputInterpolator>,
+                                                 TBoundaryCondition,
+                                                 TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef WindowedSincInterpolateImageHammingFunction                                                                  Self;
-    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,  
-                                                     ITK_TYPENAME Function::HammingWindowFunction< TInputInterpolator, 
+    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,
+                                                     ITK_TYPENAME Function::HammingWindowFunction< TInputInterpolator,
                                                                                                     TOutputInterpolator>,
-                                                     TBoundaryCondition, 
+                                                     TBoundaryCondition,
                                                      TCoordRep>                                                           Superclass;
     typedef itk::SmartPointer<Self>                                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageHammingFunction, WindowedSincInterpolateImageFunctionBase);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                  IndexType;
     typedef typename Superclass::SizeType                   SizeType;
     typedef typename Superclass::RealType                   RealType;
     typedef typename Superclass::IteratorType               IteratorType;
     typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
-    
-  
+
+
     protected:
     WindowedSincInterpolateImageHammingFunction(){};
     ~WindowedSincInterpolateImageHammingFunction(){};
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunction.h b/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunction.h
index fb91ad109f..dac3b619b7 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunction.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageLanczosFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,9 +25,9 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-namespace Function 
-{ 
+
+namespace Function
+{
   /**
    * \class LanczosWindowFunction
    * \brief Window function for sinc interpolation.
@@ -47,7 +47,7 @@ class LanczosWindowFunction
     }
     unsigned int GetRadius() const { return m_Radius; };
     double GetFactor() { return m_Factor; };
-    
+
     inline TOutput operator()( const TInput & A ) const
     {
       double x = static_cast<double>(A);
@@ -70,60 +70,60 @@ class LanczosWindowFunction
     unsigned int m_Radius;
   };
 }//namespace Function
- 
+
 
 /**
  * \class WindowedSincInterpolateImageLanczosFunction
  * \brief Use the WindowedSincInterpolateImageFunctionBase with a Lanczos Function.
  *
  * \sa GenericInterpolatorImageFunction
- * \sa Function::GaussianWindowFunction 
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::GaussianWindowFunction
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT WindowedSincInterpolateImageLanczosFunction : 
-public WindowedSincInterpolateImageFunctionBase< TInputImage, 
-                                                 ITK_TYPENAME Function::LanczosWindowFunction< TInputInterpolator, TOutputInterpolator>, 
-                                                 TBoundaryCondition, 
-                                                 TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageLanczosFunction :
+public WindowedSincInterpolateImageFunctionBase< TInputImage,
+                                                 ITK_TYPENAME Function::LanczosWindowFunction< TInputInterpolator, TOutputInterpolator>,
+                                                 TBoundaryCondition,
+                                                 TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef WindowedSincInterpolateImageLanczosFunction                                                                  Self;
-    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,  
-                                                     ITK_TYPENAME Function::LanczosWindowFunction< TInputInterpolator, 
+    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,
+                                                     ITK_TYPENAME Function::LanczosWindowFunction< TInputInterpolator,
                                                                                                     TOutputInterpolator>,
-                                                     TBoundaryCondition, 
+                                                     TBoundaryCondition,
                                                      TCoordRep>                                                           Superclass;
     typedef itk::SmartPointer<Self>                                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageLanczosFunction, WindowedSincInterpolateImageFunctionBase);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                  IndexType;
     typedef typename Superclass::SizeType                   SizeType;
     typedef typename Superclass::RealType                   RealType;
     typedef typename Superclass::IteratorType               IteratorType;
     typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
-    
-  
+
+
     protected:
     WindowedSincInterpolateImageLanczosFunction(){};
     ~WindowedSincInterpolateImageLanczosFunction(){};
diff --git a/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunction.h b/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunction.h
index 7e47d88bb9..627881c611 100644
--- a/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunction.h
+++ b/Code/BasicFilters/otbWindowedSincInterpolateImageWelchFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,9 +25,9 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-namespace Function 
-{ 
+
+namespace Function
+{
   /**
    * \class WelchWindowFunction
    * \brief Window function for sinc interpolation.
@@ -45,7 +45,7 @@ class WelchWindowFunction
     }
     unsigned int GetRadius() const { return m_Radius; };
     double GetFactor() { return m_Factor; };
-    
+
     inline TOutput operator()( const TInput & A ) const
     {
       double x = static_cast<double>(A);
@@ -59,60 +59,60 @@ class WelchWindowFunction
     unsigned int m_Radius;
   };
 }//namespace Function
- 
+
 
 /**
  * \class WindowedSincInterpolateImageWelchFunction
  * \brief Use the WindowedSincInterpolateImageFunctionBase with a Welch Function.
  *
  * \sa GenericInterpolatorImageFunction
- * \sa Function::GaussianWindowFunction 
- * \sa Function::HammingWindowFunction 
- * \sa Function::CosineWindowFunction 
+ * \sa Function::GaussianWindowFunction
+ * \sa Function::HammingWindowFunction
+ * \sa Function::CosineWindowFunction
  * \sa Function::WelchWindowFunction
- * \sa Function::LanczosWindowFunction 
+ * \sa Function::LanczosWindowFunction
  * \sa Function::BlackmanWindowFunction
  * \ingroup ImageFunctionBases ImageInterpolators
  */
 template<class TInputImage, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep=double, class TInputInterpolator=double, class TOutputInterpolator=double>
-class ITK_EXPORT WindowedSincInterpolateImageWelchFunction : 
-public WindowedSincInterpolateImageFunctionBase< TInputImage, 
-                                                 ITK_TYPENAME Function::WelchWindowFunction< TInputInterpolator, TOutputInterpolator>, 
-                                                 TBoundaryCondition, 
-                                                 TCoordRep > 
+class ITK_EXPORT WindowedSincInterpolateImageWelchFunction :
+public WindowedSincInterpolateImageFunctionBase< TInputImage,
+                                                 ITK_TYPENAME Function::WelchWindowFunction< TInputInterpolator, TOutputInterpolator>,
+                                                 TBoundaryCondition,
+                                                 TCoordRep >
   {
     public:
     /** Standard class typedefs. */
     typedef WindowedSincInterpolateImageWelchFunction                                                                  Self;
-    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,  
-                                                     ITK_TYPENAME Function::WelchWindowFunction< TInputInterpolator, 
+    typedef WindowedSincInterpolateImageFunctionBase<TInputImage,
+                                                     ITK_TYPENAME Function::WelchWindowFunction< TInputInterpolator,
                                                                                                     TOutputInterpolator>,
-                                                     TBoundaryCondition, 
+                                                     TBoundaryCondition,
                                                      TCoordRep>                                                           Superclass;
     typedef itk::SmartPointer<Self>                                                                                       Pointer;
     typedef itk::SmartPointer<const Self>                                                                                 ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(WindowedSincInterpolateImageWelchFunction, WindowedSincInterpolateImageFunctionBase);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::InputImageType InputImageType;
     typedef typename Superclass::OutputType     OutputType;
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Superclass typedef inheritance. */
     typedef typename Superclass::IndexType                  IndexType;
     typedef typename Superclass::SizeType                   SizeType;
     typedef typename Superclass::RealType                   RealType;
     typedef typename Superclass::IteratorType               IteratorType;
     typedef typename Superclass::ContinuousIndexType        ContinuousIndexType;
-    
-  
+
+
     protected:
     WindowedSincInterpolateImageWelchFunction(){};
     ~WindowedSincInterpolateImageWelchFunction(){};
diff --git a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h
index a9eb687ade..a0cbb0e070 100644
--- a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h
+++ b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,19 +25,19 @@
 
 namespace otb
 {
-  
+
 /** \class BinaryFunctorNeighborhoodJoinHistogramImageFilter
  * \brief Implements neighborhood-wise generic operation of two images.
  *
  * This class is parameterized over the types of the two input images
  * and the type of the output image.  It is also parameterized by the
  * operation to be applied.  A Functor style is used.
- * 
+ *
  * \ingroup IntensityImageFilters   Multithreaded
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction    >
-class ITK_EXPORT BinaryFunctorNeighborhoodJoinHistogramImageFilter : public itk::ImageToImageFilter<TInputImage1,TOutputImage> 
+class ITK_EXPORT BinaryFunctorNeighborhoodJoinHistogramImageFilter : public itk::ImageToImageFilter<TInputImage1,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -48,7 +48,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(BinaryFunctorNeighborhoodJoinHistogramImageFilter, ImageToImageFilter);
 
@@ -58,13 +58,13 @@ public:
   typedef TInputImage1 Input1ImageType;
   typedef typename Input1ImageType::Pointer      Input1ImagePointer;
   typedef typename Input1ImageType::ConstPointer Input1ImageConstPointer;
-  typedef typename Input1ImageType::RegionType Input1ImageRegionType; 
-  typedef typename Input1ImageType::PixelType Input1ImagePixelType; 
+  typedef typename Input1ImageType::RegionType Input1ImageRegionType;
+  typedef typename Input1ImageType::PixelType Input1ImagePixelType;
   typedef TInputImage2 Input2ImageType;
   typedef typename Input2ImageType::Pointer      Input2ImagePointer;
   typedef typename Input2ImageType::ConstPointer Input2ImageConstPointer;
-  typedef typename Input2ImageType::RegionType Input2ImageRegionType; 
-  typedef typename Input2ImageType::PixelType Input2ImagePixelType; 
+  typedef typename Input2ImageType::RegionType Input2ImageRegionType;
+  typedef typename Input2ImageType::PixelType Input2ImagePixelType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointer;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
@@ -101,11 +101,11 @@ public:
   }
 
 
-  
+
   typedef itk::ConstNeighborhoodIterator<TInputImage1>
                                          NeighborhoodIteratorType1;
   typedef itk::ConstNeighborhoodIterator<TInputImage2>
-                                         NeighborhoodIteratorType2;  
+                                         NeighborhoodIteratorType2;
 
   typedef typename NeighborhoodIteratorType1::RadiusType  RadiusType1;
   typedef typename NeighborhoodIteratorType2::RadiusType  RadiusType2;
@@ -180,7 +180,7 @@ protected:
   mutable MeasurementVectorType m_UpperBound;
   /** The increase in the upper bound. */
   double m_UpperBoundIncreaseFactor;
-  
+
 private:
   BinaryFunctorNeighborhoodJoinHistogramImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx
index 446db2dce5..df013c1120 100644
--- a/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx
+++ b/Code/ChangeDetection/otbBinaryFunctorNeighborhoodJoinHistogramImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
 /**
  * Constructor
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
 ::BinaryFunctorNeighborhoodJoinHistogramImageFilter()
@@ -46,11 +46,11 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
 /**
  * Connect one of the operands for neighborhood-wise operation
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::SetInput1( const TInputImage1 * image1 ) 
+::SetInput1( const TInputImage1 * image1 )
 {
   // Process object is not const-correct so the const casting is required.
   SetNthInput(0, const_cast<TInputImage1 *>( image1 ));
@@ -60,17 +60,17 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
 /**
  * Connect one of the operands for neighborhood-wise operation
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::SetInput2( const TInputImage2 * image2 ) 
+::SetInput2( const TInputImage2 * image2 )
 {
   // Process object is not const-correct so the const casting is required.
   SetNthInput(1, const_cast<TInputImage2 *>( image2 ));
 }
 
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 const TInputImage1 *
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -83,7 +83,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
   return static_cast<const TInputImage1 *>(this->itk::ProcessObject::GetInput(0));
 }
 
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 const TInputImage2 *
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -96,7 +96,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
   return static_cast<const TInputImage2 *>(this->itk::ProcessObject::GetInput(1));
 }
 
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -104,14 +104,14 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
     Input1ImagePointer  inputPtr1 =
       const_cast< TInputImage1 * >( this->GetInput1());
     Input2ImagePointer  inputPtr2 =
       const_cast< TInputImage2 * >( this->GetInput2());
     typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr1 || !inputPtr2 || !outputPtr )
     {
     return;
@@ -120,11 +120,11 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
   // requested region)
   typename TInputImage1::RegionType inputRequestedRegion1, inputRequestedRegion2;
   inputRequestedRegion1 = inputPtr1->GetRequestedRegion();
-  
+
   // pad the input requested region by the operator radius
   inputRequestedRegion1.PadByRadius( m_Radius );
   inputRequestedRegion2 = inputRequestedRegion1;
- 
+
   // crop the input requested region at the input's largest possible region
   if ( inputRequestedRegion1.Crop(inputPtr1->GetLargestPossibleRegion()))
     {
@@ -177,12 +177,12 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
 /**
  * Initialize the histogram
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
 ::HistogramType::Pointer
 BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::ComputeHistogram( ) 
+::ComputeHistogram( )
 {
   // Calculate min and max image values in input1 image.
   Input1ImageConstPointer pInput1Image
@@ -198,7 +198,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
   while (!fiIt.IsAtEnd())
     {
     Input1ImagePixelType value = fiIt.Value();
-      
+
     if (value < minInput1)
       {
       minInput1 = value;
@@ -210,7 +210,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
 
     ++fiIt;
     }
-    
+
   // Calculate min and max image values in input2 image.
     Input2ImageConstPointer pInput2Image
     = dynamic_cast<const TInputImage2*>(ProcessObjectType::GetInput(1));
@@ -259,22 +259,22 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1,TInputImage2,TOut
   Input2IteratorType ti2(pInput2Image, input2Region);
 
   typename HistogramType::Pointer histogram = HistogramType::New();
-    
+
   histogram->Initialize(m_HistogramSize, m_LowerBound, m_UpperBound);
-    
+
   ti1.GoToBegin();
   ti2.GoToBegin();
   while (!ti1.IsAtEnd() && !ti2.IsAtEnd())
     {
 
-          
+
         typename HistogramType::MeasurementVectorType sample;
         sample[0] = ti1.Get();
         sample[1] = ti2.Get();
 	if(sample[0]!=itk::NumericTraits<Input1ImagePixelType>::Zero &&
 	   sample[1]!=itk::NumericTraits<Input2ImagePixelType>::Zero)
 	  histogram->IncreaseFrequency(sample, 1);
-      
+
     ++ti1;
     ++ti2;
     }
@@ -312,8 +312,8 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
   Input2ImageConstPointer inputPtr2
     = dynamic_cast<const TInputImage2*>(ProcessObjectType::GetInput(1));
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
-  
+
+
   RadiusType1 r1;
   r1.Fill(m_Radius);
   NeighborhoodIteratorType1 neighInputIt1;
@@ -321,7 +321,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
   RadiusType2 r2;
   r2.Fill(m_Radius);
   NeighborhoodIteratorType2 neighInputIt2;
-    
+
   itk::ImageRegionIterator<TOutputImage> outputIt;
 
 
@@ -339,15 +339,15 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit1=faceList1.begin(), fit2=faceList2.begin(); fit1 != faceList1.end(), fit2 != faceList2.end(); ++fit1, ++fit2)
-    { 
+    {
     neighInputIt1 = itk::ConstNeighborhoodIterator<TInputImage1>(r1, inputPtr1, *fit1);
     neighInputIt2 = itk::ConstNeighborhoodIterator<TInputImage2>(r1, inputPtr2, *fit2);
     outputIt = itk::ImageRegionIterator<TOutputImage>(outputPtr, outputRegionForThread);
-      
+
     outputIt = itk::ImageRegionIterator<TOutputImage>(outputPtr, *fit1);
     neighInputIt1.OverrideBoundaryCondition(&nbc1);
     neighInputIt1.GoToBegin();
@@ -367,7 +367,7 @@ BinaryFunctorNeighborhoodJoinHistogramImageFilter<TInputImage1, TInputImage2, TO
     }
 
 
-  
+
 
 }
 
diff --git a/Code/ChangeDetection/otbCBAMIChangeDetector.h b/Code/ChangeDetection/otbCBAMIChangeDetector.h
index fd0582a408..2e209cc003 100644
--- a/Code/ChangeDetection/otbCBAMIChangeDetector.h
+++ b/Code/ChangeDetection/otbCBAMIChangeDetector.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,35 +27,35 @@
 
 namespace otb
 {
-  
+
 /** \class CBAMIChangeDetector
  * \brief Implements neighborhood-wise the computation of the
  * cumulant-based approximation to mutual information.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the difference of the two pixel values
  * - compute the value of the CBAMI
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
 
 #define epsilon 0.01
 
-namespace Functor {  
+namespace Functor {
 
 template< class TInput1, class TInput2, class TOutput>
 class CBAMI
@@ -66,10 +66,10 @@ public:
   typedef typename VectorType::iterator IteratorType;
   typedef typename std::vector<VectorType> VectorOfVectorType;
   typedef typename VectorOfVectorType::iterator VecOfVecIteratorType;
-  
+
   CBAMI() {};
   ~CBAMI() {};
-  inline TOutput operator()( const TInput1 & itA, 
+  inline TOutput operator()( const TInput1 & itA,
                              const TInput2 & itB)
   {
 
@@ -98,7 +98,7 @@ protected:
     TOutput Ex = 0.0;
 
     IteratorType itx;
-  
+
     for( itx = vx.begin(); itx < vx.end(); itx++)
       {
       Ex  += (*itx);
@@ -107,7 +107,7 @@ protected:
     Ex /= (vx.size());
 
     TOutput Vx = 0.0;
-  
+
     for( itx = vx.begin(); itx < vx.end(); itx++)
       {
 				Vx  += vcl_pow((*itx)-Ex,2);
@@ -120,7 +120,7 @@ protected:
       (*itx) = ((*itx)-Ex)/vcl_sqrt(Vx);
       }
 
-    
+
   }
   inline TOutput Exyc(VectorType vx, VectorType vy){
 
@@ -130,13 +130,13 @@ protected:
 
     IteratorType itx;
     IteratorType ity;
-  
+
     for( itx = vx.begin(), ity = vy.begin(); itx < vx.end(); itx++, ity++)
       {
       //Ex  += (*itx);
       //Ey  += (*ity);
       Exy  += (*itx)*(*ity);
-    
+
       }
 
     //Ex /= (vx.size());
@@ -149,7 +149,7 @@ protected:
   inline TOutput Exyztc(VectorType vx, VectorType vy, VectorType vz, VectorType vt){
 
     TOutput Exyzt = 0.0;
-  
+
     TOutput Exyz = 0.0;
     TOutput Exyt = 0.0;
     TOutput Exzt = 0.0;
@@ -166,13 +166,13 @@ protected:
     TOutput Ey = 0.0;
     TOutput Ez = 0.0;
     TOutput Et = 0.0;
-  
+
 
     IteratorType itx;
     IteratorType ity;
     IteratorType itz;
     IteratorType itt;
-  
+
     for( itx = vx.begin(),
 	   ity = vy.begin(),
 	   itz = vz.begin(),
@@ -187,7 +187,7 @@ protected:
       //Ey  += (*ity);
       //Ez  += (*itz);
       //Et  += (*itt);
-    
+
       Exy += (*itx)*(*ity);
       Exz += (*itx)*(*itz);
       Ext += (*itx)*(*itt);
@@ -201,26 +201,26 @@ protected:
       Eyzt += (*ity)*(*itz)*(*itt);
 
       Exyzt += (*itx)*(*ity)*(*itz)*(*itt);
-      
+
       }
 
-    /*Ex  /= (vx.size()); 
-    Ey  /= (vx.size()); 
-    Ez  /= (vx.size()); 
+    /*Ex  /= (vx.size());
+    Ey  /= (vx.size());
+    Ez  /= (vx.size());
     Et  /= (vx.size()); */
-  	   
-    Exy /= (vx.size()); 
-    Exz /= (vx.size()); 
-    Ext /= (vx.size()); 
-    Eyz /= (vx.size()); 
-    Eyt /= (vx.size()); 
-    Ezt /= (vx.size()); 
-  	   
+
+    Exy /= (vx.size());
+    Exz /= (vx.size());
+    Ext /= (vx.size());
+    Eyz /= (vx.size());
+    Eyt /= (vx.size());
+    Ezt /= (vx.size());
+
     Exyz /= (vx.size());
     Exyt /= (vx.size());
     Exzt /= (vx.size());
     Eyzt /= (vx.size());
-  
+
 
     TOutput result = Exyzt - Exyz*Et- Exyt*Ez- Exzt*Ey- Eyzt*Ex +
       Exy*Ez*Et + Exz*Et*Ey + Ext*Ey*Ez + Eyz*Et*Ex + Eyt*Ex*Ez + Ezt*Ex*Ey -
@@ -233,7 +233,7 @@ protected:
   {
 
     return Exyc(va, vb);
-  
+
   }
 
   inline TOutput Qxijkl(VectorType va, VectorType vb, VectorType vc, VectorType vd)
@@ -257,14 +257,14 @@ protected:
     return Eabcd_c - Eab_c*Ecd_c - Eac_c*Ebd_c - Ead_c*Ebc_c;
 
 
-  
+
 
   }
 
   inline TOutput PhiMI(VectorType v1, VectorType v2)
   {
 
-  
+
     VectorOfVectorType donnees;
     donnees.push_back(v1);
     donnees.push_back(v2);
@@ -290,13 +290,13 @@ protected:
 	      termeQ += vcl_pow( Qxijkl((*iti),(*itj),(*itk),(*itl)),2);
 	    }
 	}
-  
+
 
     return 1.0/4.0*termeR + 1.0/48.0*termeQ;
-  
+
   }
 
-}; 
+};
 }
 
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -304,7 +304,7 @@ class ITK_EXPORT CBAMIChangeDetector :
     public BinaryFunctorNeighborhoodImageFilter<
             TInputImage1,TInputImage2,TOutputImage,
             Functor::CBAMI<
-                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                    ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
@@ -312,18 +312,18 @@ public:
   /** Standard class typedefs. */
   typedef CBAMIChangeDetector  Self;
   typedef BinaryFunctorNeighborhoodImageFilter<
-      TInputImage1,TInputImage2,TOutputImage, 
-          Functor::CBAMI< 
-               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+      TInputImage1,TInputImage2,TOutputImage,
+          Functor::CBAMI<
+               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
-               ITK_TYPENAME TOutputImage::PixelType>   
+               ITK_TYPENAME TOutputImage::PixelType>
   >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   CBAMIChangeDetector() {}
   virtual ~CBAMIChangeDetector() {}
diff --git a/Code/ChangeDetection/otbCommandProgressUpdate.h b/Code/ChangeDetection/otbCommandProgressUpdate.h
index cee9d06f18..29ac1071fb 100644
--- a/Code/ChangeDetection/otbCommandProgressUpdate.h
+++ b/Code/ChangeDetection/otbCommandProgressUpdate.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ namespace otb
 {
 
 template <class TFilter>
-class CommandProgressUpdate : public itk::Command 
+class CommandProgressUpdate : public itk::Command
 {
 public:
   typedef  CommandProgressUpdate   Self;
diff --git a/Code/ChangeDetection/otbCommandProgressUpdate.txx b/Code/ChangeDetection/otbCommandProgressUpdate.txx
index ba8fe1943a..8c24daa0ea 100644
--- a/Code/ChangeDetection/otbCommandProgressUpdate.txx
+++ b/Code/ChangeDetection/otbCommandProgressUpdate.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ void CommandProgressUpdate<TFilter>::Execute(itk::Object *caller, const itk::Eve
 template <class TFilter>
 void CommandProgressUpdate<TFilter>::Execute(const itk::Object * object, const itk::EventObject & event)
 {
-      FilterPointer filter = 
+      FilterPointer filter =
         dynamic_cast< FilterPointer >( object );
       if( typeid( event ) != typeid( itk::ProgressEvent ) )
         {
@@ -44,7 +44,7 @@ void CommandProgressUpdate<TFilter>::Execute(const itk::Object * object, const i
       int factor = 160;
 
       int val = int(filter->GetProgress()*factor);
-      
+
       if((val%2) == 0)
 	{
 	std::cout << "|";
diff --git a/Code/ChangeDetection/otbCorrelationChangeDetector.h b/Code/ChangeDetection/otbCorrelationChangeDetector.h
index c526262f95..c14175a8ae 100644
--- a/Code/ChangeDetection/otbCorrelationChangeDetector.h
+++ b/Code/ChangeDetection/otbCorrelationChangeDetector.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,42 +22,42 @@
 
 namespace otb
 {
-  
+
 /** \class CorrelationChangeDetector
  * \brief Implements neighborhood-wise the computation of crosscorrelation.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the difference of the two pixel values
  * - compute the value of the cross-correlation
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
-namespace Functor {  
-  
+namespace Functor {
+
 template< class TInput1, class TInput2, class TOutput>
 class CrossCorrelation
 {
 public:
   CrossCorrelation() {};
   ~CrossCorrelation() {};
-  inline TOutput operator()( const TInput1 & itA, 
+  inline TOutput operator()( const TInput1 & itA,
                              const TInput2 & itB)
   {
-    
+
     TOutput meanA = itk::NumericTraits<TOutput>::Zero;
     TOutput meanB = itk::NumericTraits<TOutput>::Zero;
 
@@ -66,7 +66,7 @@ public:
 
       meanA += static_cast<TOutput>(itA.GetPixel(pos));
       meanB += static_cast<TOutput>(itB.GetPixel(pos));
-      
+
 
       }
 
@@ -98,11 +98,11 @@ public:
 	  }
     else if(varA==itk::NumericTraits<TOutput>::Zero && varB==itk::NumericTraits<TOutput>::Zero)
       {
-	crossCorrel = itk::NumericTraits<TOutput>::One;	
+	crossCorrel = itk::NumericTraits<TOutput>::One;
       }
     return static_cast<TOutput>( itk::NumericTraits<TOutput>::One - crossCorrel );
   }
-}; 
+};
 }
 
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -110,7 +110,7 @@ class ITK_EXPORT CorrelationChangeDetector :
     public BinaryFunctorNeighborhoodImageFilter<
             TInputImage1,TInputImage2,TOutputImage,
             Functor::CrossCorrelation<
-                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                    ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
@@ -118,18 +118,18 @@ public:
   /** Standard class typedefs. */
   typedef CorrelationChangeDetector  Self;
   typedef BinaryFunctorNeighborhoodImageFilter<
-      TInputImage1,TInputImage2,TOutputImage, 
-          Functor::CrossCorrelation< 
-               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+      TInputImage1,TInputImage2,TOutputImage,
+          Functor::CrossCorrelation<
+               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
-               ITK_TYPENAME TOutputImage::PixelType>   
+               ITK_TYPENAME TOutputImage::PixelType>
   >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   CorrelationChangeDetector() {}
   virtual ~CorrelationChangeDetector() {}
diff --git a/Code/ChangeDetection/otbJoinHistogramMIImageFilter.h b/Code/ChangeDetection/otbJoinHistogramMIImageFilter.h
index 5a1851a2ee..a3760c7dc6 100644
--- a/Code/ChangeDetection/otbJoinHistogramMIImageFilter.h
+++ b/Code/ChangeDetection/otbJoinHistogramMIImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,33 +23,33 @@
 
 namespace otb
 {
-  
+
 /** \class JoinHistogramMIImageFilter
  * \brief Implements neighborhood-wise the computation of mutual
  * information using a join histogram.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the difference of the two pixel values
  * - compute the value of the mutual information
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
-namespace Functor {  
-  
+namespace Functor {
+
 template< class TInput1, class TInput2, class TOutput>
 class JoinHistogramMI
 {
@@ -58,7 +58,7 @@ public:
   typedef typename itk::Statistics::Histogram<HistogramFrequencyType, 2> HistogramType;
   JoinHistogramMI() {};
   ~JoinHistogramMI() {};
-  inline TOutput operator()( const TInput1 & itA, 
+  inline TOutput operator()( const TInput1 & itA,
                              const TInput2 & itB, const HistogramType* histogram)
   {
     TOutput jointEntropy = itk::NumericTraits<TOutput>::Zero;
@@ -68,7 +68,7 @@ public:
       {
       double value = static_cast<double>(itA.GetPixel(pos));
 
-      unsigned int bin = 
+      unsigned int bin =
       HistogramFrequencyType freq = histogram.GetFrequency(, 0);
       if (freq > 0)
       {
@@ -81,17 +81,17 @@ public:
     for (unsigned int i = 0; i < this->GetHistogramSize()[1]; i++)
     {
       HistogramFrequencyType freq = histogram.GetFrequency(i, 1);
-      if (freq > 0) 
+      if (freq > 0)
       {
         entropyY += freq*vcl_log(freq);
       }
     }
-    
+
     entropyY = -entropyY/static_cast<TOutput>(totalFreq) + vcl_log(totalFreq);
 
     HistogramIteratorType it = histogram.Begin();
     HistogramIteratorType end = histogram.End();
-    while (it != end) 
+    while (it != end)
     {
       HistogramFrequencyType freq = it.GetFrequency();
       if (freq > 0)
@@ -125,12 +125,12 @@ public:
 	  }
 
       }
-    
+
     jointEntropy = -jointEntropy/static_cast<TOutput>(totalFreq) +
       vcl_log(totalFreq);
-    
+
     return jointEntropy;
-    
+
 /*    TOutput meanA = 0.0;
     TOutput meanB = 0.0;
 
@@ -139,7 +139,7 @@ public:
 
       meanA += static_cast<TOutput>(itA.GetPixel(pos));
       meanB += static_cast<TOutput>(itB.GetPixel(pos));
-      
+
 
       }*/
     return static_cast<TOutput>( 0 );
@@ -152,7 +152,7 @@ public:
 
 protected:
   HistogramType::Pointer m_Histogram;*/
-}; 
+};
 }
 
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -160,7 +160,7 @@ class ITK_EXPORT JoinHistogramMIImageFilter :
     public BinaryFunctorNeighborhoodJoinHistogramImageFilter<
             TInputImage1,TInputImage2,TOutputImage,
             Functor::JoinHistogramMI<
-                   typename itk::ConstNeighborhoodIterator<TInputImage1>, 
+                   typename itk::ConstNeighborhoodIterator<TInputImage1>,
                    typename itk::ConstNeighborhoodIterator<TInputImage2>,
 		   typename TOutputImage::PixelType>   >
 {
@@ -168,18 +168,18 @@ public:
   /** Standard class typedefs. */
   typedef JoinHistogramMIImageFilter  Self;
   typedef BinaryFunctorNeighborhoodJoinHistogramImageFilter<
-      TInputImage1,TInputImage2,TOutputImage, 
-          Functor::JoinHistogramMI< 
-               typename itk::ConstNeighborhoodIterator<TInputImage1>, 
+      TInputImage1,TInputImage2,TOutputImage,
+          Functor::JoinHistogramMI<
+               typename itk::ConstNeighborhoodIterator<TInputImage1>,
                typename itk::ConstNeighborhoodIterator<TInputImage2>,
-               typename TOutputImage::PixelType>   
+               typename TOutputImage::PixelType>
   >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   JoinHistogramMIImageFilter() {}
   virtual ~JoinHistogramMIImageFilter() {}
diff --git a/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.h b/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.h
index e5cadbb609..fe4f14c86f 100644
--- a/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.h
+++ b/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,22 +30,22 @@ namespace otb {
    *
    */
 template < class TInput >
-class CumulantsForEdgeworth 
+class CumulantsForEdgeworth
 {
 	public :
-		CumulantsForEdgeworth ( const TInput & input ); 
+		CumulantsForEdgeworth ( const TInput & input );
 		CumulantsForEdgeworth ( const itk::Image< typename TInput::ImageType::PixelType, 1 > * input );
 		virtual ~CumulantsForEdgeworth () { }
 
 		/** KL Divergence calculation */
 		template <class TInput2>
 		double Divergence ( const CumulantsForEdgeworth<TInput2> & cumulants );
-		
+
 		inline	double	GetMean ()	const	{ return this->fMean; }
 		inline	double	GetVariance	()	const	{ return this->fVariance; }
 		inline	double	GetSkewness	()	const	{ return this->fSkewness; }
 		inline	double	GetKurtosis	()	const	{ return this->fKurtosis; }
-	
+
 	protected :
 
 		/** Moment estimation from intial neighborhood */
@@ -53,7 +53,7 @@ class CumulantsForEdgeworth
 		/** Moment estimation from raw data */
 		int	MakeSumAndMoments	( const itk::Image< typename TInput::ImageType::PixelType, 1 > * input );
 		/** transformation moment -> cumulants (for Edgeworth) */
-		int MakeCumulants(); 
+		int MakeCumulants();
 
 		double	fSum0, fSum1, fSum2, fSum3, fSum4;
 		double	fMu1, fMu2, fMu3, fMu4;
@@ -62,7 +62,7 @@ class CumulantsForEdgeworth
 
 
 
-namespace Functor {  
+namespace Functor {
   /** \class KullbackLeiblerDistance
    * \brief Functor for KullbackLeiblerDistanceImageFilter. Please refer to KullbackLeiblerDistanceImageFilter.
    *
@@ -76,7 +76,7 @@ namespace Functor {
 			TOutput operator () ( const TInput1 & it1, const TInput2 & it2 ) {
 				CumulantsForEdgeworth<TInput1> cum1 ( it1 );
 				CumulantsForEdgeworth<TInput2> cum2 ( it2 );
-				return static_cast<TOutput> ( cum1.Divergence( cum2 ) 
+				return static_cast<TOutput> ( cum1.Divergence( cum2 )
 												+ cum2.Divergence( cum1 ) );
 			}
 	};
@@ -86,25 +86,25 @@ namespace Functor {
 /** \class KullbackLeiblerDistanceImageFilter
  * \brief Implements neighborhood-wise the computation of KullbackLeibler distance over Edgeworth approximation.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the first four cumulants of the two pixel values
  * - compute the value of the Edgeorth approximation of the KL distance
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- *	
- * See article of  Lin Saito et Levine 
+ *
+ * See article of  Lin Saito et Levine
  * "Edgeworth Approximation of the Kullback-Leibler Distance Towards Problems in Image Analysis"
  * and
  * "Edgeworth Expansions of the Kullback-Leibler Information" (submitted to JASA, nov 25, 1999)
@@ -117,7 +117,7 @@ class ITK_EXPORT KullbackLeiblerDistanceImageFilter :
 	public otb::BinaryFunctorNeighborhoodImageFilter<
 			TInputImage1,TInputImage2,TOutputImage,
 			Functor::KullbackLeiblerDistance<
-				typename itk::ConstNeighborhoodIterator<TInputImage1>, 
+				typename itk::ConstNeighborhoodIterator<TInputImage1>,
 				typename itk::ConstNeighborhoodIterator<TInputImage2>,
 				typename TOutputImage::PixelType> >
 {
@@ -125,11 +125,11 @@ class ITK_EXPORT KullbackLeiblerDistanceImageFilter :
 		/** Standard class typedefs. */
 		typedef KullbackLeiblerDistanceImageFilter Self;
 		typedef otb::BinaryFunctorNeighborhoodImageFilter<
-								TInputImage1,TInputImage2,TOutputImage, 
-								Functor::KullbackLeiblerDistance< 
+								TInputImage1,TInputImage2,TOutputImage,
+								Functor::KullbackLeiblerDistance<
 									typename itk::ConstNeighborhoodIterator<TInputImage1>,
-									typename itk::ConstNeighborhoodIterator<TInputImage2>, 
-									typename TOutputImage::PixelType>   
+									typename itk::ConstNeighborhoodIterator<TInputImage2>,
+									typename TOutputImage::PixelType>
 								>  Superclass;
 		typedef itk::SmartPointer<Self> Pointer;
 		typedef itk::SmartPointer<const Self> ConstPointer;
diff --git a/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.txx b/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.txx
index dd791a4ef0..e7c728ba55 100644
--- a/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.txx
+++ b/Code/ChangeDetection/otbKullbackLeiblerDistanceImageFilter.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ namespace otb {
  */
 template < class TInput >
 CumulantsForEdgeworth< TInput >
-::CumulantsForEdgeworth ( const TInput & input ) 
+::CumulantsForEdgeworth ( const TInput & input )
 {
 	MakeSumAndMoments( input );
 	MakeCumulants();
@@ -52,11 +52,11 @@ CumulantsForEdgeworth< TInput >
 
 template < class TInput >
 template < class TInput2 >
-double 
+double
 CumulantsForEdgeworth< TInput >
-::Divergence ( const CumulantsForEdgeworth<TInput2> & cumulants ) 
-{ 
-	double cum1 = GetMean(); 
+::Divergence ( const CumulantsForEdgeworth<TInput2> & cumulants )
+{
+	double cum1 = GetMean();
 	double cum2 = GetVariance();
 	double cum3 = GetSkewness();
 
@@ -84,7 +84,7 @@ CumulantsForEdgeworth< TInput >
 	double beta_2 = beta * beta;
 	double beta_4 = beta_2 * beta_2;
 	double beta_6 = beta_2 * beta_4;
-	
+
 	double c2 = alpha_2 + beta_2;
 	double c3 = alpha * ( alpha_2 + 3.0 * beta_2 );
 	double c4 = alpha_4 + 6.0 * alpha_2 * beta_2 + 3.0 * beta_4;
@@ -96,7 +96,7 @@ CumulantsForEdgeworth< TInput >
 
 	double tmp = cum1 - tilde_cum1 + sqrt_cum2;
 	double resu = cum3_2 / ( 12.0 * cum2_3 )
-			+ ( log( tilde_cum2 / cum2 ) 
+			+ ( log( tilde_cum2 / cum2 )
 					- 1.0 + tmp * tmp / tilde_cum2 ) / 2.0
 			- ( tilde_cum3 * a1 / 6.0 + tilde_cum4 * a2 / 24.0 + tilde_cum3_2 * a3 / 72.0 )
 			- tilde_cum3_2 * ( c6 - 6.0 * c4 / cum2 + 9.0 * c2 / tilde_cum2_2 ) / 72.0
@@ -108,17 +108,17 @@ CumulantsForEdgeworth< TInput >
 /* ========== Moment estimation from initial neighborhood ============ */
 
 template < class TInput >
-int	
+int
 CumulantsForEdgeworth< TInput >
-::MakeSumAndMoments ( const TInput & input ) 
+::MakeSumAndMoments ( const TInput & input )
 {
-	
+
 	fSum0 = fSum1 = fSum2 = fSum3 = fSum4 = 0.0;
 	double pixel,pixel_2;
-	
-	for ( unsigned long i = 0; i < input.Size(); i++ ) 
+
+	for ( unsigned long i = 0; i < input.Size(); i++ )
 	{
-		pixel = static_cast<double> ( input.GetPixel(i) ); 
+		pixel = static_cast<double> ( input.GetPixel(i) );
 		pixel_2 = pixel * pixel;
 
 		fSum0 += 1.0;
@@ -127,10 +127,10 @@ CumulantsForEdgeworth< TInput >
 		fSum3 += pixel_2 * pixel;
 		fSum4 += pixel_2 * pixel_2;
 	}
-	
+
 	fMu1 = fSum1 / fSum0;
 	fMu2 = fSum2 / fSum0 - fMu1 * fMu1;
-	
+
 	if ( fMu2 <= 0.0 )
 	{
 		otbGenericMsgDebugMacro( << "Potential NAN detected in function MakeSumAndMoments.");
@@ -140,43 +140,43 @@ CumulantsForEdgeworth< TInput >
 	}
 
 	double sigma = sqrt( fMu2 );
-	
+
 	itk::VariableLengthVector<double> tab ( input.Size() );
 	double * x = const_cast<double *> ( tab.GetDataPointer() );
 	for ( unsigned long i = 0; i < input.Size(); i++ )
 		*x++ = ( static_cast<double> ( input.GetPixel(i) ) - fMu1 ) / sigma;
-		
+
 	fMu3 = fMu4 = 0.0;
 	x = const_cast<double *> ( tab.GetDataPointer() );
-	for ( unsigned long i = 0; i < input.Size(); i++ ) 
+	for ( unsigned long i = 0; i < input.Size(); i++ )
 	{
 		pixel = *x++;
 		pixel_2 = pixel * pixel;
-		
+
 		fMu3 += pixel * pixel_2;
 		fMu4 += pixel_2 * pixel_2;
 	}
-	
+
 	fMu3 /= fSum0;
 	fMu4 /= fSum0;
-	
-	return 0;	
+
+	return 0;
 }
 
 /* ================= Moment estimation from raw data ================= */
 
 template < class TInput >
-int	
+int
 CumulantsForEdgeworth< TInput >
-::MakeSumAndMoments ( const itk::Image< typename TInput::ImageType::PixelType, 1 > * input ) 
+::MakeSumAndMoments ( const itk::Image< typename TInput::ImageType::PixelType, 1 > * input )
 {
-	
+
 	fSum0 = fSum1 = fSum2 = fSum3 = fSum4 = 0.0;
 	double pixel,pixel_2;
-	
+
 	typedef itk::Image< typename TInput::ImageType::PixelType, 1 > LocalImageType;
 	typedef itk::ImageRegionConstIterator< LocalImageType > ImageRegionConstIteratorType;
-		
+
 	ImageRegionConstIteratorType inputIter ( input, input->GetRequestedRegion() );
 	inputIter.GoToBegin();
 	unsigned int inputSize = 0;
@@ -195,10 +195,10 @@ CumulantsForEdgeworth< TInput >
 		++inputIter;
 		++inputSize;
 	}
-	
+
 	fMu1 = fSum1 / fSum0;
 	fMu2 = fSum2 / fSum0 - fMu1 * fMu1;
-	
+
 	if ( fMu2 <= 0.0 )
 	{
 		otbGenericMsgDebugMacro( << "Potential NAN detected in function MakeSumAndMoments.");
@@ -208,9 +208,9 @@ CumulantsForEdgeworth< TInput >
 	}
 
 	double sigma = sqrt( fMu2 );
-	
+
 	std::vector<double> tab ( inputSize );
-	std::vector<double>::iterator iterTab = tab.begin(); 
+	std::vector<double>::iterator iterTab = tab.begin();
 
 	inputIter.GoToBegin();
 
@@ -227,26 +227,26 @@ CumulantsForEdgeworth< TInput >
 	{
 		pixel = *iterTab;
 		pixel_2 = pixel * pixel;
-		
+
 		fMu3 += pixel * pixel_2;
 		fMu4 += pixel_2 * pixel_2;
 	}
-	
+
 	fMu3 /= fSum0;
 	fMu4 /= fSum0;
-	
+
 	otbGenericMsgDebugMacro( << "Moments: " << fMu1 << ",\t" << fMu2 << ",\t" << fMu3 << ",\t" << fMu4 );
 
-	return 0;	
+	return 0;
 }
 
 
 /* ================= moments -> cumulants transformation ============= */
 
 template < class TInput >
-int 
+int
 CumulantsForEdgeworth< TInput >
-::MakeCumulants ()	
+::MakeCumulants ()
 {
 	fMean = fMu1;
 	fVariance = fMu2;
diff --git a/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.h b/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.h
index 9a121d3597..cfd3d87367 100644
--- a/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.h
+++ b/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.h
@@ -9,12 +9,12 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Some parts of this code are covered by the GET copyright. 
+  Some parts of this code are covered by the GET copyright.
   See GETCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,13 +30,13 @@
 #include "otbBinaryFunctorNeighborhoodVectorImageFilter.h"
 
 namespace otb {
-  
+
  /** \class CumulantsForEdgeworthProfile
    * \brief Helper class for KullbackLeiblerProfileImageFilter. Please refer to KullbackLeibleProfileImageFilter.
    *
    */
 template <class TInput>
-class CumulantsForEdgeworthProfile 
+class CumulantsForEdgeworthProfile
 {
 	public :
 		typedef itk::Vector<double,4> CumulantType;
@@ -46,7 +46,7 @@ class CumulantsForEdgeworthProfile
 		CumulantsForEdgeworthProfile ( const TInput & input, std::vector< itk::Array2D<int> > & mask );
 		virtual ~CumulantsForEdgeworthProfile () { }
 
-		// Kullback-Leibler Profile 
+		// Kullback-Leibler Profile
 		template <class TInput2>
 		itk::VariableLengthVector<double> KL_profile ( CumulantsForEdgeworthProfile<TInput2> & cumulants );
 		// Kullback-Leibler divergence at a given scale
@@ -62,11 +62,11 @@ class CumulantsForEdgeworthProfile
 		// Estimation des moments � partir de voisinnages emboit�s
 		int	MakeSumAndMoments	( const TInput & input, std::vector< itk::Array2D<int> > & mask );
 		// Estimation des moments � partir de la petite taille de fenetre
-		int InitSumAndMoments ( const TInput & input, itk::Array2D<int> & mask ); 
+		int InitSumAndMoments ( const TInput & input, itk::Array2D<int> & mask );
 		//
-		int ReInitSumAndMoments ( const TInput & input, itk::Array2D<int> & mask, int level ); 
+		int ReInitSumAndMoments ( const TInput & input, itk::Array2D<int> & mask, int level );
 		// transformation moment -> cumulants (pour Edgeworth)
-		int MakeCumulants(); 	
+		int MakeCumulants();
 
 		// Attributs internes � la classe
 		double	fSum0, fSum1, fSum2, fSum3, fSum4;
@@ -79,7 +79,7 @@ class CumulantsForEdgeworthProfile
 
 };
 
-namespace Functor {  
+namespace Functor {
   /** \class KullbackLeiblerProfile
    * \brief Functor for KullbackLeiblerProfileImageFilter. Please refer to KullbackLeiblerProfileImageFilter.
    *
@@ -96,11 +96,11 @@ namespace Functor {
 			unsigned char GetRadiusMax(void);
 			// Gives the size of the profile
 			int	GetNumberOfComponentsPerPixel() const { return m_mask.size(); }
-			// functor	
-			TOutput operator () ( const TInput1 & it1, const TInput2 & it2 ); 
+			// functor
+			TOutput operator () ( const TInput1 & it1, const TInput2 & it2 );
 		protected :
 			// Make the set of masks to play the increase in window size
-			void MakeMultiscaleProfile (); 
+			void MakeMultiscaleProfile ();
 			// Internal attributes
 			unsigned char m_RadiusMin;
 			unsigned char m_RadiusMax;
@@ -111,31 +111,31 @@ namespace Functor {
 /** \class KullbackLeiblerProfileImageFilter
  * \brief Implements neighborhood-wise the computation of KullbackLeibler profile over Edgeworth approximation.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the first four cumulants of the two pixel values
  * - compute the value of the Edgeorth approximation of the KL distance
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
+ *
  * The filter expect all images to have the same dimension (all 2D)
- *	
- * See article of  Lin Saito et Levine 
+ *
+ * See article of  Lin Saito et Levine
  * "Edgeworth Approximation of the Kullback-Leibler Distance Towards Problems in Image Analysis"
  * and
  * "Edgeworth Expansions of the Kullback-Leibler Information" (submitted to JASA, nov 25, 1999)
  * http://www.math.ucdavis.edu/~saito/publications
  *
  *	TOutput is expected to be a itk::VariableLengthVector< TPixel > and comes from an otbVectorImage< TPixel, 2 >
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -143,7 +143,7 @@ class ITK_EXPORT KullbackLeiblerProfileImageFilter :
 	public BinaryFunctorNeighborhoodVectorImageFilter<
 			TInputImage1,TInputImage2,TOutputImage,
 			Functor::KullbackLeiblerProfile<
-				typename itk::ConstNeighborhoodIterator<TInputImage1>, 
+				typename itk::ConstNeighborhoodIterator<TInputImage1>,
 				typename itk::ConstNeighborhoodIterator<TInputImage2>,
 				typename TOutputImage::PixelType> >
 {
@@ -151,11 +151,11 @@ class ITK_EXPORT KullbackLeiblerProfileImageFilter :
 		/** Standard class typedefs. */
 		typedef KullbackLeiblerProfileImageFilter Self;
 		typedef /*typename*/ BinaryFunctorNeighborhoodVectorImageFilter<
-								TInputImage1,TInputImage2,TOutputImage, 
-								Functor::KullbackLeiblerProfile< 
+								TInputImage1,TInputImage2,TOutputImage,
+								Functor::KullbackLeiblerProfile<
 									typename itk::ConstNeighborhoodIterator<TInputImage1>,
-									typename itk::ConstNeighborhoodIterator<TInputImage2>, 
-									typename TOutputImage::PixelType>   
+									typename itk::ConstNeighborhoodIterator<TInputImage2>,
+									typename TOutputImage::PixelType>
 								>  Superclass;
 		typedef itk::SmartPointer<Self> Pointer;
 		typedef itk::SmartPointer<const Self> ConstPointer;
diff --git a/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.txx b/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.txx
index 2a37747515..8ba7c7c547 100644
--- a/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.txx
+++ b/Code/ChangeDetection/otbKullbackLeiblerProfileImageFilter.txx
@@ -9,12 +9,12 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Some parts of this code are covered by the GET copyright. 
+  Some parts of this code are covered by the GET copyright.
   See GETCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,19 +23,19 @@
 
 #include <vector>
 
-#include "otbKullbackLeiblerProfileImageFilter.h" 
+#include "otbKullbackLeiblerProfileImageFilter.h"
 #include "otbMath.h"
 
 namespace otb {
 
 /* *******************************************************************
-*	Classe CumulantsForEdgeworthProfile 
+*	Classe CumulantsForEdgeworthProfile
 * ********************************************************************
 */
 template <class TInput>
 CumulantsForEdgeworthProfile<TInput>
-::CumulantsForEdgeworthProfile 
-( const TInput & input, std::vector< itk::Array2D<int> > & mask ) 
+::CumulantsForEdgeworthProfile
+( const TInput & input, std::vector< itk::Array2D<int> > & mask )
 {
 	m_debug = MakeSumAndMoments( input, mask );
 	MakeCumulants();
@@ -45,16 +45,16 @@ CumulantsForEdgeworthProfile<TInput>
 
 template <class TInput>
 template <class TInput2>
-itk::VariableLengthVector<double> 
+itk::VariableLengthVector<double>
 CumulantsForEdgeworthProfile<TInput>
 ::KL_profile ( CumulantsForEdgeworthProfile<TInput2> & cumulants )
 {
 	itk::VariableLengthVector<double> resu ( fCum.size() );
-	
+
 	Iterator iter1 = fCum.begin();
 	Iterator iter2 = cumulants.fCum.begin();
 
-	for (unsigned int level = 0; level < resu.GetSize(); level++ ) 
+	for (unsigned int level = 0; level < resu.GetSize(); level++ )
 		resu[level] = KL_profile( (*iter1++), (*iter2++) );
 
 	return resu;
@@ -62,10 +62,10 @@ CumulantsForEdgeworthProfile<TInput>
 
 /* =========== Kullback-Leibler divergence at a given scale ========== */
 
-template <class TInput> 
-double 
+template <class TInput>
+double
 CumulantsForEdgeworthProfile<TInput>
-::KL_profile 
+::KL_profile
 ( const CumulantType & cumulants1, const CumulantType & cumulants2 )
 {
 	double cum1 = cumulants1[0];
@@ -97,7 +97,7 @@ CumulantsForEdgeworthProfile<TInput>
 	double beta_2 = beta * beta;
 	double beta_4 = beta_2 * beta_2;
 	double beta_6 = beta_2 * beta_4;
-	
+
 	double c2 = alpha_2 + beta_2;
 	double c3 = alpha * ( alpha_2 + 3.0 * beta_2 );
 	double c4 = alpha_4 + 6.0 * alpha_2 * beta_2 + 3.0 * beta_4;
@@ -109,7 +109,7 @@ CumulantsForEdgeworthProfile<TInput>
 
 	double tmp = cum1 - tilde_cum1 + sqrt_cum2;
 	double resu = cum3_2 / ( 12.0 * cum2_3 )
-			+ ( log( tilde_cum2 / cum2 ) 
+			+ ( log( tilde_cum2 / cum2 )
 					- 1.0 + tmp * tmp / tilde_cum2 ) / 2.0
 			- ( tilde_cum3 * a1 / 6.0 + tilde_cum4 * a2 / 24.0 + tilde_cum3_2 * a3 / 72.0 )
 			- tilde_cum3_2 * ( c6 - 6.0 * c4 / cum2 + 9.0 * c2 / tilde_cum2_2 ) / 72.0
@@ -124,41 +124,41 @@ CumulantsForEdgeworthProfile<TInput>
 /* ====== Estimation des moments à partir de voisinnages emboités ==== */
 
 template <class TInput>
-int	
+int
 CumulantsForEdgeworthProfile<TInput>
-::MakeSumAndMoments	
-( const TInput & input, std::vector< itk::Array2D<int> > & mask ) 
+::MakeSumAndMoments
+( const TInput & input, std::vector< itk::Array2D<int> > & mask )
 {
 	fMu.resize( mask.size() );
 	std::vector< itk::Array2D<int> >::iterator iter = mask.begin();
-	
+
 	if ( InitSumAndMoments ( input, (*iter++) ) )
 		return 1;
-	
+
 	for (unsigned int level = 1; level < mask.size(); level++ )
 		if ( ReInitSumAndMoments( input, (*iter++), level ) )
 			return 1;
-	
+
 	return 0;
 }
-	
+
 /* ===================== Estimation des moments ====================== */
 /* =============== à partir de la petite taille de fenetre =========== */
 
 template <class TInput>
-int 
+int
 CumulantsForEdgeworthProfile<TInput>
-::InitSumAndMoments 
-( const TInput & input, itk::Array2D<int> & mask ) 
+::InitSumAndMoments
+( const TInput & input, itk::Array2D<int> & mask )
 {
 	fSum0 = fSum1 = fSum2 = fSum3 = fSum4 = 0.0;
 	fMu[0].Fill(0.0);
-	
+
 	unsigned int i,j;
 	unsigned long k = 0;
 	double pixel,pixel_2;
-		
-	// for ( unsigned long i = 0; i < input.Size(); i++ ) 
+
+	// for ( unsigned long i = 0; i < input.Size(); i++ )
 	for (i = 0; i < mask.rows(); i++ )
         {
 		for ( j = 0; j < mask.cols(); j++ )
@@ -166,9 +166,9 @@ CumulantsForEdgeworthProfile<TInput>
 			// std::cerr << "(" << i << "," << j << ") k=" << k << " ";
 			if ( mask.get(i,j) == 1 )
 			{
-				pixel = static_cast<double> ( input.GetPixel(k) ); 
+				pixel = static_cast<double> ( input.GetPixel(k) );
 				pixel_2 = pixel * pixel;
-			
+
 				fSum0 += 1.0;
 				fSum1 += pixel;
 				fSum2 += pixel_2;
@@ -183,25 +183,25 @@ CumulantsForEdgeworthProfile<TInput>
 		return 1;
 
 	double mu1, mu2;
-	
+
 	mu1 = fSum1 / fSum0;
 	mu2 = fSum2 / fSum0 - mu1 * mu1;
-	
-	if ( mu2 == 0.0 ) 
+
+	if ( mu2 == 0.0 )
 		return 1;
 
 	double sigma = sqrt( mu2 );
-	
+
 	itk::VariableLengthVector<double> tab ( input.Size() );
 	double * x = const_cast<double *> ( tab.GetDataPointer() );
 	for ( unsigned long cp = 0; cp < input.Size(); cp++ )
 		*x++ = ( static_cast<double> ( input.GetPixel(cp) ) - mu1 ) / sigma;
-	
+
 	double mu3 = 0.0;
 	double mu4 = 0.0;
 	x = const_cast<double *> ( tab.GetDataPointer() );
-	
-	// for ( unsigned long i = 0; i < input.Size(); i++ ) 
+
+	// for ( unsigned long i = 0; i < input.Size(); i++ )
 	for ( i = 0; i < mask.rows(); i++ )
         {
 		for ( j = 0; j < mask.cols(); j++ )
@@ -210,7 +210,7 @@ CumulantsForEdgeworthProfile<TInput>
 			{
 				pixel = *x++;
 				pixel_2 = pixel * pixel;
-				
+
 				mu3 += pixel * pixel_2;
 				mu4 += pixel_2 * pixel_2;
 			}
@@ -218,10 +218,10 @@ CumulantsForEdgeworthProfile<TInput>
 				x++;
                 }
 	}
-	
+
 	mu3 /= fSum0;
 	mu4 /= fSum0;
-	
+
 	if ( vnl_math_isnan( mu3 ) || vnl_math_isnan( mu4 ) )
 		return 1;
 
@@ -230,16 +230,16 @@ CumulantsForEdgeworthProfile<TInput>
 	fMu[0][2] = mu3;
 	fMu[0][3] = mu4;
 
-	return 0;	
+	return 0;
 }
 
 /* ================ Accroissement de la taille de fenetre ============ */
 
 template <class TInput>
-int 
+int
 CumulantsForEdgeworthProfile<TInput>
-::ReInitSumAndMoments 
-( const TInput & input, itk::Array2D<int> & mask, int level ) 
+::ReInitSumAndMoments
+( const TInput & input, itk::Array2D<int> & mask, int level )
 {
 	fMu[level].Fill(0.0);
 	// mise a jour du comptage...
@@ -248,20 +248,20 @@ CumulantsForEdgeworthProfile<TInput>
 			sum2 = 0.0,
 			sum3 = 0.0,
 			sum4 = 0.0;
-	
+
 	double pixel,pixel_2;
 
 	unsigned int i,j;
 	unsigned long k = 0L;
-	
-	// for ( unsigned long i = 0; i < input.Size(); i++ ) 
+
+	// for ( unsigned long i = 0; i < input.Size(); i++ )
 	for ( i = 0; i < mask.rows(); i++ )
         {
 		for ( j = 0; j < mask.cols(); j++ )
 		{
 			if ( mask.get(i,j) == 1 )
 			{
-				pixel = static_cast<double> ( input.GetPixel(k) ); 
+				pixel = static_cast<double> ( input.GetPixel(k) );
 				pixel_2 = pixel * pixel;
 
 				sum0 += 1.0;
@@ -284,8 +284,8 @@ CumulantsForEdgeworthProfile<TInput>
 	double mu_2 = mu * mu;
 	double mu_3 = mu_2 * mu;
 	double mu_4 = mu_2 * mu_2;
-	
-	fMu[level][0] = mu; 
+
+	fMu[level][0] = mu;
 	fMu[level][1] = fSum2 / fSum0 - mu_2;
 
 	double sigma = sqrt( fSum2 );
@@ -295,26 +295,26 @@ CumulantsForEdgeworthProfile<TInput>
 
 	fMu[level][2] = ( fSum3 - 3.0 * mu * fSum2 + 3.0 * mu_2 * fSum1 - fSum0 * mu_3 )
 						/ ( sigma_3 * fSum0 );
-	fMu[level][3] = ( fSum4 - 4.0 * mu * fSum3 + 6.0 * mu_2 * fSum2 
+	fMu[level][3] = ( fSum4 - 4.0 * mu * fSum3 + 6.0 * mu_2 * fSum2
 						- 4.0 * mu_3 * fSum1 + fSum0 * mu_4 )
 						/ ( sigma_4 * fSum0 );
-	
+
 	return 0;
 }
 
 /* =========== transformation moment -> cumulants ==================== */
 
 template <class TInput>
-int 
+int
 CumulantsForEdgeworthProfile<TInput>
 ::MakeCumulants()
 {
 	fCum.resize( fMu.size() );
 	fCum = fMu;
-	
+
 	for ( unsigned int i = 0; i < fCum.size(); i++ )
 		fCum[i][3] -= 3.0;
-	
+
 	return 0;
 }
 
@@ -325,22 +325,22 @@ CumulantsForEdgeworthProfile<TInput>
 * ********************************************************************
 */
 
-namespace Functor {  
+namespace Functor {
 
 	template< class TInput1, class TInput2, class TOutput >
 	KullbackLeiblerProfile<TInput1,TInput2,TOutput>
-	::KullbackLeiblerProfile () 
-	{ 
+	::KullbackLeiblerProfile ()
+	{
 		m_RadiusMin = 1;
 		m_RadiusMax = 3;
 	}
-			
+
 /* =========== Gives the radius min and max of neighborhood ========== */
 
 	template< class TInput1, class TInput2, class TOutput >
-	void 
+	void
 	KullbackLeiblerProfile<TInput1,TInput2,TOutput>
-	::SetRadius ( const unsigned char & min, const unsigned char & max ) 
+	::SetRadius ( const unsigned char & min, const unsigned char & max )
 	{
 		m_RadiusMin = min < max ? min : max;
 		m_RadiusMax = max > min ? max : min;
@@ -354,7 +354,7 @@ namespace Functor {
 	{
 	  return m_RadiusMin;
 	}
-  
+
         template< class TInput1, class TInput2, class TOutput >
 	unsigned char
 	KullbackLeiblerProfile<TInput1,TInput2,TOutput>
@@ -362,19 +362,19 @@ namespace Functor {
 	{
 	  return m_RadiusMax;
 	}
-  
+
 
 /* ====== Make the set of masks to play the increase in window size == */
 
 	template< class TInput1, class TInput2, class TOutput >
-	void 
+	void
 	KullbackLeiblerProfile<TInput1,TInput2,TOutput>
-	::MakeMultiscaleProfile () 
+	::MakeMultiscaleProfile ()
 	{
 		m_mask.resize( m_RadiusMax - m_RadiusMin + 1 );
 		int lenMax = 2*m_RadiusMax+1;
 		int i,j,middle = m_RadiusMax;
-		
+
 		// let's begin by the smaller neighborhood
 		std::vector< itk::Array2D<int> >::iterator outer_iter = m_mask.begin();
 		(*outer_iter).SetSize( lenMax, lenMax );
@@ -384,10 +384,10 @@ namespace Functor {
 				(*outer_iter).put(i,j,1);
 
 		// std::cerr << "outerIter = " << (*outer_iter) << std::endl;
-				
+
 		// let's continue with increasing neighborhoods
 		outer_iter++;
-		for ( int radius = m_RadiusMin+1; radius <= m_RadiusMax; radius++ ) 
+		for ( int radius = m_RadiusMin+1; radius <= m_RadiusMax; radius++ )
 		{
 			(*outer_iter).SetSize( lenMax, lenMax );
 			(*outer_iter).fill(0);
@@ -403,15 +403,15 @@ namespace Functor {
 			// std::cerr << "outerIter = " << (*outer_iter) << std::endl;
 			outer_iter++;
 		}
-	}	
+	}
 
 /* ========================== Functor ================================ */
 
 	template< class TInput1, class TInput2, class TOutput >
-	TOutput 
+	TOutput
 	KullbackLeiblerProfile<TInput1,TInput2,TOutput>
-	::operator () 
-	( const TInput1 & it1, const TInput2 & it2 ) 
+	::operator ()
+	( const TInput1 & it1, const TInput2 & it2 )
 	{
 		CumulantsForEdgeworthProfile<TInput1> cum1 ( it1, m_mask );
 		CumulantsForEdgeworthProfile<TInput2> cum2 ( it2, m_mask );
diff --git a/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.h b/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.h
index 85588709ab..277b20e6eb 100644
--- a/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.h
+++ b/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,29 +30,29 @@
 namespace otb {
 
 /** \class KullbackLeiblerSupervizedDistanceImageFilter
- * \brief Implements KullbackLeibler distance over Edgeworth approximation, 
+ * \brief Implements KullbackLeibler distance over Edgeworth approximation,
  * between a Neighborhood and a predefined Region of Interest.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
- * The filter will walk over all the pixels in the two input 
- * images, and for each one of them it will do the following: 
+ * The filter will walk over all the pixels in the two input
+ * images, and for each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
  * - compute the first four cumulants of the ROI
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 2 pixel value to \c double
  * - compute the first four cumulants of the pixel values
  * - compute the value of the Edgeorth approximation of the KL distance
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- *	
- * See article of  Lin Saito et Levine 
+ *
+ * See article of  Lin Saito et Levine
  * "Edgeworth Approximation of the Kullback-Leibler Distance Towards Problems in Image Analysis"
  * and
  * "Edgeworth Expansions of the Kullback-Leibler Information" (submitted to JASA, nov 25, 1999)
@@ -60,7 +60,7 @@ namespace otb {
  *
  * \sa CumulantsForEdgeworth
  */
-namespace Functor {  
+namespace Functor {
   /** \class KullbackLeiblerSupervizedDistance
    * \brief Functor for KullbackLeiblerSupervizedDistanceImageFilter. Please refer to KullbackLeiblerSupervizedDistanceImageFilter.
    *
@@ -69,8 +69,8 @@ namespace Functor {
 	class KullbackLeiblerSupervizedDistance
 	{
 		public :
-			KullbackLeiblerSupervizedDistance (); 
-			virtual ~KullbackLeiblerSupervizedDistance (); 
+			KullbackLeiblerSupervizedDistance ();
+			virtual ~KullbackLeiblerSupervizedDistance ();
 
 			/** performs the preprocess calculation on the training area */
 			void Evaluate ( const typename TInput1::ImageType * img1,
@@ -81,22 +81,22 @@ namespace Functor {
 			TOutput operator () ( const TInput1 & it1, const TInput2 & it2 ) ;
 
 		protected :
-			typedef ROIdataConversion< 
+			typedef ROIdataConversion<
 				typename TInput1::ImageType, TInputROIImage > ROIConversionType1;
 
-			typedef itk::ConstNeighborhoodIterator< 
+			typedef itk::ConstNeighborhoodIterator<
 				typename ROIConversionType1::OutputImageType > ROIInputType1;
 
-			typedef ROIdataConversion< 
+			typedef ROIdataConversion<
 				typename TInput2::ImageType, TInputROIImage > ROIConversionType2;
 
-			typedef itk::ConstNeighborhoodIterator< 
+			typedef itk::ConstNeighborhoodIterator<
 				typename ROIConversionType2::OutputImageType > ROIInputType2;
 
 			CumulantsForEdgeworth< ROIInputType1 > * m_CumROI1;
 			CumulantsForEdgeworth< ROIInputType2 > * m_CumROI2;
 		private :
-			KullbackLeiblerSupervizedDistance ( const KullbackLeiblerSupervizedDistance & ); 
+			KullbackLeiblerSupervizedDistance ( const KullbackLeiblerSupervizedDistance & );
 	};
 
 } // Functor
@@ -107,21 +107,21 @@ class ITK_EXPORT KullbackLeiblerSupervizedDistanceImageFilter :
 	public otb::BinaryFunctorNeighborhoodImageFilter<
 			TInputImage1, TInputImage2, TOutputImage,
 			Functor::KullbackLeiblerSupervizedDistance<
-				typename itk::ConstNeighborhoodIterator< TInputImage1 >, 
+				typename itk::ConstNeighborhoodIterator< TInputImage1 >,
 				typename itk::ConstNeighborhoodIterator< TInputImage2 >,
-				TInputROIImage, 
+				TInputROIImage,
 				typename TOutputImage::PixelType> >
 {
 	public:
 		/** Standard class typedefs. */
 		typedef KullbackLeiblerSupervizedDistanceImageFilter Self;
 		typedef typename otb::BinaryFunctorNeighborhoodImageFilter<
-								TInputImage1, TInputImage2, TOutputImage, 
-								Functor::KullbackLeiblerSupervizedDistance< 
-									typename itk::ConstNeighborhoodIterator< TInputImage1 >, 
+								TInputImage1, TInputImage2, TOutputImage,
+								Functor::KullbackLeiblerSupervizedDistance<
+									typename itk::ConstNeighborhoodIterator< TInputImage1 >,
 									typename itk::ConstNeighborhoodIterator< TInputImage2 >,
 									TInputROIImage,
-									typename TOutputImage::PixelType >   
+									typename TOutputImage::PixelType >
 								>  Superclass;
 		typedef itk::SmartPointer<Self> Pointer;
 		typedef itk::SmartPointer<const Self> ConstPointer;
@@ -136,14 +136,14 @@ class ITK_EXPORT KullbackLeiblerSupervizedDistanceImageFilter :
 		/** Method for creation through the object factory. */
 		itkNewMacro(Self);
 
-		/** Method for creation of the training area and the computation 
+		/** Method for creation of the training area and the computation
 		 * of some reference cumulants */
 		void	SetTrainingArea	( const TInputROIImage * trainingImage );
 
 	protected:
 		virtual void BeforeThreadedGenerateData(void);
 
-		KullbackLeiblerSupervizedDistanceImageFilter() 
+		KullbackLeiblerSupervizedDistanceImageFilter()
 		{
 			this->SetNumberOfRequiredInputs(3);
 		}
diff --git a/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.txx b/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.txx
index 1cb9b8a5fa..90d3d48a9e 100644
--- a/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.txx
+++ b/Code/ChangeDetection/otbKullbackLeiblerSupervizedDistanceImageFilter.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom / Telecom Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@
 
 namespace otb {
 
-namespace Functor {  
+namespace Functor {
 
 template < class TInput1, class TInput2, class TInputROIImage, class TOutput >
 KullbackLeiblerSupervizedDistance< TInput1, TInput2, TInputROIImage, TOutput >
@@ -40,10 +40,10 @@ template < class TInput1, class TInput2, class TInputROIImage, class TOutput >
 KullbackLeiblerSupervizedDistance< TInput1, TInput2, TInputROIImage, TOutput >
 ::~KullbackLeiblerSupervizedDistance ()
 {
-	delete m_CumROI1; 
+	delete m_CumROI1;
 	m_CumROI1 = NULL;
 
-	delete m_CumROI2; 
+	delete m_CumROI2;
 	m_CumROI2 = NULL;
 }
 
@@ -52,12 +52,12 @@ void
 KullbackLeiblerSupervizedDistance< TInput1, TInput2, TInputROIImage, TOutput >
 ::Evaluate ( const typename TInput1::ImageType * img1,
 				const typename TInput2::ImageType * img2,
-				const TInputROIImage * imgROI ) 
+				const TInputROIImage * imgROI )
 {
 	typedef ROIdataConversion< typename TInput1::ImageType, TInputROIImage >
 		ROIConversionType1;
 
-	typedef itk::ConstNeighborhoodIterator< 
+	typedef itk::ConstNeighborhoodIterator<
 		typename ROIConversionType1::OutputImageType > ROIInputType1;
 
 	typename ROIConversionType1::Pointer convertion1 = ROIConversionType1::New();
@@ -68,29 +68,29 @@ KullbackLeiblerSupervizedDistance< TInput1, TInput2, TInputROIImage, TOutput >
 	if ( m_CumROI1 != NULL )
 		delete m_CumROI1;
 
-	m_CumROI1 = new CumulantsForEdgeworth< ROIInputType1 > ( convertion1->GetOutput() ); 
+	m_CumROI1 = new CumulantsForEdgeworth< ROIInputType1 > ( convertion1->GetOutput() );
 
 	typedef ROIdataConversion< typename TInput2::ImageType, TInputROIImage >
 		ROIConversionType2;
 
-	typedef itk::ConstNeighborhoodIterator< 
+	typedef itk::ConstNeighborhoodIterator<
 		typename ROIConversionType2::OutputImageType > ROIInputType2;
 
 	typename ROIConversionType2::Pointer convertion2 = ROIConversionType2::New();
 	convertion2->SetInputImage( img2 );
 	convertion2->SetROIImage( imgROI );
 	convertion2->Update();
-	
+
 	if ( m_CumROI2 != NULL )
 		delete m_CumROI2;
 
-	m_CumROI2 = new CumulantsForEdgeworth< ROIInputType2 > ( convertion2->GetOutput() ); 
+	m_CumROI2 = new CumulantsForEdgeworth< ROIInputType2 > ( convertion2->GetOutput() );
 }
 
 template < class TInput1, class TInput2, class TInputROIImage, class TOutput >
-TOutput 
+TOutput
 KullbackLeiblerSupervizedDistance< TInput1, TInput2, TInputROIImage, TOutput >
-::operator () ( const TInput1 & it1, const TInput2 & it2 ) 
+::operator () ( const TInput1 & it1, const TInput2 & it2 )
 {
 	CumulantsForEdgeworth<TInput1> cum1 ( it1 );
 	CumulantsForEdgeworth<TInput2> cum2 ( it2 );
@@ -100,9 +100,9 @@ KullbackLeiblerSupervizedDistance< TInput1, TInput2, TInputROIImage, TOutput >
 
 } // end of namespace Functor
 
-/** 
+/**
  *	Connect the training area to build the reference pdfs,
- *	with parameters to be hold by 
+ *	with parameters to be hold by
  *	\doxygen{Functor}{KullbackLeiblerSupervizedDistance}.
  *
  *	Images 1 & 2 are supposed to be already connected.
@@ -120,11 +120,11 @@ void
 KullbackLeiblerSupervizedDistanceImageFilter<TInputImage1,TInputImage2,TInputROIImage,TOutputImage>
 ::BeforeThreadedGenerateData(void)
 {
-	typename TInputImage1::ConstPointer inputPtr1 
+	typename TInputImage1::ConstPointer inputPtr1
 		= dynamic_cast<const TInputImage1*>( this->GetInput(0) );
-	typename TInputImage2::ConstPointer inputPtr2 
+	typename TInputImage2::ConstPointer inputPtr2
 		= dynamic_cast<const TInputImage2*>( this->GetInput(1) );
-	typename TInputROIImage::ConstPointer trainingImage 
+	typename TInputROIImage::ConstPointer trainingImage
 		= static_cast<const TInputROIImage *>( this->itk::ProcessObject::GetInput(2) );
 
 	this->GetFunctor().Evaluate( inputPtr1, inputPtr2, trainingImage );
diff --git a/Code/ChangeDetection/otbLHMIChangeDetector.h b/Code/ChangeDetection/otbLHMIChangeDetector.h
index 0bd3e07395..ddb6374f91 100644
--- a/Code/ChangeDetection/otbLHMIChangeDetector.h
+++ b/Code/ChangeDetection/otbLHMIChangeDetector.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,35 +27,35 @@
 
 namespace otb
 {
-  
+
 /** \class LHMIChangeDetector
  * \brief Implements neighborhood-wise the computation of the
  * cumulant-based approximation to mutual information.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the difference of the two pixel values
  * - compute the value of the LHMI
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
 
 #define epsilon 0.01
 
-namespace Functor {  
+namespace Functor {
 
 template< class TInput1, class TInput2, class TOutput>
 class LHMI
@@ -74,16 +74,16 @@ public:
   typedef typename HistogramType::SizeType    HistogramSizeType;
   typedef typename HistogramType::Iterator    HistogramIteratorType;
 
-  
+
   LHMI() {};
   ~LHMI() {};
-  inline TOutput operator()( const TInput1 & itA, 
+  inline TOutput operator()( const TInput1 & itA,
                              const TInput2 & itB)
   {
 
 
     HistogramType::Pointer histogram;
-    
+
     /** The histogram size. */
     HistogramSizeType histogramSize;
     /** The lower bound for samples in the histogram. */
@@ -99,7 +99,7 @@ public:
     TOutput minA = itA.GetPixel(0);
     TOutput maxB = itB.GetPixel(0);
     TOutput minB = itB.GetPixel(0);
-    
+
     for(unsigned long pos = 0; pos< itA.Size(); ++pos)
       {
 
@@ -116,7 +116,7 @@ public:
 	maxB = value;
       else if (value < minB)
 	minB = value;
-	
+
 
       }
 
@@ -131,12 +131,12 @@ public:
 
 
   histogram = HistogramType::New();
-    
+
   histogram->Initialize(histogramSize, lowerBound, upperBound);
 
   for(unsigned long pos = 0; pos< itA.Size(); ++pos)
     {
-              
+
         typename HistogramType::MeasurementVectorType sample;
         sample[0] = itA.GetPixel(pos);
         sample[1] = itB.GetPixel(pos);
@@ -167,17 +167,17 @@ public:
     for (unsigned int i = 0; i < histogram->GetSize()[1]; i++)
     {
       HistogramFrequencyType freq = histogram->GetFrequency(i, 1);
-      if (freq > 0) 
+      if (freq > 0)
       {
         entropyY += freq*vcl_log(freq);
       }
     }
-    
+
     entropyY = -entropyY/static_cast<TOutput>(totalFreq) + vcl_log(totalFreq);
 
     HistogramIteratorType it = histogram->Begin();
     HistogramIteratorType end = histogram->End();
-    while (it != end) 
+    while (it != end)
     {
       HistogramFrequencyType freq = it.GetFrequency();
       if (freq > 0)
@@ -189,13 +189,13 @@ public:
 
     jointEntropy = -jointEntropy/static_cast<TOutput>(totalFreq) +
       vcl_log(totalFreq);
-    
+
     return static_cast<TOutput>( jointEntropy/(entropyX + entropyY) );
   }
 
 
 
-}; 
+};
 }
 
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -203,7 +203,7 @@ class ITK_EXPORT LHMIChangeDetector :
     public BinaryFunctorNeighborhoodImageFilter<
             TInputImage1,TInputImage2,TOutputImage,
             Functor::LHMI<
-                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                    ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
@@ -211,18 +211,18 @@ public:
   /** Standard class typedefs. */
   typedef LHMIChangeDetector  Self;
   typedef BinaryFunctorNeighborhoodImageFilter<
-      TInputImage1,TInputImage2,TOutputImage, 
-          Functor::LHMI< 
-               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+      TInputImage1,TInputImage2,TOutputImage,
+          Functor::LHMI<
+               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
-               ITK_TYPENAME TOutputImage::PixelType>   
+               ITK_TYPENAME TOutputImage::PixelType>
   >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   LHMIChangeDetector() {}
   virtual ~LHMIChangeDetector() {}
diff --git a/Code/ChangeDetection/otbMeanDifferenceImageFilter.h b/Code/ChangeDetection/otbMeanDifferenceImageFilter.h
index c85a3382ba..d28584135a 100644
--- a/Code/ChangeDetection/otbMeanDifferenceImageFilter.h
+++ b/Code/ChangeDetection/otbMeanDifferenceImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,42 +22,42 @@
 
 namespace otb
 {
-  
+
 /** \class MeanDifferenceImageFilter
  * \brief Implements neighborhood-wise the computation of mean difference.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
- * - cast the input 1 pixel value to \c double 
- * - cast the input 2 pixel value to \c double 
+ * - cast the input 1 pixel value to \c double
+ * - cast the input 2 pixel value to \c double
  * - compute the difference of the two pixel values
  * - compute the value of the difference of means
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
-namespace Functor {  
-  
+namespace Functor {
+
 template< class TInput1, class TInput2, class TOutput>
 class MeanDifference
 {
 public:
   MeanDifference() {};
   ~MeanDifference() {};
-  inline TOutput operator()( const TInput1 & itA, 
+  inline TOutput operator()( const TInput1 & itA,
                              const TInput2 & itB)
   {
-    
+
     TOutput meanA = 0.0;
     TOutput meanB = 0.0;
 
@@ -66,12 +66,12 @@ public:
 
       meanA += static_cast<TOutput>(itA.GetPixel(pos));
       meanB += static_cast<TOutput>(itB.GetPixel(pos));
-      
+
 
       }
     return static_cast<TOutput>( (meanA-meanB)/itA.Size() );
   }
-}; 
+};
 }
 
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -79,7 +79,7 @@ class ITK_EXPORT MeanDifferenceImageFilter :
     public BinaryFunctorNeighborhoodImageFilter<
             TInputImage1,TInputImage2,TOutputImage,
             Functor::MeanDifference<
-                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                    ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
@@ -87,18 +87,18 @@ public:
   /** Standard class typedefs. */
   typedef MeanDifferenceImageFilter  Self;
   typedef BinaryFunctorNeighborhoodImageFilter<
-      TInputImage1,TInputImage2,TOutputImage, 
-          Functor::MeanDifference< 
-               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+      TInputImage1,TInputImage2,TOutputImage,
+          Functor::MeanDifference<
+               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
-               ITK_TYPENAME TOutputImage::PixelType>   
+               ITK_TYPENAME TOutputImage::PixelType>
   >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   MeanDifferenceImageFilter() {}
   virtual ~MeanDifferenceImageFilter() {}
diff --git a/Code/ChangeDetection/otbMeanRatioImageFilter.h b/Code/ChangeDetection/otbMeanRatioImageFilter.h
index ca77123fd1..4d357ebe36 100644
--- a/Code/ChangeDetection/otbMeanRatioImageFilter.h
+++ b/Code/ChangeDetection/otbMeanRatioImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,40 +22,40 @@
 
 namespace otb
 {
-  
+
 /** \class MeanRatioImageFilter
  * \brief Implements neighborhood-wise the computation of mean ratio.
  *
- * This filter is parametrized over the types of the two 
- * input images and the type of the output image. 
+ * This filter is parametrized over the types of the two
+ * input images and the type of the output image.
  *
  * Numeric conversions (castings) are done by the C++ defaults.
  *
  * The filter will walk over all the pixels in the two input images, and for
- * each one of them it will do the following: 
+ * each one of them it will do the following:
  *
  * - compute the ratio of the two pixel values
  * - compute the value of the ratio of means
- * - cast the \c double value resulting to the pixel type of the output image 
+ * - cast the \c double value resulting to the pixel type of the output image
  * - store the casted value into the output image.
- * 
- * The filter expect all images to have the same dimension 
+ *
+ * The filter expect all images to have the same dimension
  * (e.g. all 2D, or all 3D, or all ND)
- * 
+ *
  * \ingroup IntensityImageFilters Multithreaded
  */
-namespace Functor {  
-  
+namespace Functor {
+
 template< class TInput1, class TInput2, class TOutput>
 class MeanRatio
 {
 public:
   MeanRatio() {};
   ~MeanRatio() {};
-  inline TOutput operator()( const TInput1 & itA, 
+  inline TOutput operator()( const TInput1 & itA,
                              const TInput2 & itB)
   {
-    
+
     TOutput meanA = 0.0;
     TOutput meanB = 0.0;
 
@@ -64,7 +64,7 @@ public:
 
       meanA += static_cast<TOutput>(itA.GetPixel(pos));
       meanB += static_cast<TOutput>(itB.GetPixel(pos));
-      
+
 
       }
 
@@ -76,10 +76,10 @@ public:
     if(meanA>meanB)
       ratio = static_cast<TOutput>(1.0 - meanB/meanA);
     else ratio = static_cast<TOutput>(1.0 - meanA/meanB);
-    
+
     return ratio;
   }
-}; 
+};
 }
 
 template <class TInputImage1, class TInputImage2, class TOutputImage>
@@ -87,7 +87,7 @@ class ITK_EXPORT MeanRatioImageFilter :
     public BinaryFunctorNeighborhoodImageFilter<
             TInputImage1,TInputImage2,TOutputImage,
             Functor::MeanRatio<
-                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+                   ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                    ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
@@ -95,18 +95,18 @@ public:
   /** Standard class typedefs. */
   typedef MeanRatioImageFilter  Self;
   typedef BinaryFunctorNeighborhoodImageFilter<
-      TInputImage1,TInputImage2,TOutputImage, 
-          Functor::MeanRatio< 
-               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>, 
+      TInputImage1,TInputImage2,TOutputImage,
+          Functor::MeanRatio<
+               ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage1>,
                ITK_TYPENAME itk::ConstNeighborhoodIterator<TInputImage2>,
-               ITK_TYPENAME TOutputImage::PixelType>   
+               ITK_TYPENAME TOutputImage::PixelType>
   >  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   MeanRatioImageFilter() {}
   virtual ~MeanRatioImageFilter() {}
diff --git a/Code/Common/otbArcSpatialObject.h b/Code/Common/otbArcSpatialObject.h
index cd6bd07c94..f8de224eff 100644
--- a/Code/Common/otbArcSpatialObject.h
+++ b/Code/Common/otbArcSpatialObject.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class ArcSpatialObject
- *  \brief 
+ *  \brief
  *
  */
 template <unsigned int VDimension = 2>
@@ -38,10 +38,10 @@ public:
   typedef itk::SpatialObject<VDimension> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ArcSpatialObject, SpatialObject);
 
@@ -56,53 +56,53 @@ public:
   /** Additional typedefs */
   typedef itk::VectorContainer<unsigned long,PointType> PointContainerType;
   typedef itk::SmartPointer<PointContainerType>         PointContainerPointer;
-  /** 
+  /**
    *  Set all radii to the same radius value.  Each radius is
-   *  half the length of one axis of the ellipse.  
+   *  half the length of one axis of the ellipse.
    */
   itkSetMacro(Radius,double);
   itkGetConstReferenceMacro(Radius,double);
    /// Set the Start Angle
   itkSetMacro(Angle1,double);
   itkGetMacro(Angle1,double);
- 
+
   //Set the End Angle
   itkSetMacro(Angle2,double);
   itkGetMacro(Angle2,double);
-  /** 
+  /**
    *  That's useful for fuzzy objects.
-   * \return a degree of membership to the object. 
-   */ 
-  virtual bool ValueAt( const PointType & point, double & value, 
+   * \return a degree of membership to the object.
+   */
+  virtual bool ValueAt( const PointType & point, double & value,
                         unsigned int depth=0,
                         char * name=NULL) const;
-  /** 
-   * \return true if the object provides a method to evaluate the value 
+  /**
+   * \return true if the object provides a method to evaluate the value
    * at the specified point, false otherwise.
    */
-  virtual bool IsEvaluableAt( const PointType & point, 
+  virtual bool IsEvaluableAt( const PointType & point,
                               unsigned int depth=0,
                               char * name=NULL) const;
-  /** 
-   * Test whether a point is inside or outside the object 
-   */ 
+  /**
+   * Test whether a point is inside or outside the object
+   */
   virtual bool IsInside( const PointType & point,
                          unsigned int depth,
                          char *) const;
-  /** 
-   *  Test whether a point is inside or outside the object 
+  /**
+   *  Test whether a point is inside or outside the object
    *  For computational speed purposes, it is faster if the method does not
-   *  check the name of the class and the current depth 
-   */ 
+   *  check the name of the class and the current depth
+   */
   virtual bool IsInside( const PointType & point) const;
-  /** 
+  /**
    * Get the boundaries of a specific object.  This function needs to
    * be called every time one of the object's components is
-   * changed. 
-   */ 
+   * changed.
+   */
   virtual bool ComputeLocalBoundingBox() const;
-  /** 
-   * Copy the information from another SpatialObject 
+  /**
+   * Copy the information from another SpatialObject
    */
   void CopyInformation(const itk::DataObject *data);
 
diff --git a/Code/Common/otbArcSpatialObject.txx b/Code/Common/otbArcSpatialObject.txx
index cba4d9a469..ade8c4bdc0 100644
--- a/Code/Common/otbArcSpatialObject.txx
+++ b/Code/Common/otbArcSpatialObject.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 template< unsigned int VDimension >
@@ -37,10 +37,10 @@ ArcSpatialObject< VDimension >
   m_Angle1=0.0;
   m_Angle2=0.0;
 }
-/** 
+/**
  * Test whether a point is inside or outside the object
  * For computational speed purposes, it is faster if the method does not
- * check the name of the class and the current depth 
+ * check the name of the class and the current depth
  */
 template< unsigned int VDimension >
 bool
@@ -93,8 +93,8 @@ ArcSpatialObject< VDimension >
         }
   return false;
 }
-/** 
- * Test if the given point is inside the arc 
+/**
+ * Test if the given point is inside the arc
  */
 template< unsigned int VDimension >
 bool
@@ -119,8 +119,8 @@ ArcSpatialObject< VDimension >
     }
   return Superclass::IsInside(point, depth, name);
 }
-/** 
- * Compute the bounds of the arc 
+/**
+ * Compute the bounds of the arc
  */
 template< unsigned int VDimension >
 bool
@@ -146,7 +146,7 @@ ArcSpatialObject< VDimension >
     PointType pntB;
         PointType pntC;
         PointType pntD;
-        
+
         double alpha,longueur,largeur;
         alpha=(m_Angle2-m_Angle1) ; // Difference between 2 angles.
 
@@ -198,7 +198,7 @@ ArcSpatialObject< VDimension >
   return true;
 }
 /**
- *  Returns if the arc is evaluable at one point 
+ *  Returns if the arc is evaluable at one point
  */
 template< unsigned int VDimension >
 bool
@@ -208,8 +208,8 @@ ArcSpatialObject< VDimension >
   // itkDebugMacro( "Checking if the arc is evaluable at " << point );
   return IsInside(point, depth, name);
 }
-/** 
- * Returns the value at one point 
+/**
+ * Returns the value at one point
  */
 template< unsigned int VDimension >
 bool
@@ -238,8 +238,8 @@ ArcSpatialObject< VDimension >
     }
   return false;
 }
-/** 
- * Print Self function 
+/**
+ * Print Self function
  */
 template< unsigned int VDimension >
 void
@@ -249,8 +249,8 @@ ArcSpatialObject< VDimension >
   Superclass::PrintSelf(os, indent);
   os << "Radius: " << m_Radius << std::endl;
 }
-/** 
- * Copy the information from another spatial object 
+/**
+ * Copy the information from another spatial object
  */
 template< unsigned int VDimension >
 void  ArcSpatialObject< VDimension >
diff --git a/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.h b/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.h
index c4e983ae3a..b7c41e7b8c 100644
--- a/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.h
+++ b/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,17 +24,17 @@
 
 namespace otb
 {
-  
+
 /** \class BinaryFunctorNeighborhoodImageFilter
  * \brief Implements neighborhood-wise generic operation of two images.
  *
  * This class is parameterized over the types of the two input images
  * and the type of the output image.  It is also parameterized by the
  * operation to be applied.  A Functor style is used.
- * 
+ *
  * \ingroup IntensityImageFilters   Multithreaded
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction    >
   class ITK_EXPORT BinaryFunctorNeighborhoodImageFilter : public itk::ImageToImageFilter<TInputImage1,TOutputImage>
 {
@@ -47,7 +47,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(BinaryFunctorNeighborhoodImageFilter, BinaryFunctorImageFilter);
 
@@ -57,13 +57,13 @@ public:
   typedef TInputImage1 Input1ImageType;
   typedef typename Input1ImageType::ConstPointer Input1ImageConstPointer;
   typedef typename Input1ImageType::Pointer      Input1ImagePointer;
-  typedef typename Input1ImageType::RegionType   Input1ImageRegionType; 
-  typedef typename Input1ImageType::PixelType    Input1ImagePixelType; 
+  typedef typename Input1ImageType::RegionType   Input1ImageRegionType;
+  typedef typename Input1ImageType::PixelType    Input1ImagePixelType;
   typedef TInputImage2 Input2ImageType;
   typedef typename Input2ImageType::ConstPointer Input2ImageConstPointer;
   typedef typename Input2ImageType::Pointer      Input2ImagePointer;
-  typedef typename Input2ImageType::RegionType   Input2ImageRegionType; 
-  typedef typename Input2ImageType::PixelType    Input2ImagePixelType; 
+  typedef typename Input2ImageType::RegionType   Input2ImageRegionType;
+  typedef typename Input2ImageType::PixelType    Input2ImagePixelType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointer;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
@@ -101,11 +101,11 @@ public:
   }
 
 
-  
+
   typedef itk::ConstNeighborhoodIterator<TInputImage1>
                                          NeighborhoodIteratorType1;
   typedef itk::ConstNeighborhoodIterator<TInputImage2>
-                                         NeighborhoodIteratorType2;  
+                                         NeighborhoodIteratorType2;
 
   typedef typename NeighborhoodIteratorType1::RadiusType  RadiusType1;
   typedef typename NeighborhoodIteratorType2::RadiusType  RadiusType2;
@@ -137,7 +137,7 @@ protected:
   virtual void GenerateInputRequestedRegion(void);
 
   RadiusSizeType m_Radius;
-  
+
 private:
   BinaryFunctorNeighborhoodImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.txx b/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.txx
index ccdeba4539..1630516de8 100644
--- a/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.txx
+++ b/Code/Common/otbBinaryFunctorNeighborhoodImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
 /**
  * Constructor
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
 ::BinaryFunctorNeighborhoodImageFilter()
@@ -43,11 +43,11 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFun
 /**
  * Connect one of the operands for neighborhood-wise operation
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::SetInput1( const TInputImage1 * image1 ) 
+::SetInput1( const TInputImage1 * image1 )
 {
   // Process object is not const-correct so the const casting is required.
   SetNthInput(0, const_cast<TInputImage1 *>( image1 ));
@@ -57,17 +57,17 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFun
 /**
  * Connect one of the operands for neighborhood-wise operation
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::SetInput2( const TInputImage2 * image2 ) 
+::SetInput2( const TInputImage2 * image2 )
 {
   // Process object is not const-correct so the const casting is required.
   SetNthInput(1, const_cast<TInputImage2 *>( image2 ));
 }
 
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 const TInputImage1 *
 BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -80,7 +80,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFun
   return static_cast<const TInputImage1 *>(this->itk::ProcessObject::GetInput(0));
 }
 
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 const TInputImage2 *
 BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -94,7 +94,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFun
 }
 
 
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -102,14 +102,14 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFun
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
     Input1ImagePointer  inputPtr1 =
       const_cast< TInputImage1 * >( this->GetInput1());
     Input2ImagePointer  inputPtr2 =
       const_cast< TInputImage2 * >( this->GetInput2());
     typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr1 || !inputPtr2 || !outputPtr )
     {
     return;
@@ -118,11 +118,11 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1,TInputImage2,TOutputImage,TFun
   // requested region)
   typename TInputImage1::RegionType inputRequestedRegion1, inputRequestedRegion2;
   inputRequestedRegion1 = inputPtr1->GetRequestedRegion();
-  
+
   // pad the input requested region by the operator radius
   inputRequestedRegion1.PadByRadius( m_Radius );
   inputRequestedRegion2 = inputRequestedRegion1;
- 
+
   // crop the input requested region at the input's largest possible region
   if ( inputRequestedRegion1.Crop(inputPtr1->GetLargestPossibleRegion()))
     {
@@ -193,8 +193,8 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T
   Input2ImageConstPointer inputPtr2
     = dynamic_cast<const TInputImage2*>(ProcessObjectType::GetInput(1));
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
-  
+
+
   RadiusType1 r1;
   r1.Fill(m_Radius);
   NeighborhoodIteratorType1 neighInputIt1;
@@ -202,7 +202,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T
   RadiusType2 r2;
   r2.Fill(m_Radius);
   NeighborhoodIteratorType2 neighInputIt2;
-    
+
   itk::ImageRegionIterator<TOutputImage> outputIt;
 
 
@@ -220,15 +220,15 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit1=faceList1.begin(), fit2=faceList2.begin(); fit1 != faceList1.end(), fit2 != faceList2.end(); ++fit1, ++fit2)
-    { 
+    {
     neighInputIt1 = itk::ConstNeighborhoodIterator<TInputImage1>(r1, inputPtr1, *fit1);
     neighInputIt2 = itk::ConstNeighborhoodIterator<TInputImage2>(r2, inputPtr2, *fit2);
     // outputIt = itk::ImageRegionIterator<TOutputImage>(outputPtr, outputRegionForThread);
-      
+
     outputIt = itk::ImageRegionIterator<TOutputImage>(outputPtr, *fit1);
     neighInputIt1.OverrideBoundaryCondition(&nbc1);
     neighInputIt1.GoToBegin();
@@ -248,7 +248,7 @@ BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, T
     }
 
 
-  
+
 
 }
 
diff --git a/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.h b/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.h
index dc2b2797d8..780c6da059 100644
--- a/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.h
+++ b/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,13 +29,13 @@ namespace otb {
  * This class is parameterized over the types of the two input images
  * and the type of the output image.  It is also parameterized by the
  * operation to be applied.  A Functor style is used.
- * 
+ *
  * \ingroup IntensityImageFilters   Multithreaded
- */	
-template <class TInputImage1, class TInputImage2, 
+ */
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction >
-class ITK_EXPORT BinaryFunctorNeighborhoodVectorImageFilter 
-	: public itk::InPlaceImageFilter<TInputImage1,TOutputImage> 
+class ITK_EXPORT BinaryFunctorNeighborhoodVectorImageFilter
+	: public itk::InPlaceImageFilter<TInputImage1,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -46,7 +46,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(BinaryFunctorNeighborhoodVectorImageFilter,InPlaceImageFilter);
 
@@ -55,12 +55,12 @@ public:
   typedef TFunction   FunctorType;
   typedef TInputImage1 Input1ImageType;
   typedef typename Input1ImageType::ConstPointer Input1ImagePointer;
-  typedef typename Input1ImageType::RegionType Input1ImageRegionType; 
-  typedef typename Input1ImageType::PixelType Input1ImagePixelType; 
+  typedef typename Input1ImageType::RegionType Input1ImageRegionType;
+  typedef typename Input1ImageType::PixelType Input1ImagePixelType;
   typedef TInputImage2 Input2ImageType;
   typedef typename Input2ImageType::ConstPointer Input2ImagePointer;
-  typedef typename Input2ImageType::RegionType Input2ImageRegionType; 
-  typedef typename Input2ImageType::PixelType Input2ImagePixelType; 
+  typedef typename Input2ImageType::RegionType Input2ImageRegionType;
+  typedef typename Input2ImageType::PixelType Input2ImagePixelType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointer;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
@@ -75,8 +75,8 @@ public:
   /** Connect one of the operands for pixel-wise addition */
   void SetInput2( const TInputImage2 * image2);
 
-  /** Connect the set of radius. In fact, Self keeps the larger size 
-   * only to define neighborhood parameters, and gives the min and max 
+  /** Connect the set of radius. In fact, Self keeps the larger size
+   * only to define neighborhood parameters, and gives the min and max
    * radius to the functor. */
   void SetRadius ( const unsigned char & min, const unsigned char & max );
 
@@ -99,11 +99,11 @@ public:
   }
 
 
-  
+
   typedef itk::ConstNeighborhoodIterator<TInputImage1>
                                          NeighborhoodIteratorType1;
   typedef itk::ConstNeighborhoodIterator<TInputImage2>
-                                         NeighborhoodIteratorType2;  
+                                         NeighborhoodIteratorType2;
 
   typedef typename NeighborhoodIteratorType1::RadiusType  RadiusType1;
   typedef typename NeighborhoodIteratorType2::RadiusType  RadiusType2;
@@ -136,7 +136,7 @@ protected:
   virtual void GenerateOutputInformation(void);
 
   RadiusSizeType m_Radius;
-  
+
 private:
   BinaryFunctorNeighborhoodVectorImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.txx b/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.txx
index 66639bf318..1f2cd68ff0 100644
--- a/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.txx
+++ b/Code/Common/otbBinaryFunctorNeighborhoodVectorImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
 /**
  * Constructor
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
 ::BinaryFunctorNeighborhoodVectorImageFilter()
@@ -44,11 +44,11 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImag
 /**
  * Connect one of the operands for neighborhood-wise operation
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::SetInput1( const TInputImage1 * image1 ) 
+::SetInput1( const TInputImage1 * image1 )
 {
   // Process object is not const-correct so the const casting is required.
   SetNthInput(0, const_cast<TInputImage1 *>( image1 ));
@@ -58,11 +58,11 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImag
 /**
  * Connect one of the operands for neighborhood-wise operation
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
-::SetInput2( const TInputImage2 * image2 ) 
+::SetInput2( const TInputImage2 * image2 )
 {
   // Process object is not const-correct so the const casting is required.
   SetNthInput(1, const_cast<TInputImage2 *>( image2 ));
@@ -71,7 +71,7 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImag
 /**
  * Connect the interval of radius
  */
-template <class TInputImage1, class TInputImage2, 
+template <class TInputImage1, class TInputImage2,
           class TOutputImage, class TFunction  >
 void
 BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1,TInputImage2,TOutputImage,TFunction>
@@ -112,8 +112,8 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1, TInputImage2, TOutputIm
 
   Input1ImagePointer inputPtr1 = dynamic_cast<const TInputImage1 *>( ProcessObjectType::GetInput(0) );
   Input2ImagePointer inputPtr2 = dynamic_cast<const TInputImage2 *>( ProcessObjectType::GetInput(1) );
-    
-  
+
+
   RadiusType1 r1;
   r1.Fill(m_Radius);
   NeighborhoodIteratorType1 neighInputIt1;
@@ -121,9 +121,9 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1, TInputImage2, TOutputIm
   RadiusType2 r2;
   r2.Fill(m_Radius);
   NeighborhoodIteratorType2 neighInputIt2;
-    
+
   // This is the main difference from BinaryFunctorNeighborhoodImageFilter<TInputImage1, TInputImage2, TOutputImage, TFunction>::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, int threadId)
-  OutputImagePointer outputPtr = this->GetOutput(); 
+  OutputImagePointer outputPtr = this->GetOutput();
   outputPtr->SetNumberOfComponentsPerPixel( m_Functor.GetNumberOfComponentsPerPixel() );
   outputPtr->Allocate();
 
@@ -135,7 +135,7 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1, TInputImage2, TOutputIm
   typename TypeFace1::FaceListType faceList1;
   TypeFace1 bC1;
   faceList1 = bC1( inputPtr1, outputRegionForThread, r1 );
-  
+
   typedef typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<TInputImage2> TypeFace2;
   typename TypeFace2::FaceListType::iterator fit2;
   typename TypeFace2::FaceListType faceList2;
@@ -144,13 +144,13 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1, TInputImage2, TOutputIm
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
-  // Process each of the boundary faces.  
+
+  // Process each of the boundary faces.
   // Center first and then left, right, up, down borders
-	for ( fit1=faceList1.begin(), fit2=faceList2.begin(); 
+	for ( fit1=faceList1.begin(), fit2=faceList2.begin();
 			fit1 != faceList1.end() && fit2 != faceList2.end();
 			++fit1, ++fit2 )
-	{ 
+	{
 		neighInputIt1 = itk::ConstNeighborhoodIterator<TInputImage1> ( r1, inputPtr1, *fit1 );
 		neighInputIt1.OverrideBoundaryCondition( &nbc1 );
 		neighInputIt1.GoToBegin();
@@ -161,7 +161,7 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1, TInputImage2, TOutputIm
 
 		outputIt = itk::ImageRegionIterator<TOutputImage> ( outputPtr, *fit1 );
 		outputIt.GoToBegin();
-	
+
 		while ( !outputIt.IsAtEnd() )
 		{
 			outputIt.Set( m_Functor( neighInputIt1, neighInputIt2 ) );
@@ -169,7 +169,7 @@ BinaryFunctorNeighborhoodVectorImageFilter<TInputImage1, TInputImage2, TOutputIm
 			++neighInputIt1;
 			++neighInputIt2;
 			++outputIt;
-			
+
 			progress.CompletedPixel();
 		}
 	}
diff --git a/Code/Common/otbCommandLineArgumentParser.cxx b/Code/Common/otbCommandLineArgumentParser.cxx
index 8524c8094e..726290e676 100644
--- a/Code/Common/otbCommandLineArgumentParser.cxx
+++ b/Code/Common/otbCommandLineArgumentParser.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -49,7 +49,7 @@ namespace otb
   {
     return (this->IsOptionPresent("--OutputImage"));
   }
-  
+
   bool CommandLineArgumentParseResult
   ::IsOptionOTBTestingPresent(void)const
   {
@@ -113,12 +113,12 @@ namespace otb
   void CommandLineArgumentParseResult
   ::AddParameter(const std::string &option, const std::string &parameter)
   {
-    m_OptionMap[option].push_back(parameter);  
+    m_OptionMap[option].push_back(parameter);
   }
 
 
 // --------- CommandLineArgumentParser  ----------------------------------------
- 
+
   CommandLineArgumentParser
   ::CommandLineArgumentParser()
   {
@@ -132,13 +132,13 @@ namespace otb
   void CommandLineArgumentParser
   ::AddInputImage(bool obligatory)
   {
-    AddOption("--InputImage","input image file name ","-in",1,obligatory);	
+    AddOption("--InputImage","input image file name ","-in",1,obligatory);
   }
 
   void CommandLineArgumentParser
   ::AddOutputImage(bool obligatory)
   {
-    AddOption("--OutputImage","output image file name ","-out",1,obligatory);	
+    AddOption("--OutputImage","output image file name ","-out",1,obligatory);
   }
 
   void CommandLineArgumentParser
@@ -156,7 +156,7 @@ namespace otb
 
   // Add the option to the map
     m_OptionList.push_back(option);
-  
+
   }
 
   void CommandLineArgumentParser
@@ -175,23 +175,23 @@ namespace otb
   // Add the option to the map
     m_OptionList.push_back(option);
 
-	
+
   }
 
   void CommandLineArgumentParser
-  ::ParseGUI(CommandLineArgumentParseResult * outResult,bool failOnUnknownTrailingParameters ) 
+  ::ParseGUI(CommandLineArgumentParseResult * outResult,bool failOnUnknownTrailingParameters )
   {
-/* OTB Comment : Todo : use OTB_USE_VISU_GUI cmake option for generate this method 
+/* OTB Comment : Todo : use OTB_USE_VISU_GUI cmake option for generate this method
     Fl_Window *window = new Fl_Window(320,(m_OptionList.size()+2)*50);
 
-    std::vector<Fl_Input*> myInputs; 
-    unsigned int pos = 1; 
+    std::vector<Fl_Input*> myInputs;
+    unsigned int pos = 1;
     for(ListOptionType::iterator it = m_OptionList.begin();it!=m_OptionList.end();++it,++pos)
     {
     Fl_Input * tmpInput = new Fl_Input(50,pos*50,200,30,it->CommonName.c_str());
     tmpInput->tooltip(it->Description.c_str());
-     
-  } 
+
+  }
     Fl_Button * button = new Fl_Button(50,pos*50 , 130, 30, "Ok");
     button->tooltip("Validate parameters and exit.");
     window->end();
@@ -208,9 +208,9 @@ namespace otb
   }
 
 void CommandLineArgumentParser
-::ParseCommandLine(int argc, char *argv[], 
+::ParseCommandLine(int argc, char *argv[],
                     CommandLineArgumentParseResult * outResult,
-                    bool failOnUnknownTrailingParameters ) 
+                    bool failOnUnknownTrailingParameters )
 {
   bool tryParse = TryParseCommandLine(argc, argv, outResult, false, failOnUnknownTrailingParameters);
 
@@ -232,7 +232,7 @@ void CommandLineArgumentParser
   }
   tryParse = TryParseCommandLine(argc, argv, outResult, true, failOnUnknownTrailingParameters);
   if ( (tryParse == false) )
-  {	
+  {
     PrintUsage(std::cerr);
     CommandLineArgumentParserArgumentErrorException e(__FILE__, __LINE__);
     e.SetDescription("ParseCommandLine() argument Error");
@@ -241,7 +241,7 @@ void CommandLineArgumentParser
 }
 
 
-bool CommandLineArgumentParser::TryParseCommandLine(int argc, char *argv[], 
+bool CommandLineArgumentParser::TryParseCommandLine(int argc, char *argv[],
     CommandLineArgumentParseResult * outResult,
     bool reportFailedMsg,
     bool failOnUnknownTrailingParameters)
@@ -266,7 +266,7 @@ bool CommandLineArgumentParser::TryParseCommandLine(int argc, char *argv[],
       if(failOnUnknownTrailingParameters)
       {
           // Unknown argument found
-        if( reportFailedMsg == true) 
+        if( reportFailedMsg == true)
         {
           std::cerr << "The following '" << arg << "' option is unknown !!" << std::endl;
         }
@@ -281,10 +281,10 @@ bool CommandLineArgumentParser::TryParseCommandLine(int argc, char *argv[],
     {
       // Check if the number of parameters is correct
       int nParameters = m_OptionList[index].NumberOfParameters;
-      if(i+nParameters >= argc) 
+      if(i+nParameters >= argc)
       {
       // Too few parameters
-        if( reportFailedMsg == true) 
+        if( reportFailedMsg == true)
         {
           std::cerr << "Missing one (or more) parameter(s) for the following '" << arg << "' option." << std::endl;
         }
@@ -336,12 +336,12 @@ bool CommandLineArgumentParser::TryParseCommandLine(int argc, char *argv[],
     if ( (m_OptionList[cpt].Obligatory == true) && (m_OptionList[cpt].Finded == false) )
     {
           // Too few parameters
-      if( reportFailedMsg == true) 
+      if( reportFailedMsg == true)
       {
         std::cerr << "'" << m_OptionList[cpt].CommonName << "' argument is required !!!" << std::endl;
       }
       return false;
-    }	
+    }
   }
 
 // Everything is correct
@@ -361,12 +361,12 @@ bool CommandLineArgumentParser::FindOption(const std::string & option, int & ind
     {
       index = cpt;
       goOnFlag = false;
-      optionFoundFlag = true;	
+      optionFoundFlag = true;
     }
     cpt++;
     if( cpt >= m_OptionList.size() )
     {
-      goOnFlag = false;	
+      goOnFlag = false;
     }
   }
   return (optionFoundFlag);
@@ -404,7 +404,7 @@ void CommandLineArgumentParser::PrintUsage(std::ostream& os)const
       os << m_OptionList[i].CommonName ;
       if (m_OptionList[i].Synonim.empty() == false )
       {
-        os << "|"<<m_OptionList[i].Synonim;	
+        os << "|"<<m_OptionList[i].Synonim;
       }
       if ( m_OptionList[i].Obligatory == false ) os <<"]";
       else os << " ";
diff --git a/Code/Common/otbCommandLineArgumentParser.h b/Code/Common/otbCommandLineArgumentParser.h
index 8fef74394c..7f20cdd9e9 100644
--- a/Code/Common/otbCommandLineArgumentParser.h
+++ b/Code/Common/otbCommandLineArgumentParser.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,22 +35,22 @@
 
 /** \class CommandLineArgumentParserHelpException
  * \brief This exception is thrown when the help menu is displayed.
- */ 
-class ITK_EXPORT CommandLineArgumentParserHelpException 
-  : public itk::ExceptionObject 
+ */
+class ITK_EXPORT CommandLineArgumentParserHelpException
+  : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro(CommandLineArgumentParserHelpException , ExceptionObject );
 
   /** Constructor. */
- CommandLineArgumentParserHelpException(const char *file, unsigned int line, 
+ CommandLineArgumentParserHelpException(const char *file, unsigned int line,
                            const char* message = "Help:",
-                           const char* loc = "Unknown" ) : 
+                           const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {}
   /** Constructor. */
- CommandLineArgumentParserHelpException(const std::string &file, unsigned int line, 
+ CommandLineArgumentParserHelpException(const std::string &file, unsigned int line,
                            const char* message = "Help:",
                            const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
@@ -59,22 +59,22 @@ public:
 
 /** \class CommandLineArgumentParserVersionException
  * \brief This exception is thrown when the version is displayed.
- */ 
-class ITK_EXPORT CommandLineArgumentParserVersionException 
-  : public itk::ExceptionObject 
+ */
+class ITK_EXPORT CommandLineArgumentParserVersionException
+  : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro(CommandLineArgumentParserVersionException , ExceptionObject );
 
   /** Constructor. */
- CommandLineArgumentParserVersionException(const char *file, unsigned int line, 
+ CommandLineArgumentParserVersionException(const char *file, unsigned int line,
                            const char* message = "Version:",
-                           const char* loc = "Unknown" ) : 
+                           const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {}
   /** Constructor. */
- CommandLineArgumentParserVersionException(const std::string &file, unsigned int line, 
+ CommandLineArgumentParserVersionException(const std::string &file, unsigned int line,
                            const char* message = "Version:",
                            const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
@@ -83,22 +83,22 @@ public:
 
 /** \class CommandLineArgumentParserArgumentErrorException
  * \brief This exception is thrown when the version is displayed.
- */ 
-class ITK_EXPORT CommandLineArgumentParserArgumentErrorException 
-  : public itk::ExceptionObject 
+ */
+class ITK_EXPORT CommandLineArgumentParserArgumentErrorException
+  : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro(CommandLineArgumentParserArgumentErrorException , ExceptionObject );
 
   /** Constructor. */
- CommandLineArgumentParserArgumentErrorException(const char *file, unsigned int line, 
+ CommandLineArgumentParserArgumentErrorException(const char *file, unsigned int line,
                            const char* message = "Argument error:",
-                           const char* loc = "Unknown" ) : 
+                           const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {}
   /** Constructor. */
- CommandLineArgumentParserArgumentErrorException(const std::string &file, unsigned int line, 
+ CommandLineArgumentParserArgumentErrorException(const std::string &file, unsigned int line,
                            const char* message = "Argument error:",
                            const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
@@ -135,7 +135,7 @@ public:
 
   /** Check whether the output image option was passed in or not */
   bool IsOptionOutputImagePresent(void) const;
-  
+
   /** Check whether the OTBTesting option was passed in or not */
   bool IsOptionOTBTestingPresent(void)const;
 
@@ -155,8 +155,8 @@ public:
         flux >> lValeur;                                                                \
         return lValeur;                                                                 \
   }
-  
-	
+
+
 	otbGetParameterMacro(Char,char);
 	otbGetParameterMacro(Short,short);
   otbGetParameterMacro(UShort,unsigned short);
@@ -225,7 +225,7 @@ private:
  */
 class ITK_EXPORT CommandLineArgumentParser : public itk::ProcessObject
 {
-public: 
+public:
   typedef CommandLineArgumentParser      Self;
   typedef itk::ProcessObject                	Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
@@ -234,14 +234,14 @@ public:
   itkNewMacro(Self);
   itkTypeMacro(CommandLineArgumentParser,itk::ProcessObject);
 
-  /** Add an input image option */ 
+  /** Add an input image option */
   void AddInputImage(bool obligatory=true);
-  /** Add an output image option */ 
+  /** Add an output image option */
   void AddOutputImage(bool obligatory=true);
-  
+
   itkSetStringMacro(ProgramDescription);
   itkGetStringMacro(ProgramDescription);
-  
+
   /** Add an option with 0 or more parameters (words that follow it) */
 //  void AddOption(const char *name, const int nParameters, const char * comment);
   // at least one value
@@ -249,11 +249,11 @@ public:
   void AddOption(std::string name, std::string comment, std::string synonim = NULL, int nParameters = 1, bool obligatory =true);
   // if -1 we do not know the number of parameters
   void AddOptionNParams(std::string name, std::string  comment, std::string synonim = NULL, bool obligatory =true);
-  
-  /** Add a different string that envokes the same option (--file and -f) */  
+
+  /** Add a different string that envokes the same option (--file and -f) */
 //  void AddSynonim(const char *option, const char *synonim);
 
-  void ParseCommandLine(int argc, char *argv[], 
+  void ParseCommandLine(int argc, char *argv[],
                            CommandLineArgumentParseResult * outResult,
                            bool failOnUnknownTrailingParameters = true);
 
@@ -262,7 +262,7 @@ public:
 protected:
   CommandLineArgumentParser();
   ~CommandLineArgumentParser(){};
- 
+
 private:
 
   void PrintUsage(std::ostream& os) const;
@@ -270,12 +270,12 @@ private:
   bool FindOption(const std::string & , int & index);
 
   /** Try processing a command line.  Returns false if something breaks */
-  bool TryParseCommandLine(int argc, char *argv[], 
+  bool TryParseCommandLine(int argc, char *argv[],
                            CommandLineArgumentParseResult * outResult,
                            bool reportFailedMsg,
                            bool failOnUnknownTrailingParameters );
 
-  typedef struct 
+  typedef struct
     {
     std::string CommonName;             // option name
     std::string Description;            // option description
@@ -286,13 +286,13 @@ private:
     bool Finded;                        // check if the option is present
     } OptionType;
   typedef std::vector< OptionType> ListOptionType;
-  
+
   ListOptionType m_OptionList;
 
 
   std::string m_ProgramName;
   std::string m_ProgramDescription;
-  
+
 };
 
 }
diff --git a/Code/Common/otbConcatenateVectorImageFilter.h b/Code/Common/otbConcatenateVectorImageFilter.h
index 2120125cb5..d40618c38d 100644
--- a/Code/Common/otbConcatenateVectorImageFilter.h
+++ b/Code/Common/otbConcatenateVectorImageFilter.h
@@ -28,7 +28,7 @@ namespace otb
  * image with the vector pixel of the second image.
  */
 template<class TInputImage1,class TInputImage2,class TOutputImage>
-class ITK_EXPORT ConcatenateVectorImageFilter 
+class ITK_EXPORT ConcatenateVectorImageFilter
 : public itk::ImageToImageFilter<TInputImage1,TOutputImage>
 {
 public:
@@ -39,7 +39,7 @@ public:
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(VectorImageToImagePixelAccessor,ImageToImageFilter);
@@ -48,7 +48,7 @@ public:
   typedef TInputImage1 InputImage1Type;
   typedef TInputImage2 InputImage2Type;
   typedef TOutputImage OutputImageType;
-  
+
   typedef typename InputImage1Type::Pointer InputImage1PointerType;
   typedef typename InputImage2Type::Pointer InputImage2PointerType;
   typedef typename OutputImageType::Pointer OutputImagePointerType;
@@ -85,7 +85,7 @@ public:
   /** Destructor. */
   virtual ~ConcatenateVectorImageFilter();
   /** Main computation method. */
-  void GenerateData(void); 
+  void GenerateData(void);
   /** PrintSelf method */
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
@@ -95,6 +95,6 @@ private:
 };
 } // end namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
-#include "otbConcatenateVectorImageFilter.txx"  
+#include "otbConcatenateVectorImageFilter.txx"
 #endif
 #endif
diff --git a/Code/Common/otbConcatenateVectorImageFilter.txx b/Code/Common/otbConcatenateVectorImageFilter.txx
index 103b471d7d..3f72386d30 100644
--- a/Code/Common/otbConcatenateVectorImageFilter.txx
+++ b/Code/Common/otbConcatenateVectorImageFilter.txx
@@ -22,7 +22,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkImageRegionIterator.h"
 
 namespace otb {
-  /** 
+  /**
    * Constructor.
    */
   template <class TInputImage1,class TInputImage2,class TOutputImage>
@@ -31,8 +31,8 @@ namespace otb {
   {
     this->SetNumberOfRequiredInputs(2);
   }
-  /** 
-   * Destructor. 
+  /**
+   * Destructor.
    */
   template <class TInputImage1,class TInputImage2,class TOutputImage>
   ConcatenateVectorImageFilter<TInputImage1,TInputImage2,TOutputImage>
@@ -84,7 +84,7 @@ namespace otb {
   {
     return const_cast<InputImage2Type *>(this->GetInput(1));
   }
-  /** 
+  /**
    * Main computation method.
    */
   template <class TInputImage1,class TInputImage2,class TOutputImage>
@@ -100,12 +100,12 @@ namespace otb {
     // Check the requested regions
     typename InputImage1Type::RegionType region1 = input1->GetRequestedRegion();
     typename InputImage2Type::RegionType region2 = input2->GetRequestedRegion();
-    
+
     if(region1!=region2)
       {
 	itkExceptionMacro(<<"InputImage1 and InputImage2 have different requested regions.");
       }
-    
+
     // Iterators typedefs
     typedef itk::ImageRegionIterator<InputImage1Type> Input1IteratorType;
     typedef itk::ImageRegionIterator<InputImage2Type> Input2IteratorType;
@@ -125,7 +125,7 @@ namespace otb {
     input1It.GoToBegin();
     input2It.GoToBegin();
     outputIt.GoToBegin();
-    
+
     // Iterate through the pixel
     while(!input1It.IsAtEnd()
 	  &&!input2It.IsAtEnd()
diff --git a/Code/Common/otbDataNode.h b/Code/Common/otbDataNode.h
index 04c59db64b..35f6562f64 100644
--- a/Code/Common/otbDataNode.h
+++ b/Code/Common/otbDataNode.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@
 namespace otb
 {
 /**
- * This enumeration describes the type fo nodes used to represent a tree of vector data in the Orfeo ToolBox. 
+ * This enumeration describes the type fo nodes used to represent a tree of vector data in the Orfeo ToolBox.
  */
 typedef
 enum{ROOT,DOCUMENT,FOLDER,FEATURE_POINT,FEATURE_LINE,FEATURE_POLYGON,FEATURE_MULTIPOINT,FEATURE_MULTILINE,FEATURE_MULTIPOLYGON,FEATURE_COLLECTION} NodeType;
@@ -36,17 +36,17 @@ enum{ROOT,DOCUMENT,FOLDER,FEATURE_POINT,FEATURE_LINE,FEATURE_POLYGON,FEATURE_MUL
 
 /** \class DataNode
  *  \brief This class represent a node of data in a vector data hierarchy.
- *   A DataNode has a type represented by the NodeType enumeration. Depending of 
+ *   A DataNode has a type represented by the NodeType enumeration. Depending of
  *  its type, it can have associated data such as Point, Line or Polygon.
  *
- *  A flag indicates if the data are valid or not. 
+ *  A flag indicates if the data are valid or not.
  *
  *  A DataNode has also a dictionnary of fields which can be used to store associated data.
  *  Depending of the writing vector data file format, fields will be used by the writing driver.
  *
  * \sa VectorData
  */
-template <class TPrecision = double, unsigned VDimension = 2> 
+template <class TPrecision = double, unsigned VDimension = 2>
 class DataNode
 : public itk::Object
  {
@@ -71,10 +71,10 @@ class DataNode
    typedef otb::PolyLineParametricPathWithValue<double,VDimension>    LineType;
    typedef typename LineType::Pointer                 LinePointerType;
    typedef Polygon<PrecisionType>                     PolygonType;
-   typedef typename PolygonType::Pointer              PolygonPointerType; 
+   typedef typename PolygonType::Pointer              PolygonPointerType;
    typedef ObjectList<PolygonType>                    PolygonListType;
    typedef typename PolygonListType::Pointer          PolygonListPointerType;
-   
+
    /** Fields typedef */
    typedef std::map<std::string,std::string>          FieldMapType;
    typedef std::pair<std::string,std::string>         FieldType;
@@ -112,7 +112,7 @@ class DataNode
     * Get the polygon interior rings data, when valid.
     * \return The polygon interior rings list.
     */
-   PolygonListPointerType GetPolygonInteriorRings() const;   
+   PolygonListPointerType GetPolygonInteriorRings() const;
    /**
     * Set the point data. Node type is automatically set to FEATURE_POINT.
     * \param point the point.
@@ -158,7 +158,7 @@ class DataNode
    /**
     * \return True if node type is FEATURE_POLYGON.
     */
-   bool IsPolygonFeature() const;    
+   bool IsPolygonFeature() const;
    /**
     * \return True if node type is FEATURE_MULTIPOINT.
     */
@@ -210,7 +210,7 @@ class DataNode
     * Clear all fields.
     */
    void ClearFields();
-  
+
    protected:
    /** Constructor */
    DataNode();
@@ -218,11 +218,11 @@ class DataNode
    ~DataNode(){};
    /** PrintSelf method */
    void PrintSelf(std::ostream& os, itk::Indent indent) const;
-   
+
    private:
    DataNode(const Self&); //purposely not implemented
    void operator=(const Self&); //purposely not implemented
-   
+
    /** typedef of the data associated with the node */
    typedef struct {
      bool      valid;
@@ -233,14 +233,14 @@ class DataNode
    } DataType;
 
    /** The node type */
-   NodeType             m_NodeType;  
-   
+   NodeType             m_NodeType;
+
    /** The node id */
    std::string          m_NodeId;
-   
+
    /** The data associated with the node */
    DataType             m_Data;
-   
+
    /** The fields map */
    FieldMapType         m_FieldMap;
  };
diff --git a/Code/Common/otbDataNode.txx b/Code/Common/otbDataNode.txx
index 40c3008481..1572d26f30 100644
--- a/Code/Common/otbDataNode.txx
+++ b/Code/Common/otbDataNode.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -41,7 +41,7 @@ DataNode<TPrecision,VDimension>
 }
 
 template <class TPrecision, unsigned int VDimension>
-void 
+void
 DataNode<TPrecision,VDimension>
 ::SetPoint(PointType point)
 {
@@ -58,8 +58,8 @@ template <class TPrecision, unsigned int VDimension>
   m_Data.line = line;
   m_Data.valid = true;
 }
-template <class TPrecision, unsigned int VDimension> 
- void 
+template <class TPrecision, unsigned int VDimension>
+ void
 DataNode<TPrecision,VDimension>
 ::SetPolygonExteriorRing(PolygonType* polygon)
 {
@@ -72,8 +72,8 @@ DataNode<TPrecision,VDimension>
   m_Data.valid = true;
 }
 
-template <class TPrecision, unsigned int VDimension> 
- void 
+template <class TPrecision, unsigned int VDimension>
+ void
 DataNode<TPrecision,VDimension>
   ::SetPolygonInteriorRings(PolygonListType* polygonList)
 {
@@ -86,9 +86,9 @@ DataNode<TPrecision,VDimension>
   m_Data.valid = true;
 }
 
-template <class TPrecision, unsigned int VDimension>  
+template <class TPrecision, unsigned int VDimension>
 typename DataNode<TPrecision,VDimension>
-::PointType      
+::PointType
 DataNode<TPrecision,VDimension>
 ::GetPoint() const
 {
@@ -104,10 +104,10 @@ DataNode<TPrecision,VDimension>
 }
 template <class TPrecision, unsigned int VDimension>
 typename DataNode<TPrecision,VDimension>
-::LinePointerType    
+::LinePointerType
 DataNode<TPrecision,VDimension>
 ::GetLine() const
-{  
+{
   if(!IsLineFeature())
     {
       itkGenericExceptionMacro(<<"Node "<<m_NodeId<<" is not a line.");
@@ -121,7 +121,7 @@ DataNode<TPrecision,VDimension>
 }
 template <class TPrecision, unsigned int VDimension>
 typename DataNode<TPrecision,VDimension>
-::PolygonPointerType 
+::PolygonPointerType
 DataNode<TPrecision,VDimension>
 ::GetPolygonExteriorRing() const
 {
@@ -138,7 +138,7 @@ DataNode<TPrecision,VDimension>
 
 template <class TPrecision, unsigned int VDimension>
 typename DataNode<TPrecision,VDimension>
-::PolygonListPointerType 
+::PolygonListPointerType
 DataNode<TPrecision,VDimension>
 ::GetPolygonInteriorRings() const
 {
@@ -153,7 +153,7 @@ DataNode<TPrecision,VDimension>
    return m_Data.interiorRings;
 }
 
-template <class TPrecision, unsigned int VDimension>  
+template <class TPrecision, unsigned int VDimension>
 void
 DataNode<TPrecision,VDimension>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
@@ -162,7 +162,7 @@ DataNode<TPrecision,VDimension>
 }
 
 
-template <class TPrecision, unsigned int VDimension>  
+template <class TPrecision, unsigned int VDimension>
 std::string
 DataNode<TPrecision,VDimension>
 ::GetNodeTypeAsString() const
@@ -184,7 +184,7 @@ DataNode<TPrecision,VDimension>
       {
 	oss<<"Folder ("<<m_NodeId<<")";
 	break;
-      }   
+      }
     case FEATURE_POINT:
       {
 	oss<<"Point ("<<m_NodeId<<") "<<m_Data.point;
@@ -225,14 +225,14 @@ DataNode<TPrecision,VDimension>
 }
 
 template <class TPrecision, unsigned int VDimension>
-void 
+void
 DataNode<TPrecision,VDimension>
 ::SetField(std::string key, std::string value)
 {
   m_FieldMap[key] = value;
 }
 template <class TPrecision, unsigned int VDimension>
-  std::string 
+  std::string
 DataNode<TPrecision,VDimension>
 ::GetField(std::string key) const
 {
@@ -246,7 +246,7 @@ DataNode<TPrecision,VDimension>
     }
 }
 template <class TPrecision, unsigned int VDimension>
-  void 
+  void
 DataNode<TPrecision,VDimension>
 ::RemoveField(std::string key)
 {
@@ -278,56 +278,56 @@ DataNode<TPrecision,VDimension>
   return FieldType("No key","No value");
 }
 template <class TPrecision, unsigned int VDimension>
-  unsigned int 
+  unsigned int
 DataNode<TPrecision,VDimension>
 ::GetNumberOfFields() const
 {
   return m_FieldMap.size();
 }
 template <class TPrecision, unsigned int VDimension>
-  void 
+  void
 DataNode<TPrecision,VDimension>
 ::ClearFields()
 {
   m_FieldMap.clear();
 }
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsDocument() const
 {
   return m_NodeType == DOCUMENT;
 }
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsRoot() const
 {
   return m_NodeType == ROOT;
 }
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsFolder() const
 {
   return m_NodeType == FOLDER;
 }
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsPointFeature() const
 {
   return m_NodeType == FEATURE_POINT;
 }
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsLineFeature() const
 {
   return m_NodeType == FEATURE_LINE;
 }
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsPolygonFeature() const
 {
@@ -335,7 +335,7 @@ DataNode<TPrecision,VDimension>
 }
 
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsMultiPointFeature() const
 {
@@ -343,7 +343,7 @@ DataNode<TPrecision,VDimension>
 }
 
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsMultiLineFeature() const
 {
@@ -351,7 +351,7 @@ DataNode<TPrecision,VDimension>
 }
 
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsMultiPolygonFeature() const
 {
@@ -359,7 +359,7 @@ DataNode<TPrecision,VDimension>
 }
 
 template <class TPrecision, unsigned int VDimension>
-  bool 
+  bool
 DataNode<TPrecision,VDimension>
 ::IsCollectionFeature() const
 {
diff --git a/Code/Common/otbDifferenceImageFilter.h b/Code/Common/otbDifferenceImageFilter.h
index 01eb1c3488..dec5bc04ce 100644
--- a/Code/Common/otbDifferenceImageFilter.h
+++ b/Code/Common/otbDifferenceImageFilter.h
@@ -7,7 +7,7 @@
 
 namespace otb
 {
-  
+
 /** \class DifferenceImageFilter
  * \brief Implements comparison between two images.
  *
@@ -16,12 +16,12 @@ namespace otb
  * computed by visiting all the pixels in the baseline images and comparing
  * their values with the pixel values in the neighborhood of the homologous
  * pixel in the other image.
- * 
+ *
  * \ingroup IntensityImageFilters   Multithreaded
  */
 template <class TInputImage, class TOutputImage>
 class ITK_EXPORT DifferenceImageFilter :
-    public itk::ImageToImageFilter<TInputImage, TOutputImage> 
+    public itk::ImageToImageFilter<TInputImage, TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -32,44 +32,44 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(DifferenceImageFilter, ImageToImageFilter);
-  
+
   /** Some convenient typedefs. */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::PixelType OutputPixelType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
   typedef typename itk::NumericTraits<OutputPixelType>::RealType RealType;
-  typedef typename itk::NumericTraits<RealType>::AccumulateType AccumulateType;  
+  typedef typename itk::NumericTraits<RealType>::AccumulateType AccumulateType;
   typedef typename RealType::RealValueType ScalarRealType;
-  
+
   /** Set the valid image input.  This will be input 0.  */
   virtual void SetValidInput(const InputImageType* validImage);
-  
+
   /** Set the test image input.  This will be input 1.  */
   virtual void SetTestInput(const InputImageType* testImage);
-  
+
   /** Set/Get the maximum distance away to look for a matching pixel.
       Default is 0. */
   itkSetMacro(ToleranceRadius, int);
   itkGetMacro(ToleranceRadius, int);
-  
+
   /** Set/Get the minimum threshold for pixels to be different (relative).
       Default is 0. */
   itkSetMacro(DifferenceThreshold,ScalarRealType );
   itkGetMacro(DifferenceThreshold,ScalarRealType );
-  
+
   /** Get parameters of the difference image after execution.  */
   itkGetMacro(MeanDifference, RealType);
   itkGetMacro(TotalDifference, RealType);
   itkGetMacro(NumberOfPixelsWithDifferences, unsigned long);
-  
+
 protected:
   DifferenceImageFilter();
   virtual ~DifferenceImageFilter() {}
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   /** DifferenceImageFilter can be implemented as a multithreaded
@@ -85,20 +85,20 @@ protected:
    *     ImageToImageFilter::GenerateData()  */
   void ThreadedGenerateData(const OutputImageRegionType& threadRegion,
                             int threadId);
-  
+
   void BeforeThreadedGenerateData();
   void AfterThreadedGenerateData();
   virtual void GenerateOutputInformation();
-  
+
   ScalarRealType m_DifferenceThreshold;
   RealType m_MeanDifference;
   RealType m_TotalDifference;
   unsigned long  m_NumberOfPixelsWithDifferences;
   int m_ToleranceRadius;
-  
+
   std::vector<RealType> m_ThreadDifferenceSum;
   itk::Array<unsigned long>  m_ThreadNumberOfPixels;
-  
+
 private:
   DifferenceImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/Common/otbDifferenceImageFilter.txx b/Code/Common/otbDifferenceImageFilter.txx
index 03528bdd06..fe36fa8247 100644
--- a/Code/Common/otbDifferenceImageFilter.txx
+++ b/Code/Common/otbDifferenceImageFilter.txx
@@ -21,13 +21,13 @@ DifferenceImageFilter<TInputImage, TOutputImage>
 {
   // We require two inputs to execute.
   this->SetNumberOfRequiredInputs(2);
-  
+
   // Set the default DifferenceThreshold.
   m_DifferenceThreshold = itk::NumericTraits<ScalarRealType>::Zero;
-  
+
   // Set the default ToleranceRadius.
   m_ToleranceRadius = 0;
-  
+
   // Initialize statistics about difference image.
   m_MeanDifference.SetSize(0);
   m_TotalDifference.SetSize(0);
@@ -38,22 +38,22 @@ DifferenceImageFilter<TInputImage, TOutputImage>
 
 //----------------------------------------------------------------------------
 template<class TInputImage, class TOutputImage>
-void 
+void
 DifferenceImageFilter<TInputImage, TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   this->Superclass::PrintSelf(os, indent);
-  os << indent << "ToleranceRadius: " << m_ToleranceRadius << "\n";  
+  os << indent << "ToleranceRadius: " << m_ToleranceRadius << "\n";
   os << indent << "DifferenceThreshold: " << m_DifferenceThreshold << "\n";
   os << indent << "MeanDifference: " << m_MeanDifference << "\n";
   os << indent << "TotalDifference: " << m_TotalDifference << "\n";
-  os << indent << "NumberOfPixelsWithDifferences: " 
+  os << indent << "NumberOfPixelsWithDifferences: "
                << m_NumberOfPixelsWithDifferences << "\n";
 }
 
 //----------------------------------------------------------------------------
 template <class TInputImage, class TOutputImage>
-void 
+void
 DifferenceImageFilter<TInputImage, TOutputImage>
 ::SetValidInput(const InputImageType* validImage)
 {
@@ -63,7 +63,7 @@ DifferenceImageFilter<TInputImage, TOutputImage>
 
 //----------------------------------------------------------------------------
 template <class TInputImage, class TOutputImage>
-void 
+void
 DifferenceImageFilter<TInputImage, TOutputImage>
 ::SetTestInput(const InputImageType* testImage)
 {
@@ -97,11 +97,11 @@ DifferenceImageFilter<TInputImage, TOutputImage>
   m_MeanDifference.Fill(itk::NumericTraits<ScalarRealType>::Zero);
   m_TotalDifference.Fill(itk::NumericTraits<ScalarRealType>::Zero);
   m_NumberOfPixelsWithDifferences = 0;
-  
+
   // Resize the thread temporaries
   m_ThreadDifferenceSum.reserve(numberOfThreads);
   m_ThreadNumberOfPixels.SetSize(numberOfThreads);
-  
+
   // Initialize the temporaries
   for(int i = 0;  i<numberOfThreads;++i)
     {
@@ -124,15 +124,15 @@ DifferenceImageFilter<TInputImage, TOutputImage>
   typedef typename FacesCalculator::FaceListType FaceListType;
   typedef typename FaceListType::iterator FaceListIterator;
   typedef typename InputImageType::PixelType InputPixelType;
-  
+
   // Prepare standard boundary condition.
   itk::ZeroFluxNeumannBoundaryCondition<InputImageType> nbc;
-  
+
   // Get a pointer to each image.
   const InputImageType* validImage = this->GetInput(0);
   const InputImageType* testImage = this->GetInput(1);
   OutputImageType* outputPtr = this->GetOutput();
-  
+
   // Create a radius of pixels.
   RadiusType radius;
   if(m_ToleranceRadius > 0)
@@ -143,29 +143,29 @@ DifferenceImageFilter<TInputImage, TOutputImage>
   {
     radius.Fill(0);
   }
-  
+
   // Find the data-set boundary faces.
   FacesCalculator boundaryCalculator;
   FaceListType faceList = boundaryCalculator(testImage, threadRegion, radius);
-  
+
   // Support progress methods/callbacks.
   itk::ProgressReporter progress(this, threadId, threadRegion.GetNumberOfPixels());
 
   // Process the internal face and each of the boundary faces.
   for (FaceListIterator face = faceList.begin(); face != faceList.end(); ++face)
-  { 
+  {
     SmartIterator test(radius, testImage, *face); // Iterate over test image.
     InputIterator valid(validImage, *face);       // Iterate over valid image.
     OutputIterator out(outputPtr, *face);         // Iterate over output image.
     test.OverrideBoundaryCondition(&nbc);
-    
+
     for(valid.GoToBegin(), test.GoToBegin(), out.GoToBegin();
         !valid.IsAtEnd();
         ++valid, ++test, ++out)
     {
       // Get the current valid pixel.
       InputPixelType t = valid.Get();
-      
+
       // Find the closest-valued pixel in the neighborhood of the test
       // image.
       OutputPixelType minimumDifference = itk::NumericTraits<OutputPixelType>::max(t);
@@ -183,7 +183,7 @@ DifferenceImageFilter<TInputImage, TOutputImage>
             difference[j]*=-1;
           }
           ScalarRealType d = static_cast<ScalarRealType>(difference[j]);
-	  
+
           if(d < minimumDifference[j])
           {
             minimumDifference[j] = d;
@@ -203,11 +203,11 @@ DifferenceImageFilter<TInputImage, TOutputImage>
       {
         if (vcl_abs(t[j])>tMax) tMax = vcl_abs(t[j]);
       }
-	
+
   // Check if difference is above threshold
   // the threshold is interpreted as relative to the value
       bool isDifferent = false;
-	
+
       for(unsigned int j = 0;j<minimumDifference.Size();++j)
       {
         if(minimumDifference[j] > m_DifferenceThreshold * tMax)
@@ -221,7 +221,7 @@ DifferenceImageFilter<TInputImage, TOutputImage>
       {
 	    // Store the minimum difference value in the output image.
         out.Set(minimumDifference);
-        
+
 	    // Update difference image statistics.
         m_ThreadDifferenceSum[threadId] += minimumDifference;
         m_ThreadNumberOfPixels[threadId]++;
@@ -231,7 +231,7 @@ DifferenceImageFilter<TInputImage, TOutputImage>
 	    // Difference is below threshold.
         out.Set(itk::NumericTraits<OutputPixelType>::Zero(minimumDifference));
       }
-      
+
       // Update progress.
       progress.CompletedPixel();
     }
@@ -250,16 +250,16 @@ DifferenceImageFilter<TInputImage, TOutputImage>
     m_TotalDifference += m_ThreadDifferenceSum[i];
     m_NumberOfPixelsWithDifferences += m_ThreadNumberOfPixels[i];
     }
-  
+
   // Get the total number of pixels processed in the region.
   // This is different from the m_TotalNumberOfPixels which
   // is the number of pixels that actually have differences
   // above the intensity threshold.
   OutputImageRegionType region = this->GetOutput()->GetRequestedRegion();
   unsigned int numberOfPixels = region.GetNumberOfPixels();
-  
+
   // Calculate the mean difference.
- 
+
       m_MeanDifference = m_TotalDifference / numberOfPixels;
 }
 
diff --git a/Code/Common/otbDrawLineSpatialObjectFilter.h b/Code/Common/otbDrawLineSpatialObjectFilter.h
index a2684edbe2..a1c1da6557 100644
--- a/Code/Common/otbDrawLineSpatialObjectFilter.h
+++ b/Code/Common/otbDrawLineSpatialObjectFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,14 +30,14 @@ namespace otb
  * \brief Application of a filter which draw line in a binary image.
  *
  * This class implements a filter that draws line in a binary image.
- * Inputs are a LineSpatialObject and an input image that is used to 
- * allocate the output image. This filter copies the input image in 
+ * Inputs are a LineSpatialObject and an input image that is used to
+ * allocate the output image. This filter copies the input image in
  * the output image.
- *  
+ *
  */
 
 template <class TInputImage, class TOutputImage>
-class  ITK_EXPORT DrawLineSpatialObjectFilter : 
+class  ITK_EXPORT DrawLineSpatialObjectFilter :
 public itk::SpatialObjectToImageFilter< itk::LineSpatialObject<2>, TOutputImage >
 {
 public:
@@ -45,14 +45,14 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
 
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
-  
+
 
   /** typedef for the classes standards. */
   typedef DrawLineSpatialObjectFilter Self;
@@ -71,32 +71,32 @@ public:
 
   /** Return the name of the class. */
   itkTypeMacro(DrawLineSpatialObjectFilter, SpatialObjectToImageFilter);
-  
+
   /** Definition of the input and output images */
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
   /** Definition of the size of the images. */
   typedef typename InputImageType::SizeType SizeType;
-  
+
   typedef typename OutputImageType::IndexType IndexType;
-  
+
   /** Set/Get the image input of this process object. */
   virtual void SetInputImage(const InputImageType *image);
   const InputImageType * GetInputImage(void);
-  
+
   /** Get the input LineSpatialObjet (not const) */
   virtual void SetInputLine(const InputLineType *line);
   InputLineType * GetInput(void);
-  
+
   // Set/Get pixel value
   itkSetMacro(Value, OutputPixelType);
   itkGetConstReferenceMacro(Value, OutputPixelType);
 
-  
+
 protected:
   DrawLineSpatialObjectFilter();
   virtual ~DrawLineSpatialObjectFilter() {};
@@ -118,5 +118,5 @@ private:
 #include "otbDrawLineSpatialObjectFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/Common/otbDrawLineSpatialObjectFilter.txx b/Code/Common/otbDrawLineSpatialObjectFilter.txx
index 76fb110b10..0a58ab8880 100644
--- a/Code/Common/otbDrawLineSpatialObjectFilter.txx
+++ b/Code/Common/otbDrawLineSpatialObjectFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,45 +32,45 @@
 namespace otb
 {
 
-/** 
+/**
  *
  */
 template <class TInputImage, class TOutputImage>
 DrawLineSpatialObjectFilter<TInputImage, TOutputImage>::DrawLineSpatialObjectFilter()
 {
   this->SetNumberOfRequiredInputs(2);
-  this->SetNumberOfRequiredOutputs(1); 
-  
+  this->SetNumberOfRequiredOutputs(1);
+
   m_Value = static_cast<OutputPixelType>(255.0);
-   
+
 }
 
 template <class TInputImage, class TOutputImage>
 void
 DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
 ::SetInputLine(const InputLineType *line)
-{  
-  this->ProcessObjectType::SetNthInput(0, 
+{
+  this->ProcessObjectType::SetNthInput(0,
                                    const_cast< InputLineType * >( line ) );
 }
 
 
 template <class TInputImage, class TOutputImage>
-typename DrawLineSpatialObjectFilter<TInputImage, TOutputImage>::InputLineType * 
+typename DrawLineSpatialObjectFilter<TInputImage, TOutputImage>::InputLineType *
 DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
 ::GetInput(void)
-{  
+{
     return static_cast<InputLineType *>
     (this->ProcessObjectType::GetInput(0) );
 }
-    
-    
+
+
 template <class TInputImage, class TOutputImage>
 void
 DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
 ::SetInputImage(const InputImageType *image)
 {
-  this->ProcessObjectType::SetNthInput(1, 
+  this->ProcessObjectType::SetNthInput(1,
                                    const_cast< InputImageType * >( image ) );
 }
 
@@ -84,7 +84,7 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
     {
     return 0;
     }
-  
+
   return static_cast<const InputImageType *>
     (this->ProcessObjectType::GetInput(1) );
 }
@@ -100,7 +100,7 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
 
     // Get the region
   typename OutputImageType::RegionType region;
-  
+
 
   region.SetSize(input->GetLargestPossibleRegion().GetSize());
   region.SetIndex(input->GetLargestPossibleRegion().GetIndex());
@@ -109,9 +109,9 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
   output->SetSpacing(input->GetSpacing());
   output->Allocate();
 
-  typedef itk::ImageRegionIteratorWithIndex< OutputImageType > OutputIteratorType; 
-  typedef itk::ImageRegionConstIteratorWithIndex< InputImageType >  InputIteratorType; 
-    
+  typedef itk::ImageRegionIteratorWithIndex< OutputImageType > OutputIteratorType;
+  typedef itk::ImageRegionConstIteratorWithIndex< InputImageType >  InputIteratorType;
+
   OutputIteratorType    outputIt( output, output->GetRequestedRegion() );
   InputIteratorType     inputIt(  input,  input->GetRequestedRegion() );
 
@@ -126,7 +126,7 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
   InputLineType * inputLine = this->GetInput();
 
   // Get the list of points which consists of two points to represent a
-  // straight line 
+  // straight line
   PointListType & pointsList = inputLine->GetPoints();
   typename PointListType::const_iterator   itPoints = pointsList.begin();
 
@@ -135,9 +135,9 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
   double x1, y1;
   x1 = (*itPoints).GetPosition()[0];
   y1 = (*itPoints).GetPosition()[1];
-  
+
   itPoints++;
-  
+
   double x2, y2;
   x2 = (*itPoints).GetPosition()[0];
   y2 = (*itPoints).GetPosition()[1];
@@ -145,62 +145,62 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
 
   // Distance between two points
   double DeltaX, DeltaY;
-    
+
   DeltaX = fabs(x2-x1);
   DeltaY = fabs(y2-y1);
 
-  // To draw the line, we seek in which direction the number 
+  // To draw the line, we seek in which direction the number
   // of pixels between the two points is most important
-  
+
   if ( (DeltaX >= DeltaY) && (DeltaX > 0.) )
      {
-     double Xmin, Xmax;	
+     double Xmin, Xmax;
      /*Xmin = std::min(x1,x2);
      Xmax = std::max(x1,x2);*/
 	 Xmin = x1 < x2 ? x1 : x2;
 	 Xmax = x1 > x2 ? x1 : x2;
-  
+
      // Slope of the line y=slope*(x-x1)+y1
      double Slope = (y2-y1) / (x2-x1) ;
 
-     // Set a point for each x value between xmin and xmax	 
+     // Set a point for each x value between xmin and xmax
      for ( double x = Xmin; x <= Xmax; x++)
         {
 	outputIndex[0] = static_cast<unsigned long>( x ) ;
 	outputIndex[1] = static_cast<unsigned long>( Slope*(x-x1) + y1 ) ;
 
-	 
-	// Set the point if the pixel index belongs to the output image  
-	if( region.IsInside( outputIndex ) ) 
+
+	// Set the point if the pixel index belongs to the output image
+	if( region.IsInside( outputIndex ) )
 	   output->SetPixel( outputIndex, m_Value);
-	
+
 	}
-	 
+
       }
    else if ( DeltaX < DeltaY )
       {
-      double Ymin, Ymax;  
+      double Ymin, Ymax;
       /*Ymin = std::min(y1,y2);
       Ymax = std::max(y1,y2);*/
   	  Ymin = y1 < y2 ? y1 : y2;
 	  Ymax = y1 > y2 ? y1 : y2;
 
       double SlopeInv = (x2-x1) / (y2-y1) ;
-	 
+
       for ( double y = Ymin; y <= Ymax; y++)
          {
 	 outputIndex[0] = static_cast<unsigned long>( SlopeInv * (y-y1) + x1 ) ;
 	 outputIndex[1] = static_cast<unsigned long>( y );
-	    
+
 	 if( region.IsInside( outputIndex ) )
 	    output->SetPixel( outputIndex, m_Value);
 
-	      
-	 } 
-      } 
+
+	 }
+      }
 
    // Exception
-/*   else 
+/*   else
       {
       itkExceptionMacro(<< "otb::DrawLineSpatialObjectFilter::GenerateData : "
                       	<< "the line is defined by one point : deltaX = deltaY = 0.");
@@ -212,7 +212,7 @@ DrawLineSpatialObjectFilter<TInputImage, TOutputImage>
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutput>
-void 
+void
 DrawLineSpatialObjectFilter<TInputImage, TOutput>::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
diff --git a/Code/Common/otbDrawLineSpatialObjectListFilter.h b/Code/Common/otbDrawLineSpatialObjectListFilter.h
index b5e7967014..af5c5c64e9 100644
--- a/Code/Common/otbDrawLineSpatialObjectListFilter.h
+++ b/Code/Common/otbDrawLineSpatialObjectListFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,15 +32,15 @@ namespace otb
 /** \class DrawLineSpatialObjectListFilter
  * \brief Composite filter which draw lines in a binary image.
  *
- * This class implements a composite filter that draws a list of line in 
+ * This class implements a composite filter that draws a list of line in
  * a binary image by using the otb::DrawLineSpatialObjectFilter that
  * draws each line of the list.
- *  
- *  
+ *
+ *
  */
 
 template <class TInputImage, class TOutputImage>
-class  ITK_EXPORT DrawLineSpatialObjectListFilter : 
+class  ITK_EXPORT DrawLineSpatialObjectListFilter :
 public itk::ImageToImageFilter< TInputImage, TOutputImage >
 {
 public:
@@ -48,30 +48,30 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
 
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
-  
+
 
   /** typedef for the classes standards. */
   typedef DrawLineSpatialObjectListFilter Self;
   typedef itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   typedef LineSpatialObjectList                           LinesListType;
   typedef LinesListType::LineType                  	  LineType;
-    
+
   typedef typename LinesListType::const_iterator LineListIterator;
-  
+
   typedef DrawLineSpatialObjectFilter< OutputImageType, OutputImageType > DrawLineType;
 
   typedef itk::RescaleIntensityImageFilter< InputImageType,
-                                            OutputImageType > RescalerType; 
+                                            OutputImageType > RescalerType;
 
   typedef itk::ProcessObject ProcessObjectType;
 
@@ -80,22 +80,22 @@ public:
 
   /** Return the name of the class. */
   itkTypeMacro(DrawLineSpatialObjectListFilter, ImageToImageFilter);
-  
+
   /** Definition of the input and output images */
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
   /** Definition of the size of the images. */
   typedef typename InputImageType::SizeType SizeType;
-  
+
   /** Set/Get the image input of this process object. */
   virtual void SetInputLineSpatialObjectList(const LinesListType * list);
   LinesListType * GetInputLineSpatialObjectList(void);
-  
-  
+
+
 protected:
   DrawLineSpatialObjectListFilter();
   virtual ~DrawLineSpatialObjectListFilter() {};
@@ -118,5 +118,5 @@ private:
 #include "otbDrawLineSpatialObjectListFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/Common/otbDrawLineSpatialObjectListFilter.txx b/Code/Common/otbDrawLineSpatialObjectListFilter.txx
index 0a32501368..71f7860109 100644
--- a/Code/Common/otbDrawLineSpatialObjectListFilter.txx
+++ b/Code/Common/otbDrawLineSpatialObjectListFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,40 +30,40 @@
 namespace otb
 {
 
-/** 
+/**
  *
  */
 template <class TInputImage, class TOutputImage>
 DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>::DrawLineSpatialObjectListFilter()
 {
   this->SetNumberOfRequiredInputs(2);
-  this->SetNumberOfRequiredOutputs(1); 
-  
+  this->SetNumberOfRequiredOutputs(1);
+
   m_DrawLineFilter = DrawLineType::New();
   m_RescaleFilter = RescalerType::New();
 
 }
 
-    
+
 template <class TInputImage, class TOutputImage>
 void
 DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>
 ::SetInputLineSpatialObjectList(const LinesListType * list)
 {
-  this->ProcessObjectType::SetNthInput(1, 
+  this->ProcessObjectType::SetNthInput(1,
                                    const_cast< LinesListType * >( list ) );
 
 }
 
 
 template <class TInputImage, class TOutputImage>
-typename DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>::LinesListType * 
+typename DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>::LinesListType *
 DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>
 ::GetInputLineSpatialObjectList(void)
 {
     //ROMAIN
 	return static_cast</*const */LinesListType *>
-    (this->ProcessObjectType::GetInput(1) ); 
+    (this->ProcessObjectType::GetInput(1) );
 }
 
 template <class TInputImage, class TOutputImage>
@@ -102,25 +102,25 @@ DrawLineSpatialObjectListFilter<TInputImage, TOutputImage>
   // Draw each line of the list
   while( itList != list->end() )
      {
-    
-     m_DrawLineFilter->SetInputImage( this->GetOutput() ); 
+
+     m_DrawLineFilter->SetInputImage( this->GetOutput() );
      m_DrawLineFilter->SetInputLine( *itList );
      m_DrawLineFilter->Update();
-     
+
      ++itList;
 
      }
 
   this->GraftOutput( m_DrawLineFilter->GetOutput() );
 
-	
+
 }
 
 /**
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutput>
-void 
+void
 DrawLineSpatialObjectListFilter<TInputImage, TOutput>::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
diff --git a/Code/Common/otbDrawPathFilter.h b/Code/Common/otbDrawPathFilter.h
index cfd27f0c11..27f20f1dbf 100644
--- a/Code/Common/otbDrawPathFilter.h
+++ b/Code/Common/otbDrawPathFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -49,7 +49,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(DrawPathFilter, itk::ImageAndPathToImageFilter);
 
@@ -57,8 +57,8 @@ public:
   typedef          TInputImage                    InputImageType;
   typedef typename InputImageType::Pointer        InputImagePointer;
   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
-  typedef typename InputImageType::RegionType     InputImageRegionType; 
-  typedef typename InputImageType::PixelType      InputImagePixelType; 
+  typedef typename InputImageType::RegionType     InputImageRegionType;
+  typedef typename InputImageType::PixelType      InputImagePixelType;
   typedef          TInputPath                     InputPathType;
   typedef typename InputPathType::Pointer         InputPathPointer;
   typedef typename InputPathType::ConstPointer    InputPathConstPointer;
@@ -69,28 +69,28 @@ public:
   typedef          TOutputImage                   OutputImageType;
   typedef typename OutputImageType::Pointer       OutputImagePointer;
   typedef typename OutputImageType::ConstPointer  OutputImageConstPointer;
-  
-  typedef typename OutputImageType::RegionType    OutputImageRegionType; 
-  typedef typename OutputImageType::PixelType     OutputImagePixelType; 
-  typedef typename OutputImageType::ValueType     OutputImageValueType; 
-  
+
+  typedef typename OutputImageType::RegionType    OutputImageRegionType;
+  typedef typename OutputImageType::PixelType     OutputImagePixelType;
+  typedef typename OutputImageType::ValueType     OutputImageValueType;
+
 
   itkSetMacro(Value, OutputImagePixelType);
   itkGetConstReferenceMacro(Value, OutputImagePixelType);
-  
+
   /** Set/Get the path input of this process object.
    Note: these methods are adding to get the proper name */
   void SetInputPath( const TInputPath * path);
-  
+
   const TInputPath * GetInputPath(void);
-  
+
 protected:
   DrawPathFilter();
   virtual ~DrawPathFilter() {};
 
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
   virtual void GenerateData();
- 
+
 private:
   DrawPathFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -105,4 +105,4 @@ private:
 #endif
 
 #endif
- 
+
diff --git a/Code/Common/otbDrawPathFilter.txx b/Code/Common/otbDrawPathFilter.txx
index e3d92abc27..f232e6d966 100644
--- a/Code/Common/otbDrawPathFilter.txx
+++ b/Code/Common/otbDrawPathFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -57,13 +57,13 @@ template <class TInputImage, class TInputPath,class TOutputImage>
 void
 DrawPathFilter<TInputImage,TInputPath,TOutputImage>
 ::GenerateData(void)
-{  
+{
   typedef otb::DrawPathListFilter<TInputImage,TInputPath,TOutputImage> DrawListFilterType;
   typedef typename DrawListFilterType::InputPathListType PathListType;
   typename PathListType::Pointer list = PathListType::New();
   InputPathPointer path = const_cast<TInputPath*>(this->GetPathInput());
   list->PushBack(path);
-  
+
   typename DrawListFilterType::Pointer drawer = DrawListFilterType::New();
   drawer->SetInput(this->GetImageInput());
   drawer->SetInputPath(list);
@@ -87,4 +87,4 @@ DrawPathFilter<TInputImage,TInputPath,TOutputImage>
 } // end namespace otb
 
 #endif
- 
+
diff --git a/Code/Common/otbDrawPathListFilter.h b/Code/Common/otbDrawPathListFilter.h
index 9120ad36e1..bf56ce8d31 100644
--- a/Code/Common/otbDrawPathListFilter.h
+++ b/Code/Common/otbDrawPathListFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,11 +30,11 @@ namespace otb
  * This filter first copy the input image to the output, with default casting operators.
  * 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.
- * 
+ *
  * \sa PolyLineParametricPathWithValue
  * \sa MetaDataDictionary
  *
@@ -43,7 +43,7 @@ namespace otb
  */
 
 template <class TInputImage, class TInputPath,class TOutputImage>
-class ITK_EXPORT DrawPathListFilter : public itk::ImageToImageFilter<TInputImage,TOutputImage> 
+class ITK_EXPORT DrawPathListFilter : public itk::ImageToImageFilter<TInputImage,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -54,7 +54,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(DrawPathListFilter,ImageToImageFilter);
 
@@ -62,32 +62,32 @@ public:
   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 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          TOutputImage                    OutputImageType;
   typedef typename OutputImageType::Pointer        OutputImagePointerType;
   typedef typename OutputImageType::ConstPointer   OutputImageConstPointerType;
-  typedef typename OutputImageType::RegionType     OutputImageRegionType; 
-  typedef typename OutputImageType::PixelType      OutputImagePixelType; 
-  typedef typename OutputImageType::SizeType       OutputImageSizeType;                 
-  typedef typename OutputImageType::ValueType      OutputImageValueType; 
-  typedef typename OutputImageType::IndexType      OutputImageIndexType; 
+  typedef typename OutputImageType::RegionType     OutputImageRegionType;
+  typedef typename OutputImageType::PixelType      OutputImagePixelType;
+  typedef typename OutputImageType::SizeType       OutputImageSizeType;
+  typedef typename OutputImageType::ValueType      OutputImageValueType;
+  typedef typename OutputImageType::IndexType      OutputImageIndexType;
 
   typedef itk::ProcessObject ProcessObjectType;
 
   itkGetMacro(UseInternalPathValue,bool);
   itkSetMacro(UseInternalPathValue,bool);
   itkBooleanMacro(UseInternalPathValue);
-  
+
   itkGetMacro(AddValue,bool);
   itkSetMacro(AddValue,bool);
   itkBooleanMacro(AddValue);
@@ -98,26 +98,26 @@ public:
   /** ImageDimension constants */
   itkStaticConstMacro(InputImageDimension, unsigned int,
                       TInputImage::ImageDimension);
-  
+
   /** Set/Get the path input of this process object. */
   virtual void SetInputPath(InputPathListType *path);
   const InputPathListType * GetInputPath(void);
-  
+
 protected:
   /** Constructor */
   DrawPathListFilter();
   /** Desctructor */
   virtual ~DrawPathListFilter() {};
   /** Printself method */
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
   /** Main computation method */
   virtual void GenerateData();
-  
+
 private:
   DrawPathListFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
   /** Default value to draw */
-  OutputImagePixelType m_PathValue; 
+  OutputImagePixelType m_PathValue;
   /** If set to true, the algorithm try to use path internal metadatadictionnary value */
   bool m_UseInternalPathValue;
 
@@ -131,4 +131,4 @@ private:
 #endif
 
 #endif
- 
+
diff --git a/Code/Common/otbDrawPathListFilter.txx b/Code/Common/otbDrawPathListFilter.txx
index 3db250d33b..62526019e0 100644
--- a/Code/Common/otbDrawPathListFilter.txx
+++ b/Code/Common/otbDrawPathListFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
 {
   this->SetNumberOfRequiredInputs(2);
   this->SetNumberOfRequiredOutputs(1);
-  m_PathValue = static_cast<OutputImagePixelType>(255); 
+  m_PathValue = static_cast<OutputImagePixelType>(255);
   m_UseInternalPathValue = false;
   m_AddValue = false;
 }
@@ -92,7 +92,7 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
   {
     outIt.Set(static_cast<OutputImagePixelType>(inIt.Get()));
   }
-  
+
   // Then we use otb::PolyLineImageIterator to draw polylines
   for(PathListIteratorType plIt = pathListPtr->Begin(); plIt!=pathListPtr->End();++plIt)
   {
@@ -132,4 +132,4 @@ DrawPathListFilter<TInputImage,TInputPath,TOutputImage>
 } // end namespace otb
 
 #endif
- 
+
diff --git a/Code/Common/otbExtractROI.h b/Code/Common/otbExtractROI.h
index c92379a120..bca4ab527e 100644
--- a/Code/Common/otbExtractROI.h
+++ b/Code/Common/otbExtractROI.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -45,7 +45,7 @@ public:
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ExtractROI,ExtractROIBase);
@@ -83,7 +83,7 @@ protected:
   ~ExtractROI() {};
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-  /** ExtractROI 
+  /** ExtractROI
    *
    * \sa ExtractROIBase::GenerateOutputInformaton()  */
   virtual void GenerateOutputInformation();
@@ -91,14 +91,14 @@ protected:
 private:
   ExtractROI(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
 
-  
+
 } // end namespace otb
-  
+
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbExtractROI.txx"
 #endif
-  
+
 #endif
diff --git a/Code/Common/otbExtractROI.txx b/Code/Common/otbExtractROI.txx
index 9202e62009..46565da73f 100644
--- a/Code/Common/otbExtractROI.txx
+++ b/Code/Common/otbExtractROI.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,7 +39,7 @@ ExtractROI<TInputPixel, TOutputPixel>
  *
  */
 template <class TInputPixel, class TOutputPixel>
-void 
+void
 ExtractROI<TInputPixel, TOutputPixel>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -47,17 +47,17 @@ ExtractROI<TInputPixel, TOutputPixel>
 }
 
 
-/** 
+/**
  * ExtractROI can produce an image which is a different resolution
  * than its input image.  As such, ExtractROI needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template <class TInputPixel, class TOutputPixel>
-void 
+void
 ExtractROI<TInputPixel, TOutputPixel>
 ::GenerateOutputInformation()
 {
@@ -66,7 +66,7 @@ ExtractROI<TInputPixel, TOutputPixel>
 }
 
 template <class TInputPixel, class TOutputPixel>
-void 
+void
 ExtractROI<TInputPixel, TOutputPixel>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        int threadId)
@@ -79,11 +79,11 @@ ExtractROI<TInputPixel, TOutputPixel>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Define the portion of the input to walk for this thread
   InputImageRegionType inputRegionForThread;
   this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
-  
+
   // Define the iterators.
   typedef itk::ImageRegionIterator<OutputImageType> OutputIterator;
   typedef itk::ImageRegionConstIterator<InputImageType> InputIterator;
@@ -96,8 +96,8 @@ ExtractROI<TInputPixel, TOutputPixel>
     {
     // copy the input pixel to the output
     outIt.Set( inIt.Get());
-    ++outIt; 
-    ++inIt; 
+    ++outIt;
+    ++inIt;
     progress.CompletedPixel();
     }
 }
diff --git a/Code/Common/otbExtractROIBase.h b/Code/Common/otbExtractROIBase.h
index ae62fee2da..e3256709fd 100644
--- a/Code/Common/otbExtractROIBase.h
+++ b/Code/Common/otbExtractROIBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,15 +29,15 @@ namespace otb
  * \brief Base class to extract area of images.
  *
  * Extracted region can be defined by the methods SetStartX/Y (region origin) and
- * SetSizeX/Y (region size). If the starting point is not defined, the extracted 
- * region start from the upper left corner of the input image. If the size is not 
+ * SetSizeX/Y (region size). If the starting point is not defined, the extracted
+ * region start from the upper left corner of the input image. If the size is not
  * defined, the extracted region extend to the lower right corner of the input
  * image. If no parameter is defined all image is extracted.
  *
  * Alternatively, a region can be specified using the SetROI() method.
  *
  * \ingroup Common
- * 
+ *
  */
 template <class TInputImage, class TOutputImage>
 class ITK_EXPORT ExtractROIBase:
@@ -51,7 +51,7 @@ public:
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ExtractROIBase, itk::ImageToImageFilter);
@@ -80,15 +80,15 @@ public:
   itkStaticConstMacro(OutputImageDimension, unsigned int,
                       TOutputImage::ImageDimension);
 
-  typedef 
-  itk::ImageToImageFilterDetail::ExtractImageFilterRegionCopier<itkGetStaticConstMacro(InputImageDimension), 
+  typedef
+  itk::ImageToImageFilterDetail::ExtractImageFilterRegionCopier<itkGetStaticConstMacro(InputImageDimension),
                                                            itkGetStaticConstMacro(OutputImageDimension)> ExtractROIBaseRegionCopierType;
 
    itkGetMacro(ExtractionRegion, InputImageRegionType);
 
   /** Give the region to extract, same effect as given m_StartX/Y and m_SizeX/Y*/
   void SetExtractionRegion(InputImageRegionType roi);
-  
+
   /** Set/Get Start methods */
   itkSetMacro(StartX,unsigned long);
   itkGetConstMacro(StartX,unsigned long);
@@ -122,7 +122,7 @@ protected:
   virtual void GenerateOutputInformation();
 
   /** This function calls the actual region copier to do the mapping from
-   * output image space to input image space.  It uses a 
+   * output image space to input image space.  It uses a
    * Function object used for dispatching to various routines to
    * copy an output region (start index and size) to an input region.
    * For most filters, this is a trivial copy because most filters
@@ -148,15 +148,15 @@ protected:
 
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                             int threadId )
-                            
+
       {
-      
+
       };
 
- /** Set/Get the output image region. 
+ /** Set/Get the output image region.
   *  If any of the ExtractionRegion.Size = 0 for any particular dimension dim,
   *  we have to collapse dimension dim.  This means the output image will have
-  *  'c' dimensions less than the input image, where c = # of 
+  *  'c' dimensions less than the input image, where c = # of
   *  ExtractionRegion.Size = 0. */
   void SetInternalExtractionRegion(InputImageRegionType extractRegion);
 
@@ -175,14 +175,14 @@ private:
   unsigned long m_SizeX;
   unsigned long m_SizeY;
 
-  
+
 };
 
-  
+
 } // end namespace otb
-  
+
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbExtractROIBase.txx"
 #endif
-  
+
 #endif
diff --git a/Code/Common/otbExtractROIBase.txx b/Code/Common/otbExtractROIBase.txx
index 1ff8623532..6d6ef09340 100644
--- a/Code/Common/otbExtractROIBase.txx
+++ b/Code/Common/otbExtractROIBase.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ ExtractROIBase<TInputImage,TOutputImage>
  *
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 ExtractROIBase<TInputImage,TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -59,7 +59,7 @@ ExtractROIBase<TInputImage,TOutputImage>
 
 
 template<class TInputImage, class TOutputImage>
-void 
+void
 ExtractROIBase<TInputImage,TOutputImage>
 ::CallCopyOutputRegionToInputRegion(InputImageRegionType &destRegion,
                                     const OutputImageRegionType &srcRegion)
@@ -70,7 +70,7 @@ ExtractROIBase<TInputImage,TOutputImage>
   destRegion = srcRegion;
 
   OutputImageIndexType index = destRegion.GetIndex();
-  
+
   for (unsigned int i = 0; i < InputImageDimension; ++i)
     {
       index[i]+=m_ExtractionRegion.GetIndex()[i];
@@ -80,7 +80,7 @@ ExtractROIBase<TInputImage,TOutputImage>
 
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 ExtractROIBase<TInputImage,TOutputImage>
 ::SetInternalExtractionRegion(InputImageRegionType extractRegion)
 {
@@ -93,18 +93,18 @@ ExtractROIBase<TInputImage,TOutputImage>
 
   /**
    * check to see if the number of non-zero entries in the extraction region
-   * matches the number of dimensions in the output image.  
+   * matches the number of dimensions in the output image.
    **/
   for (unsigned int i = 0; i < InputImageDimension; ++i)
     {
     if (inputSize[i])
-      { 
-      outputSize[nonzeroSizeCount] = inputSize[i];    
+      {
+      outputSize[nonzeroSizeCount] = inputSize[i];
       outputIndex[nonzeroSizeCount] =0;
       nonzeroSizeCount++;
       }
     }
-    
+
   if (nonzeroSizeCount != OutputImageDimension)
     {
     itkExceptionMacro("Extraction Region not consistent with output image");
@@ -118,7 +118,7 @@ ExtractROIBase<TInputImage,TOutputImage>
 
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 ExtractROIBase<TInputImage,TOutputImage>
 ::SetExtractionRegion(InputImageRegionType roi)
 {
@@ -131,12 +131,12 @@ ExtractROIBase<TInputImage,TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 ExtractROIBase<TInputImage,TOutputImage>
 ::GenerateInputRequestedRegion()
 {
   Superclass::GenerateInputRequestedRegion();
-  
+
   typename Superclass::InputImagePointer  inputPtr  = const_cast<InputImageType*>(this->GetInput());
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
 
@@ -152,26 +152,26 @@ ExtractROIBase<TInputImage,TOutputImage>
         {
 	  index[i]+=offset[i];
 	}
-  requestedRegion.SetIndex(index);  
+  requestedRegion.SetIndex(index);
   inputPtr->SetRequestedRegion(requestedRegion);
 }
 
 
-/** 
+/**
  * ExtractROIBase can produce an image which is a different resolution
  * than its input image.  As such, ExtractROIBase needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 ExtractROIBase<TInputImage,TOutputImage>
 ::GenerateOutputInformation()
 {
-        
+
 
         // Determine la zone a extraire
         // Si SizeX(Y) est nulle, alors SizeX(Y) est egale à la SizeX(Y) de l'image
@@ -186,7 +186,7 @@ ExtractROIBase<TInputImage,TOutputImage>
                 m_SizeX = inputRegion.GetSize()[0] - m_StartX;
         }
         if ( (m_SizeY == 0) || (m_SizeY > (inputRegion.GetSize()[1] - m_StartY)) )
-        {       
+        {
                 m_SizeY = inputRegion.GetSize()[1] - m_StartY;
         }
 
@@ -205,7 +205,7 @@ ExtractROIBase<TInputImage,TOutputImage>
 
   // do not call the superclass' implementation of this method since
   // this filter allows the input the output to be of different dimensions
- 
+
   // get pointers to the input and output
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
 //  typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
@@ -230,7 +230,7 @@ ExtractROIBase<TInputImage,TOutputImage>
     // This logic needs to be augmented with logic that select which
     // dimensions to copy
     unsigned int i;
-    const typename InputImageType::SpacingType& 
+    const typename InputImageType::SpacingType&
       inputSpacing = inputPtr->GetSpacing();
     const typename InputImageType::DirectionType&
       inputDirection = inputPtr->GetDirection();
@@ -241,7 +241,7 @@ ExtractROIBase<TInputImage,TOutputImage>
     typename OutputImageType::DirectionType outputDirection;
     typename OutputImageType::PointType outputOrigin;
 
-    if ( static_cast<unsigned int>(OutputImageDimension) > 
+    if ( static_cast<unsigned int>(OutputImageDimension) >
          static_cast<unsigned int>(InputImageDimension )    )
       {
       // copy the input to the output and fill the rest of the
diff --git a/Code/Common/otbFilterWatcherBase.cxx b/Code/Common/otbFilterWatcherBase.cxx
index 2521a73d52..9565584e31 100644
--- a/Code/Common/otbFilterWatcherBase.cxx
+++ b/Code/Common/otbFilterWatcherBase.cxx
@@ -38,12 +38,12 @@ FilterWatcherBase
   // Initialize state
   m_Process = process;
   m_Comment = comment;
-  
+
   // Create a series of commands
   m_StartFilterCommand = CommandType::New();
   m_EndFilterCommand = CommandType::New();
   m_ProgressFilterCommand = CommandType::New();
-  
+
   // Assign the callbacks
   m_StartFilterCommand->SetCallbackFunction(this,
                                         &FilterWatcherBase::StartFilter);
@@ -51,14 +51,14 @@ FilterWatcherBase
                                         &FilterWatcherBase::EndFilter);
   m_ProgressFilterCommand->SetCallbackFunction(this,
                                         &FilterWatcherBase::ShowProgress);
-  
+
   // Add the commands as observers
   m_StartTag = m_Process->AddObserver(itk::StartEvent(),
 				      m_StartFilterCommand);
-  
+
   m_EndTag = m_Process->AddObserver(itk::EndEvent(),
 				    m_EndFilterCommand);
-  
+
   m_ProgressTag = m_Process->AddObserver(itk::ProgressEvent(),
 					 m_ProgressFilterCommand);
 }
@@ -82,23 +82,23 @@ FilterWatcherBase
 	  m_Process->RemoveObserver(m_ProgressTag);
 	}
     }
-  
+
   // Initialize state
   m_TimeProbe = watch.m_TimeProbe;
   m_Process = watch.m_Process;
   m_Comment = watch.m_Comment;
-  
+
   m_StartTag = 0;
   m_EndTag = 0;
   m_ProgressTag = 0;
-  
+
   // Create a series of commands
   if (m_Process)
     {
       m_StartFilterCommand = CommandType::New();
       m_EndFilterCommand = CommandType::New();
       m_ProgressFilterCommand = CommandType::New();
-      
+
       // Assign the callbacks
       m_StartFilterCommand->SetCallbackFunction(this,
 						&FilterWatcherBase::StartFilter);
@@ -106,7 +106,7 @@ FilterWatcherBase
 					      &FilterWatcherBase::EndFilter);
       m_ProgressFilterCommand->SetCallbackFunction(this,
 						   &FilterWatcherBase::ShowProgress);
-      
+
       // Add the commands as observers
       m_StartTag = m_Process->AddObserver(itk::StartEvent(), m_StartFilterCommand);
       m_EndTag = m_Process->AddObserver(itk::EndEvent(), m_EndFilterCommand);
@@ -135,23 +135,23 @@ FilterWatcherBase
 	  m_Process->RemoveObserver(m_ProgressTag);
 	}
     }
-  
+
   // Initialize state
   m_TimeProbe = watch.m_TimeProbe;
   m_Process = watch.m_Process;
   m_Comment = watch.m_Comment;
-  
+
   m_StartTag = 0;
   m_EndTag = 0;
   m_ProgressTag = 0;
-  
+
   // Create a series of commands
   if (m_Process)
     {
       m_StartFilterCommand = CommandType::New();
       m_EndFilterCommand = CommandType::New();
       m_ProgressFilterCommand = CommandType::New();
-      
+
       // Assign the callbacks
       m_StartFilterCommand->SetCallbackFunction(this,
 						&FilterWatcherBase::StartFilter);
@@ -159,7 +159,7 @@ FilterWatcherBase
 					      &FilterWatcherBase::EndFilter);
       m_ProgressFilterCommand->SetCallbackFunction(this,
 						   &FilterWatcherBase::ShowProgress);
-      
+
       // Add the commands as observers
       m_StartTag = m_Process->AddObserver(itk::StartEvent(), m_StartFilterCommand);
       m_EndTag = m_Process->AddObserver(itk::EndEvent(), m_EndFilterCommand);
diff --git a/Code/Common/otbFilterWatcherBase.h b/Code/Common/otbFilterWatcherBase.h
index fe81ab4859..09a94cc185 100644
--- a/Code/Common/otbFilterWatcherBase.h
+++ b/Code/Common/otbFilterWatcherBase.h
@@ -31,7 +31,7 @@ namespace otb
   /** \class FilterWatcherBase
    *  \brief This class is an abstract class
    *         Provides an interface to progress task mechanic
-   *         
+   *
    *  Implement your callbacks
    *  \li ShowProgress : callback called for each completed pixel
    *  \li StartFilter  : callback called at the begin of process
@@ -41,79 +41,79 @@ namespace otb
   class ITK_EXPORT FilterWatcherBase
     {
     public:
-      
+
       /** Constructor. Takes a ProcessObject to monitor and an optional
        * comment string that is prepended to each event message. */
       FilterWatcherBase(itk::ProcessObject* process,
 			const char *comment="");
-      
+
       /** Default constructor */
       FilterWatcherBase();
-      
+
       /** Copy constructor */
       FilterWatcherBase(const FilterWatcherBase&);
-      
+
       /** operator=  */
       void operator=(const FilterWatcherBase& );
-      
+
       /** Destructor. */
       virtual ~FilterWatcherBase();
-      
+
       /** Methods to access member data */
       /** Get a pointer to the process object being watched. */
       itk::ProcessObject *GetProcess () {return m_Process.GetPointer();}
-      
+
       /** Get the comment for the watcher. */
       std::string GetComment() {return m_Comment;}
-      
+
       /** Get a reference to the TimeProbe */
       itk::TimeProbe &GetTimeProbe() {return m_TimeProbe;}
-      
+
     protected:
-      
+
       /** Callback method to show the ProgressEvent */
       virtual void ShowProgress() = 0;
-      
+
       /** Callback method to show the StartEvent */
       virtual void StartFilter() = 0;
-      
+
       /** Callback method to show the EndEvent */
       virtual void EndFilter() = 0;
-     
+
       /** Computing time */
       itk::TimeProbe m_TimeProbe;
-      
+
       /** Associated comment */
       std::string m_Comment;
-      
+
       /** Abstract process object */
       itk::ProcessObject::Pointer m_Process;
- 
+
       /** Internal type */
       typedef itk::SimpleMemberCommand<FilterWatcherBase> CommandType;
-      
+
       /** Start filter callback */
       CommandType::Pointer m_StartFilterCommand;
-      
+
       /** End filter callback */
       CommandType::Pointer m_EndFilterCommand;
-      
+
       /** Progress filter callback */
       CommandType::Pointer m_ProgressFilterCommand;
-      
+
       /** Start oberserver */
       unsigned long m_StartTag;
-      
+
       /** End observer */
       unsigned long m_EndTag;
-      
+
       /** Progress observer */
       unsigned long m_ProgressTag;
-            
+
     private:
 
     };
-  
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Common/otbGenericInterpolateImageFunction.h b/Code/Common/otbGenericInterpolateImageFunction.h
index ff897c0333..b4f3a2b34e 100644
--- a/Code/Common/otbGenericInterpolateImageFunction.h
+++ b/Code/Common/otbGenericInterpolateImageFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,17 +24,17 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
 /** \class GenericInterpolateImageFunction
  * \brief Generic interpolation of an otb::image.
  *
- * GenericInterpolateImageFunction interpolates image intensity according to a 
+ * GenericInterpolateImageFunction interpolates image intensity according to a
  * resampling profil.
  * \ingroup ImageFunctions ImageInterpolators
  */
 template <class TInputImage, class TFunction, class TBoundaryCondition = itk::ConstantBoundaryCondition<TInputImage>, class TCoordRep = double>
-class ITK_EXPORT GenericInterpolateImageFunction : 
-public itk::InterpolateImageFunction<TInputImage,TCoordRep> 
+class ITK_EXPORT GenericInterpolateImageFunction :
+public itk::InterpolateImageFunction<TInputImage,TCoordRep>
   {
     public:
     /** Standard class typedefs. */
@@ -42,20 +42,20 @@ public itk::InterpolateImageFunction<TInputImage,TCoordRep>
     typedef itk::InterpolateImageFunction<TInputImage,TCoordRep> Superclass;
     typedef itk::SmartPointer<Self> Pointer;
     typedef itk::SmartPointer<const Self>  ConstPointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(GenericInterpolateImageFunction, itk::InterpolateImageFunction);
-    
+
     /** Method for creation through the object factory. */
-    itkNewMacro(Self);  
-    
+    itkNewMacro(Self);
+
     /** Input and output images typedef definition. */
     typedef typename Superclass::OutputType     OutputType;
     typedef typename Superclass::InputImageType InputImageType;
-    
+
     /** Dimension underlying input image. */
     //itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     /** Index and typedef support. */
     typedef typename Superclass::IndexType                                 IndexType;
     typedef typename InputImageType::SizeType                              SizeType;
@@ -68,12 +68,12 @@ public itk::InterpolateImageFunction<TInputImage,TCoordRep>
 
     /** Dimension underlying input image. */
     itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-    
+
     virtual void SetInputImage(const InputImageType *image);
 
     /** Evaluate the function at a ContinuousIndex position
      *
-     * Returns the interpolated image intensity at a 
+     * Returns the interpolated image intensity at a
      * specified point position. No bounds checking is done.
      * The point is assume to lie within the image buffer.
      *
@@ -81,7 +81,7 @@ public itk::InterpolateImageFunction<TInputImage,TCoordRep>
      * calling the method. */
     virtual OutputType EvaluateAtContinuousIndex( const ContinuousIndexType & index ) const;
 
- 
+
     /** Set/Get the window radius*/
     void SetRadius(unsigned int rad);
     unsigned int GetRadius() const { return m_Function.GetRadius(); };
@@ -95,19 +95,19 @@ public itk::InterpolateImageFunction<TInputImage,TCoordRep>
     FunctionType& GetFunction(void)
     {
       return m_Function;
-    } 
-    
+    }
+
     /** Delete tables.*/
     void ResetOffsetTable() const;
-    /** Initialize used tables*/ 
-    void InitializeTables() const;    
+    /** Initialize used tables*/
+    void InitializeTables() const;
     /** Fill the weight offset table*/
     void FillWeightOffsetTable() const;
 
     /** Weights normalization accessors*/
     itkSetMacro(NormalizeWeight, bool);
     itkGetMacro(NormalizeWeight, bool);
-    
+
     protected:
     GenericInterpolateImageFunction();
     ~GenericInterpolateImageFunction();
@@ -128,9 +128,9 @@ public itk::InterpolateImageFunction<TInputImage,TCoordRep>
     /** Used function */
     FunctionType m_Function;
     /** Store the image dimension.*/
-    unsigned int m_ImageDimension;  
+    unsigned int m_ImageDimension;
 
-    /** These members are declared mutable so that they can be 
+    /** These members are declared mutable so that they can be
 	regenerated seamlessly inside the EvaluateAtContinuousIndex method if
 	they need to */
     /** Size of the offset table */
diff --git a/Code/Common/otbGenericInterpolateImageFunction.txx b/Code/Common/otbGenericInterpolateImageFunction.txx
index 8eb0d99b9a..c7c9e66495 100644
--- a/Code/Common/otbGenericInterpolateImageFunction.txx
+++ b/Code/Common/otbGenericInterpolateImageFunction.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -48,7 +48,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction,TBoundaryCondition, TCoor
 template<class TInputImage, class TFunction, class TBoundaryCondition, class TCoordRep>
 void
 GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoordRep>
-::ResetOffsetTable() const 
+::ResetOffsetTable() const
 {
   // Clear the offset table
   if(m_OffsetTable!=NULL)
@@ -81,7 +81,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
   if( image == NULL )
     {
       return;
-    } 
+    }
 }
 
 template<class TInputImage, class TFunction, class TBoundaryCondition, class TCoordRep>
@@ -102,10 +102,10 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
 {
   Superclass::Modified();
   m_TablesHaveBeenGenerated = false;
-  
+
 }
 
-/** Initialize used tables*/ 
+/** Initialize used tables*/
 template<class TInputImage, class TFunction, class TBoundaryCondition, class TCoordRep>
 void
 GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoordRep>
@@ -117,16 +117,16 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
     {
       m_OffsetTableSize *= m_WindowSize;
     }
-  
+
   // Allocate the offset table
   m_OffsetTable = new unsigned int[m_OffsetTableSize];
-  
+
   // Allocate the weights tables
   m_WeightOffsetTable = new unsigned int *[m_OffsetTableSize];
   for(unsigned int i=0;i<m_OffsetTableSize;i++)
     {
       m_WeightOffsetTable[i] = new unsigned int[ImageDimension];
-    } 
+    }
 }
 
 /** Fill the weight offset table*/
@@ -144,18 +144,18 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
       // Compute the offset tables (we ignore all the zero indices
       // in the neighborhood)
       unsigned int iOffset = 0;
-      int empty = static_cast<int>(this->GetRadius()); 
-   
+      int empty = static_cast<int>(this->GetRadius());
+
       for(unsigned int iPos = 0; iPos < it.Size(); iPos++)
-	{ 
+	{
 	// Get the offset (index)
 	typename IteratorType::OffsetType off = it.GetOffset(iPos);
-	
+
 	// Check if the offset has zero weights
 	bool nonzero = true;
 	for(unsigned int dim = 0; dim < ImageDimension; dim++)
 	  {
-	    if(off[dim] == -empty) 
+	    if(off[dim] == -empty)
 	      {
 		nonzero = false;
 		break;
@@ -166,7 +166,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
 	  {
 	    // Set the offset index
 	    m_OffsetTable[iOffset] = iPos;
-	    
+
 	    // Set the weight table indices
 	    for(unsigned int dim = 0; dim < ImageDimension; dim++)
 	      {
@@ -189,7 +189,7 @@ typename GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondit
 GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoordRep>
 ::EvaluateAtContinuousIndex(const ContinuousIndexType& index) const
 {
-  if(!m_TablesHaveBeenGenerated)   
+  if(!m_TablesHaveBeenGenerated)
     {
       // Delete existing tables
       this->ResetOffsetTable();
@@ -203,8 +203,8 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
   //unsigned int dim;
   IndexType baseIndex;
   double distance[ImageDimension];
-   
-  // Compute the integer index based on the continuous one by 
+
+  // Compute the integer index based on the continuous one by
   // 'flooring' the index
   for( unsigned int dim = 0; dim < ImageDimension; dim++ )
     {
@@ -226,19 +226,19 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
 	}
       distance[dim] = index[dim] - double( baseIndex[dim] );
     }
-  
-  
+
+
   // Position the neighborhood at the index of interest
   SizeType radius;
   radius.Fill(this->GetRadius());
   IteratorType nit = IteratorType( radius, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion());
   nit.SetLocation( baseIndex );
-  
+
   const unsigned int twiceRadius = static_cast<const unsigned int>(2*this->GetRadius());
 /*  double xWeight[ImageDimension][ twiceRadius];*/
   std::vector< std::vector<double> > xWeight;
   xWeight.resize(ImageDimension);
-  for(unsigned int cpt=0; cpt < xWeight.size(); cpt++) 
+  for(unsigned int cpt=0; cpt < xWeight.size(); cpt++)
     {
       xWeight[cpt].resize(twiceRadius);
     }
@@ -274,9 +274,9 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
       //}
     }
   if (m_NormalizeWeight == true)
-    {   
+    {
       for( unsigned int dim = 0; dim < ImageDimension; dim++ )
-	{ 
+	{
 	  double sum = 0.;
 	  // Compute the weights sum
 	  for( unsigned int i = 0; i < m_WindowSize; i++)
@@ -293,17 +293,17 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
 	    }
 	}
     }
-  
-  
-  
+
+
+
   // Iterate over the neighborhood, taking the correct set
-  // of weights in each dimension 
+  // of weights in each dimension
   double xPixelValue = 0.0;
   for(unsigned int j = 0; j < m_OffsetTableSize; j++)
     {
     // Get the offset for this neighbor
     unsigned int off = m_OffsetTable[j];
-    
+
     // Get the intensity value at the pixel
     double xVal = nit.GetPixel(off);
 
@@ -317,7 +317,7 @@ GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoo
     // Increment the pixel value
     xPixelValue += xVal;
     }
-  
+
   // Return the interpolated value
   return static_cast<OutputType>(xPixelValue);
 }
@@ -327,8 +327,8 @@ template<class TInputImage, class TFunction, class TBoundaryCondition, class TCo
 void
 GenericInterpolateImageFunction<TInputImage, TFunction, TBoundaryCondition, TCoordRep>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
-{ 
-  Superclass::PrintSelf( os, indent ); 
+{
+  Superclass::PrintSelf( os, indent );
 }
 
 }//namespace otb
diff --git a/Code/Common/otbHistogramStatisticsFunction.h b/Code/Common/otbHistogramStatisticsFunction.h
index 94bcf9aff0..32d893fe70 100644
--- a/Code/Common/otbHistogramStatisticsFunction.h
+++ b/Code/Common/otbHistogramStatisticsFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,10 +27,10 @@ namespace otb
 
 /** \class HistogramStatisticsFunction
  * \brief Computes parameters for a histogram.
- * 
- * You plug in the target histogram using SetInputHistogram method and 
+ *
+ * You plug in the target histogram using SetInputHistogram method and
  * get the entropy value from the histogram by calling the method GetEntropy
- * or the GenerateData method. 
+ * or the GenerateData method.
  *
  * \ingroup Function
  */
@@ -53,27 +53,27 @@ public:
   /**Standard Macros */
   itkTypeMacro(HistogramStatisticsFunction, HistogramAlgorithmsBase);
   itkNewMacro(Self) ;
-                                                                                                                                      
+
   /** Typedef for the output type */
   typedef std::vector<TOutput> OutputType;
-                                                                                                                                      
+
   /** Returns the entropy value */
   OutputType GetEntropy();
 
   /** Returns the mean value from histogram*/
   OutputType GetMean();
-  
+
   /** Returns the covariance value from histogram*/
   OutputType GetCovariance();
 
   /** Stores the histogram pointer */
-  void SetInputHistogram( const TInputHistogram * histogram ) 
+  void SetInputHistogram( const TInputHistogram * histogram )
   {
       if ( m_InputHistogram != histogram )
       {
         m_InputHistogram = histogram ;
         this->Modified() ;
-	m_IsModified = true; 
+	m_IsModified = true;
       }
   }
 
@@ -82,7 +82,7 @@ protected:
   HistogramStatisticsFunction() ;
   virtual ~HistogramStatisticsFunction() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-                                                                                                                                      
+
   /** Calculates the thresholds and save them */
   void GenerateData();
 
@@ -91,7 +91,7 @@ protected:
 
   /** Calculate mean value */
   void CalculateMean();
-                         
+
   /** Calculate covariance value */
   void CalculateCovariance();
 
@@ -101,12 +101,12 @@ private:
   OutputType m_mean ;
   OutputType m_covariance ;
   bool m_IsModified;
-  
+
   /** Target histogram data pointer */
   typename TInputHistogram::ConstPointer m_InputHistogram ;
-  
+
 } ; // end of class
-                                                                                                                                      
+
 } // end of namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Common/otbHistogramStatisticsFunction.txx b/Code/Common/otbHistogramStatisticsFunction.txx
index 643b301f24..f456eea4dc 100644
--- a/Code/Common/otbHistogramStatisticsFunction.txx
+++ b/Code/Common/otbHistogramStatisticsFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ template< class TInputHistogram, class TOutput >
 HistogramStatisticsFunction< TInputHistogram, TOutput>
 ::HistogramStatisticsFunction()
 {
-  m_IsModified = true;  
+  m_IsModified = true;
 }
 
 template< class TInputHistogram, class TOutput >
@@ -41,7 +41,7 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
   	this->Update();
   }
   return m_entropy;
-}                                                    
+}
 
 template< class TInputHistogram, class TOutput >
 typename HistogramStatisticsFunction< TInputHistogram, TOutput>::OutputType
@@ -53,7 +53,7 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
   	this->Update();
   }
   return m_mean;
-}                                                    
+}
 
 template< class TInputHistogram, class TOutput >
 typename HistogramStatisticsFunction< TInputHistogram, TOutput>::OutputType
@@ -65,7 +65,7 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
   	this->Update();
   }
   return m_covariance;
-}                                                    
+}
 
 template< class TInputHistogram, class TOutput >
 void
@@ -87,15 +87,15 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
   while (iter != end)
     {
     RealType Proba = static_cast<RealType>(iter.GetFrequency());
-    Proba /= static_cast<RealType>(globalFrequency); 
-    if(Proba !=0.0)   
+    Proba /= static_cast<RealType>(globalFrequency);
+    if(Proba !=0.0)
       {
       entropy -=  Proba * vcl_log(Proba);
-      } 
+      }
     ++iter ;
     }
   m_entropy.resize(1);
-  m_entropy[0] = static_cast<TOutput>(entropy); 
+  m_entropy[0] = static_cast<TOutput>(entropy);
 }
 
 
@@ -131,7 +131,7 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
       }
     mean /=  histogram->GetTotalFrequency();
     m_mean[noDim] = static_cast<TOutput>(mean);
-    }  
+    }
 }
 
 template< class TInputHistogram, class TOutput >
@@ -150,7 +150,7 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
     {
     itkExceptionMacro(<<"Histogram must contain at least 1 element.");
     }
-    
+
   for( unsigned int noDimX = 0; noDimX < NumberOfDimension; noDimX++ )
   for( unsigned int noDimY = 0; noDimY < NumberOfDimension; noDimY++ )
     {
@@ -169,8 +169,8 @@ HistogramStatisticsFunction< TInputHistogram, TOutput>
       }
     covariance /=  histogram->GetTotalFrequency();
     m_covariance[noDimX*NumberOfDimension+noDimY] = static_cast<TOutput>(covariance);
-    }  
-  
+    }
+
 }
 
 template< class TInputHistogram, class TOutput >
diff --git a/Code/Common/otbImageList.h b/Code/Common/otbImageList.h
index 474adc8a1f..592a20b11d 100644
--- a/Code/Common/otbImageList.h
+++ b/Code/Common/otbImageList.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
  *
  * It is derived from the otbObjectList class, which allows to manipulate an ITK/OTB
  * object list with the appropriate formalism (iterators, accessors).
- * \sa ObjectList 
+ * \sa ObjectList
  */
 
 template <class TImage>
@@ -61,15 +61,15 @@ class ITK_EXPORT ImageList
     virtual void UpdateOutputInformation(void);
     virtual void PropagateRequestedRegion(void) throw (itk::InvalidRequestedRegionError);
     virtual void UpdateOutputData(void);
-    
-    
+
+
   protected:
     /** Constructor */
     ImageList(){};
     /** Destructor */
     ~ImageList(){};
     /** PrintSelf method */
-    void PrintSelf(std::ostream& os, itk::Indent indent) const 
+    void PrintSelf(std::ostream& os, itk::Indent indent) const
       {
 	Superclass::PrintSelf(os,indent);
       };
diff --git a/Code/Common/otbImageList.txx b/Code/Common/otbImageList.txx
index 687562f66e..60dc3387ab 100644
--- a/Code/Common/otbImageList.txx
+++ b/Code/Common/otbImageList.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -60,7 +60,7 @@ ImageList<TImage>
 	      it.Get()->GetSource()->PropagateRequestedRegion(it.Get());
 	    }
 	}
-      
+
       // Check that the requested region lies within the largest possible region
       if ( ! it.Get()->VerifyRequestedRegion() )
     {
@@ -69,7 +69,7 @@ ImageList<TImage>
     e.SetLocation(ITK_LOCATION);
     e.SetDataObject(it.Get());
     e.SetDescription("Requested region is (at least partially) outside the largest possible region.");
-    
+
     throw e;
     }
     }
@@ -82,7 +82,7 @@ ImageList<TImage>
 {
 //   otbMsgDebugMacro(<<"ImageList: Call to UpdateOutputInformation()");
   Superclass::UpdateOutputInformation();
-  
+
   if(this->GetSource())
     {
       this->GetSource()->UpdateOutputInformation();
diff --git a/Code/Common/otbImageListSource.h b/Code/Common/otbImageListSource.h
index d409394673..2a855079f9 100644
--- a/Code/Common/otbImageListSource.h
+++ b/Code/Common/otbImageListSource.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ public:
   itkTypeMacro(ImageListSource,itk::ProcessObject);
   /** Data object pointer type */
   typedef itk::DataObject::Pointer DataObjectPointer;
-  /** Template parameter typedef*/ 
+  /** Template parameter typedef*/
   typedef TOutputImage                               OutputImageType;
   typedef typename OutputImageType::Pointer          OutputImagePointerType;
   typedef ImageList<OutputImageType>                 OutputImageListType;
@@ -66,7 +66,7 @@ protected:
 
 private:
   ImageListSource(const Self&);//purposely not implemented
-  void operator=(const Self&); //purposely not implemented 
+  void operator=(const Self&); //purposely not implemented
 };
 } // End namespace otb
 
diff --git a/Code/Common/otbImageListSource.txx b/Code/Common/otbImageListSource.txx
index d793fd8563..3f6d501a73 100644
--- a/Code/Common/otbImageListSource.txx
+++ b/Code/Common/otbImageListSource.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/Common/otbImageListToImageFilter.h b/Code/Common/otbImageListToImageFilter.h
index 13827dfb19..2e242e009d 100644
--- a/Code/Common/otbImageListToImageFilter.h
+++ b/Code/Common/otbImageListToImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkImageSource.h"
 #include "otbImageList.h"
 
-namespace otb 
+namespace otb
 {
 /** \class ImageListToImageFilter
  *
diff --git a/Code/Common/otbImageListToImageFilter.txx b/Code/Common/otbImageListToImageFilter.txx
index 950b58c229..5c1215c0d0 100644
--- a/Code/Common/otbImageListToImageFilter.txx
+++ b/Code/Common/otbImageListToImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ ImageListToImageFilter<TInputImage,TOutputImage>
   this->SetNumberOfRequiredInputs(1);
 }
 /**
- * Input Connection 
+ * Input Connection
  * \param image The input image.
  */
 template <class TInputImage, class TOutputImage>
@@ -44,7 +44,7 @@ ImageListToImageFilter<TInputImage,TOutputImage>
   this->itk::ProcessObject::SetNthInput(0,const_cast<InputImageListType*>(image));
 }
 /**
- * Input image retrieval 
+ * Input image retrieval
  * \return The input image.
  */
 template <class TInputImage, class TOutputImage>
@@ -52,7 +52,7 @@ typename ImageListToImageFilter<TInputImage,TOutputImage>::InputImageListType *
 ImageListToImageFilter<TInputImage,TOutputImage>
 ::GetInput(void)
 {
-  // If there is no input 
+  // If there is no input
   if (this->GetNumberOfInputs()<1)
     {
     // exit
diff --git a/Code/Common/otbImageListToImageListFilter.h b/Code/Common/otbImageListToImageListFilter.h
index 8bc7ba9858..e0af5927ca 100644
--- a/Code/Common/otbImageListToImageListFilter.h
+++ b/Code/Common/otbImageListToImageListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,10 +20,10 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbImageListSource.h"
 
-namespace otb 
+namespace otb
 {
 /** \class ImageListToImageListFilter
- *  \brief Base class for all the filters taking an image list as input 
+ *  \brief Base class for all the filters taking an image list as input
  *  to produce an image list.
  * \ingroup Images
  * \ingroup Lists
diff --git a/Code/Common/otbImageListToImageListFilter.txx b/Code/Common/otbImageListToImageListFilter.txx
index d2cfc69428..9410d2a395 100644
--- a/Code/Common/otbImageListToImageListFilter.txx
+++ b/Code/Common/otbImageListToImageListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ ImageListToImageListFilter<TInputImage,TOutputImage>
   this->SetNumberOfRequiredInputs(1);
 }
 /**
- * Input Connection 
+ * Input Connection
  * \param image The input image.
  */
 template <class TInputImage, class TOutputImage>
@@ -44,7 +44,7 @@ ImageListToImageListFilter<TInputImage,TOutputImage>
   this->itk::ProcessObject::SetNthInput(0,const_cast<InputImageListType*>(imageList));
 }
 /**
- * Input image retrieval 
+ * Input image retrieval
  * \return The input image.
  */
 template <class TInputImage, class TOutputImage>
@@ -52,7 +52,7 @@ typename ImageListToImageListFilter<TInputImage,TOutputImage>::InputImageListTyp
 ImageListToImageListFilter<TInputImage,TOutputImage>
 ::GetInput(void)
 {
-  // If there is no input 
+  // If there is no input
   if (this->GetNumberOfInputs()<1)
     {
     // exit
diff --git a/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.h b/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.h
index 70e46f6e28..6fe5cfdedf 100644
--- a/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.h
+++ b/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
 {
 
 /** \class ImageOfVectorsToMonoChannelExtractROI
- * \brief 
+ * \brief
  * \todo Document this class
  */
 template <class TInputImage, class TOutputImage>
@@ -43,7 +43,7 @@ public:
   typedef itk::SmartPointer<const Self>         ConstPointer;
 
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageOfVectorsToMonoChannelExtractROI, ExtractROIBase);
@@ -103,16 +103,16 @@ protected:
 private:
   ImageOfVectorsToMonoChannelExtractROI(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   /** Channel to process [1...] */
   unsigned int  m_Channel;
 };
 
-  
+
 } // end namespace otb
-  
+
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbImageOfVectorsToMonoChannelExtractROI.txx"
 #endif
-  
+
 #endif
diff --git a/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.txx b/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.txx
index a3636abc98..ea2e3f2b5a 100644
--- a/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.txx
+++ b/Code/Common/otbImageOfVectorsToMonoChannelExtractROI.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
  *
  */
 template<class TInputImage, class TOutputImage>
-void 
+void
 ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -45,17 +45,17 @@ ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
 }
 
 
-/** 
+/**
  * ExtractImageFilter can produce an image which is a different resolution
  * than its input image.  As such, ExtractImageFilter needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template<class TInputImage, class TOutputImage>
-void 
+void
 ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
 ::GenerateOutputInformation()
 {
@@ -74,7 +74,7 @@ ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
 
 
 template<class TInputImage, class TOutputImage>
-void 
+void
 ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        int threadId)
@@ -87,11 +87,11 @@ ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Define the portion of the input to walk for this thread
   InputImageRegionType inputRegionForThread;
   this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
-  
+
   // Define the iterators.
   typedef itk::ImageRegionIterator<OutputImageType> OutputIterator;
   typedef itk::ImageRegionConstIterator<InputImageType> InputIterator;
@@ -109,8 +109,8 @@ ImageOfVectorsToMonoChannelExtractROI<TInputImage,TOutputImage>
                 pixelInput = inIt.Get();
                 pixelOutput = static_cast<OutputValueType>(pixelInput[channelIn]);
                 outIt.Set( pixelOutput );
-                ++outIt; 
-                ++inIt; 
+                ++outIt;
+                ++inIt;
                 progress.CompletedPixel();
   }
 
diff --git a/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.h b/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.h
index c798d7252e..dd98d986f4 100644
--- a/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.h
+++ b/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,7 +39,7 @@ namespace otb
  * the StreamingImageFilter to divide a requested output region into a
  * series of smaller requests of the pipeline.  This object has two
  * basic methods: GetNumberOfSplits() and GetSplit().
- * 
+ *
  * GetNumberOfSplits() is used to determine how may subregions a given
  * region can be divided.  You call GetNumberOfSplits with an argument
  * that is the number of subregions you want.  If the image region can
@@ -51,9 +51,9 @@ namespace otb
  *
  * GetSplit() returns the ith of N subregions (as an ImageRegion object).
  *
- * ImageRegionNonUniformMultidimensionalSplitter class first proceed 
- * to the division according to the last dimension, if the number of 
- * required division is not reached, it proceed to divide the dimension 
+ * ImageRegionNonUniformMultidimensionalSplitter class first proceed
+ * to the division according to the last dimension, if the number of
+ * required division is not reached, it proceed to divide the dimension
  * before the last one and so on.
  *
  * \ingroup ITKSystemObjects
@@ -69,16 +69,16 @@ public:
   typedef itk::ImageRegionSplitter<VImageDimension>  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageRegionNonUniformMultidimensionalSplitter,ImageRegionSplitter);
 
   /** Dimension of the image available at compile time. */
   itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
-  
+
   /** Index typedef support. An index is used to access pixel values. */
   typedef itk::Index<VImageDimension>  IndexType;
 
diff --git a/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.txx b/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.txx
index b8fbcf397c..5af5ef49eb 100644
--- a/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.txx
+++ b/Code/Common/otbImageRegionNonUniformMultidimensionalSplitter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
  *
  */
 template <unsigned int VImageDimension>
-unsigned int 
+unsigned int
 ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
 ::GetNumberOfSplits(const RegionType &region, unsigned int requestedNumber)
 {
@@ -39,11 +39,11 @@ ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
   // requested number of splits per dimension
   double splitsPerDimension[VImageDimension];
 //     ::ceil( vcl_pow((double) requestedNumber, 1.0/(double) VImageDimension));
-  
+
   unsigned int numberOfPiecesLeft=requestedNumber;
   unsigned int i, j, numPieces;
   numPieces = 1;
-  
+
   for (j=VImageDimension;j>0;--j)
   {
     if (regionSize[j-1]<numberOfPiecesLeft)
@@ -78,7 +78,7 @@ ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
   return numPieces;
 }
 
-  
+
 /**
  *
  */
@@ -91,18 +91,18 @@ ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
   RegionType splitRegion;
   IndexType splitIndex;
   SizeType splitSize, regionSize;
-  
+
   // Initialize the splitRegion to the requested region
   splitRegion = region;
   splitIndex = splitRegion.GetIndex();
   splitSize = splitRegion.GetSize();
 
   regionSize = region.GetSize();
-  
+
   // requested number of splits per dimension
-  double splitsPerDimension[VImageDimension]; 
+  double splitsPerDimension[VImageDimension];
 //     ::ceil( vcl_pow((double) numberOfPieces, 1.0/(double) VImageDimension));
-  
+
   unsigned int numberOfPiecesLeft=numberOfPieces;
 
   unsigned int j;
@@ -168,7 +168,7 @@ ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
       splitSize[j] = splitSize[j] - ijk[j]*pixelsPerSplit[j];
       }
     }
-  
+
   // set the split region ivars
   splitRegion.SetIndex( splitIndex );
   splitRegion.SetSize( splitSize );
@@ -177,14 +177,14 @@ ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
 
   return splitRegion;
 }
-  
-  
+
+
 
 /**
  *
  */
 template <unsigned int VImageDimension>
-void 
+void
 ImageRegionNonUniformMultidimensionalSplitter<VImageDimension>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/Common/otbImageRegionTileMapSplitter.h b/Code/Common/otbImageRegionTileMapSplitter.h
index bfed17f4e7..ea3abd5895 100644
--- a/Code/Common/otbImageRegionTileMapSplitter.h
+++ b/Code/Common/otbImageRegionTileMapSplitter.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ namespace otb
    * requested output region into a series of smaller requests of the
    * pipeline.  This object has two basic methods: GetNumberOfSplits()
    * and GetSplit().
-   * 
+   *
    * GetNumberOfSplits() is used to determine how may subregions a given
    * region can be divided.  You call GetNumberOfSplits with an argument
    * that is the number of subregions you want.  If the image region can
@@ -54,8 +54,8 @@ namespace otb
    * with a single slice), the ImageRegionTileMapSplitter will divide the
    * region along the next outermost dimension. If that dimension has size 1,
    * the process continues with the next outermost dimension.
-   * 
-   * Regions obtained by the ImageRegionTileMapSplitter are aligned on a grid 
+   *
+   * Regions obtained by the ImageRegionTileMapSplitter are aligned on a grid
    * with width of 256. Divisions can occur only at line defined as k*256.
    *
    * Other ImageRegionTileMapSplitter subclasses could divide an image into
@@ -76,28 +76,28 @@ namespace otb
       typedef itk::ImageRegionSplitter<VImageDimension>  Superclass;
       typedef itk::SmartPointer<Self>  Pointer;
       typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
-  
+
       /** Run-time type information (and related methods). */
       itkTypeMacro(ImageRegionTileMapSplitter,itk::Object);
 
       /** Dimension of the image available at compile time. */
       itkStaticConstMacro(ImageDimension, unsigned int, VImageDimension);
-  
+
       /** Dimension of the image available at run time. */
-      static unsigned int GetImageDimension() 
+      static unsigned int GetImageDimension()
       { return VImageDimension; }
 
       /** Index typedef support. An index is used to access pixel values. */
       typedef itk::Index<VImageDimension>  IndexType;
       typedef typename IndexType::IndexValueType  IndexValueType;
-  
+
       /** Size typedef support. A size is used to define region bounds. */
       typedef itk::Size<VImageDimension>  SizeType;
       typedef typename SizeType::SizeValueType  SizeValueType;
-    
+
       /** Region typedef support.   */
       typedef itk::ImageRegion<VImageDimension> RegionType;
 
@@ -142,6 +142,6 @@ namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
 # include "otbImageRegionTileMapSplitter.txx"
 #endif
-              
+
 #endif
 
diff --git a/Code/Common/otbImageRegionTileMapSplitter.txx b/Code/Common/otbImageRegionTileMapSplitter.txx
index 2a1b5b20cc..f37f287ea4 100644
--- a/Code/Common/otbImageRegionTileMapSplitter.txx
+++ b/Code/Common/otbImageRegionTileMapSplitter.txx
@@ -1,6 +1,6 @@
 
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -11,8 +11,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
    *
  */
   template <unsigned int VImageDimension>
-      unsigned int 
+      unsigned int
       ImageRegionTileMapSplitter<VImageDimension>
   ::GetNumberOfSplits(const RegionType &region, unsigned int requestedNumber)
   {
@@ -55,7 +55,7 @@ namespace otb
     return maxPieceUsed + 1;
   }
 
-  
+
 /**
    *
  */
@@ -68,14 +68,14 @@ namespace otb
         RegionType splitRegion;
         IndexType splitIndex;
         SizeType splitSize, regionSize;
-  
+
   // Initialize the splitRegion to the requested region
         splitRegion = region;
         splitIndex = splitRegion.GetIndex();
         splitSize = splitRegion.GetSize();
 
         regionSize = region.GetSize();
-  
+
   // split on the outermost dimension available
         splitAxis = VImageDimension - 1;
         while (regionSize[splitAxis] == 1)
@@ -114,24 +114,24 @@ namespace otb
           splitSize[splitAxis] = valuesPerPiece;
         }
 
-               
+
   // set the split region ivars
         splitRegion.SetIndex( splitIndex );
         splitRegion.SetSize( splitSize );
-               
-               
+
+
         itkDebugMacro("  Split Piece: " << splitRegion );
 
         return splitRegion;
       }
-  
-  
+
+
 
 /**
        *
  */
       template <unsigned int VImageDimension>
-          void 
+          void
           ImageRegionTileMapSplitter<VImageDimension>
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
       {
diff --git a/Code/Common/otbImageToImageListFilter.h b/Code/Common/otbImageToImageListFilter.h
index ddd6fd11e9..627cca7252 100644
--- a/Code/Common/otbImageToImageListFilter.h
+++ b/Code/Common/otbImageToImageListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbImageListSource.h"
 
-namespace otb 
+namespace otb
 {
 /** \class ImageToImageListFilter
  *
diff --git a/Code/Common/otbImageToImageListFilter.txx b/Code/Common/otbImageToImageListFilter.txx
index 544351cfee..36b92a9b41 100644
--- a/Code/Common/otbImageToImageListFilter.txx
+++ b/Code/Common/otbImageToImageListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ ImageToImageListFilter<TInputImage,TOutputImage>
   this->SetNumberOfRequiredInputs(1);
 }
 /**
- * Input Connection 
+ * Input Connection
  * \param image The input image.
  */
 template <class TInputImage, class TOutputImage>
@@ -44,7 +44,7 @@ ImageToImageListFilter<TInputImage,TOutputImage>
   this->itk::ProcessObject::SetNthInput(0,const_cast<InputImageType*>(image));
 }
 /**
- * Input image retrieval 
+ * Input image retrieval
  * \return The input image.
  */
 template <class TInputImage, class TOutputImage>
@@ -52,7 +52,7 @@ typename ImageToImageListFilter<TInputImage,TOutputImage>::InputImageType *
 ImageToImageListFilter<TInputImage,TOutputImage>
 ::GetInput(void)
 {
-  // If there is no input 
+  // If there is no input
   if (this->GetNumberOfInputs()<1)
     {
     // exit
diff --git a/Code/Common/otbImageToLineSpatialObjectListFilter.h b/Code/Common/otbImageToLineSpatialObjectListFilter.h
index a831b26b57..3eab97ec25 100644
--- a/Code/Common/otbImageToLineSpatialObjectListFilter.h
+++ b/Code/Common/otbImageToLineSpatialObjectListFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,12 +31,12 @@ namespace otb
 /** \class ImageToLineSpatialObjectListFilter
  *  \brief Base class for all process objects that output LineSpatialObjectList.
  *
- * ImageToLineSpatialObjectListFilter is the base class for all process objects 
- * that output list of LineSpatialObject. 
+ * ImageToLineSpatialObjectListFilter is the base class for all process objects
+ * that output list of LineSpatialObject.
  *
  */
- 
- 
+
+
 template <class TInputImage>
 class ITK_EXPORT ImageToLineSpatialObjectListFilter : public itk::ProcessObject
 {
@@ -49,16 +49,16 @@ public:
 
 
   typedef TInputImage InputImageType;
-  
-  
+
+
   /** Standard class typedefs. */
   typedef ImageToLineSpatialObjectListFilter             Self;
   typedef itk::ProcessObject                            Superclass;
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageToLineSpatialObjectListFilter,itk::ProcessObject);
@@ -69,37 +69,37 @@ public:
 
   /** Definition of the input and output images */
   typedef typename InputImageType::PixelType InputPixelType;
-  
+
 
   /** Definition of the size of the images. */
   typedef typename InputImageType::SizeType SizeType;
 
   typedef itk::ProcessObject ProcessObjectType;
- 
+
   /** Set/Get the input image */
   void SetInput(const InputImageType *image);
   const InputImageType * GetInput(void);
 
   /** Set/Get the list of LineSpatialObject of this process object.  */
   void SetOutput(const LinesListType *list);
-  LinesListType * GetOutput(void); 
+  LinesListType * GetOutput(void);
+
 
 
-  
 protected:
   ImageToLineSpatialObjectListFilter();
   virtual ~ImageToLineSpatialObjectListFilter() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
 
 private:
   ImageToLineSpatialObjectListFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
- 
+
 
 };
-  
+
 
 } // end namespace otb
 
diff --git a/Code/Common/otbImageToLineSpatialObjectListFilter.txx b/Code/Common/otbImageToLineSpatialObjectListFilter.txx
index 6aaecd5af7..2ddb242773 100644
--- a/Code/Common/otbImageToLineSpatialObjectListFilter.txx
+++ b/Code/Common/otbImageToLineSpatialObjectListFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,58 +30,58 @@ template<class TInputImage>
 ImageToLineSpatialObjectListFilter<TInputImage>::ImageToLineSpatialObjectListFilter()
 {
    this->SetNumberOfRequiredInputs(1);
-   this->SetNumberOfRequiredOutputs(1); 
-   
+   this->SetNumberOfRequiredOutputs(1);
+
    typename LinesListType::Pointer list = LinesListType::New();
    this->SetOutput( list );
-   
+
 }
 
 template <class TInputImage>
 void
 ImageToLineSpatialObjectListFilter<TInputImage>
 ::SetInput(const InputImageType *image)
-{  
-  this->itk::ProcessObject::SetNthInput(0, 
+{
+  this->itk::ProcessObject::SetNthInput(0,
                                    const_cast< InputImageType * >( image ) );
 }
 
 
 template <class TInputImage>
-const typename ImageToLineSpatialObjectListFilter<TInputImage>::InputImageType * 
+const typename ImageToLineSpatialObjectListFilter<TInputImage>::InputImageType *
 ImageToLineSpatialObjectListFilter<TInputImage>
 ::GetInput(void)
-{  
+{
     return static_cast<const InputImageType *>
     (this->itk::ProcessObject::GetInput(0) );
 }
 
 
 template <class TInputImage>
-void 
+void
 ImageToLineSpatialObjectListFilter<TInputImage>
 ::SetOutput(const LinesListType *list)
-  {  
-     this->ProcessObjectType::SetNthOutput(0, 
+  {
+     this->ProcessObjectType::SetNthOutput(0,
                 const_cast< LinesListType * >( list ) );
   }
-  
-  
+
+
 template <class TInputImage>
-typename ImageToLineSpatialObjectListFilter<TInputImage>::LinesListType * 
+typename ImageToLineSpatialObjectListFilter<TInputImage>::LinesListType *
 ImageToLineSpatialObjectListFilter<TInputImage>
 ::GetOutput(void)
-{ 
+{
     return static_cast<LinesListType *>
-    	(this->ProcessObjectType::GetOutput(0) ); 
+    	(this->ProcessObjectType::GetOutput(0) );
 }
 
-    
+
 /**
  *
  */
 template<class TInputImage>
-void 
+void
 ImageToLineSpatialObjectListFilter<TInputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/Common/otbImageToPathFilter.h b/Code/Common/otbImageToPathFilter.h
index 55336ee27c..2ffb69ce45 100644
--- a/Code/Common/otbImageToPathFilter.h
+++ b/Code/Common/otbImageToPathFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ namespace otb
 /**
  * \class ImageToPathFilter
  * \brief Base class for filters taking an image as input, and producing an
- * output of type Path. 
+ * output of type Path.
  */
 template <class TInputImage, class TOutputPath>
 class ITK_EXPORT ImageToPathFilter
diff --git a/Code/Common/otbImageToPathFilter.txx b/Code/Common/otbImageToPathFilter.txx
index 89753314e5..d4e3358dd6 100644
--- a/Code/Common/otbImageToPathFilter.txx
+++ b/Code/Common/otbImageToPathFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/Common/otbImageToPathListFilter.h b/Code/Common/otbImageToPathListFilter.h
index 279b1a4ff3..b8c18c4822 100644
--- a/Code/Common/otbImageToPathListFilter.h
+++ b/Code/Common/otbImageToPathListFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,16 +22,16 @@
 namespace otb
 {
 /** \class ImageToPathListFilter
- * \brief Base class used to implement filters that have a image as input and a paths list as output. 
+ * \brief Base class used to implement filters that have a image as input and a paths list as output.
+ *
  *
- * 
  * \ingroup PathListFilters
  * \ingroup PathLists
  */
 
 template <class TInputImage, class TOutputPath>
-//class ITK_EXPORT ImageToPathListFilter : public itk::PathSource<TOutputPath> 
-class ITK_EXPORT ImageToPathListFilter : public PathListSource<TOutputPath> 
+//class ITK_EXPORT ImageToPathListFilter : public itk::PathSource<TOutputPath>
+class ITK_EXPORT ImageToPathListFilter : public PathListSource<TOutputPath>
 {
 public:
   /** Standard class typedefs. */
@@ -44,17 +44,17 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageToPathListFilter, PathListSource);
 
   /** Some convenient typedefs. */
   typedef          TInputImage                    InputImageType;
   typedef typename InputImageType::ConstPointer   InputImagePointer;
-  typedef typename InputImageType::RegionType     InputImageRegionType; 
-  typedef typename InputImageType::PixelType      InputImagePixelType; 
-  typedef typename InputImageType::SizeType           SizeType;                 
-  typedef typename InputImageType::ValueType          ValueType;  
+  typedef typename InputImageType::RegionType     InputImageRegionType;
+  typedef typename InputImageType::PixelType      InputImagePixelType;
+  typedef typename InputImageType::SizeType           SizeType;
+  typedef typename InputImageType::ValueType          ValueType;
 
   typedef typename Superclass::OutputPathType         OutputPathType;
   typedef typename Superclass::OutputPathListType     OutputPathListType;
@@ -63,7 +63,7 @@ public:
   /** ImageDimension constants */
   itkStaticConstMacro(InputImageDimension, unsigned int,
                       TInputImage::ImageDimension);
-  
+
   /** Set/Get the image input of this process object. */
   virtual void SetInput( const InputImageType * image);
   const InputImageType * GetInput(void);
@@ -72,7 +72,7 @@ protected:
   ImageToPathListFilter();
   virtual ~ImageToPathListFilter() {};
 
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
   ImageToPathListFilter(const Self&); //purposely not implemented
diff --git a/Code/Common/otbImageToPathListFilter.txx b/Code/Common/otbImageToPathListFilter.txx
index 9a0a288465..3a55f68ae8 100644
--- a/Code/Common/otbImageToPathListFilter.txx
+++ b/Code/Common/otbImageToPathListFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -53,7 +53,7 @@ ImageToPathListFilter<TInputImage,TOutputPath>
 template <class TInputImage, class TOutputPath>
 const typename ImageToPathListFilter<TInputImage,TOutputPath>::InputImageType *
 ImageToPathListFilter<TInputImage,TOutputPath>
-::GetInput(void) 
+::GetInput(void)
 {
   
 	
@@ -61,11 +61,11 @@ ImageToPathListFilter<TInputImage,TOutputPath>
     {
     return 0;
     }
-  
+
   return static_cast<const TInputImage * >
 	  (this->ProcessObjectType::GetInput(0) );
 }
-  
+
 /**
  *
  */
diff --git a/Code/Common/otbImageToVectorImageCastFilter.h b/Code/Common/otbImageToVectorImageCastFilter.h
index 44d42d1a73..98926b3641 100644
--- a/Code/Common/otbImageToVectorImageCastFilter.h
+++ b/Code/Common/otbImageToVectorImageCastFilter.h
@@ -30,7 +30,7 @@ namespace Functor
      * \brief This functor can be used to convert scalar value to VariableLengthVector with another precision
      *  a size of 1.
      * \ingroup Functor
-     * 
+     *
      */
     template <class TInput, class TOutput>
       class VectorCast
@@ -42,8 +42,8 @@ namespace Functor
 
 	bool operator!=(const VectorCast&) const
 	  {
-	    return false; 
-	  } 
+	    return false;
+	  }
 	bool operator==(const VectorCast& other) const
 	  {
 	    return(*this != other);
@@ -61,24 +61,24 @@ namespace Functor
    * \class ImageToVectorImageCastFilter
    * \brief This is a helper class that convert an otb::Image into a single-channel otb::VectorImage.
    * \ingroup Singlethreaded
-   * 
+   *
    */
 template <class TInputImage, class TOutputVectorImage>
 class ITK_EXPORT ImageToVectorImageCastFilter
   : public itk::UnaryFunctorImageFilter<TInputImage, TOutputVectorImage,
   Functor::VectorCast<typename TInputImage::PixelType, typename TOutputVectorImage::PixelType> >
   {
-  public: 
+  public:
     /// Standard class typedefs
     typedef ImageToVectorImageCastFilter Self;
     typedef itk::UnaryFunctorImageFilter<TInputImage, TOutputVectorImage, Functor::VectorCast<typename TInputImage::PixelType,
       typename TOutputVectorImage::PixelType> > Superclass;
     typedef itk::SmartPointer<Self> Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     /// Method for creation through the object factory
     itkNewMacro(Self);
-    
+
     /// Runtime information
     itkTypeMacro(ImageToVectorImageCastFilter,itk::UnaryFunctorImageFilter);
 
diff --git a/Code/Common/otbLineSpatialObject.h b/Code/Common/otbLineSpatialObject.h
index 17abd8ea69..d09adc1497 100644
--- a/Code/Common/otbLineSpatialObject.h
+++ b/Code/Common/otbLineSpatialObject.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
  * \sa LineSpatialObjectPoint
  */
 template < unsigned int VDimension = 3 >
-class ITK_EXPORT LineSpatialObject 
+class ITK_EXPORT LineSpatialObject
   : public itk::PointBasedSpatialObject<VDimension>
 {
 public:
@@ -59,7 +59,7 @@ public:
   typedef std::vector< LinePointType >                   PointListType;
   typedef itk::VectorContainer<unsigned long,PointType>  PointContainerType;
   typedef itk::SmartPointer<PointContainerType>          PointContainerPointer;
-  
+
   /** Returns a reference to the list of the Line points.*/
   PointListType & GetPoints( void );
 
@@ -71,13 +71,13 @@ public:
 
   /** Return a point in the list given the index */
   SpatialObjectPointType* GetPoint(unsigned long id) {return &(m_Points[id]);}
-  
+
   /** Return the number of points in the list */
   unsigned long GetNumberOfPoints(void) const {return m_Points.size();}
 
-  /** Returns true if the line is evaluable at the requested point, 
+  /** Returns true if the line is evaluable at the requested point,
    *  false otherwise. */
-  bool IsEvaluableAt( const PointType & point, 
+  bool IsEvaluableAt( const PointType & point,
                       unsigned int depth=0, char * name=NULL ) const;
 
   /** Returns the value of the line at that point.
@@ -88,12 +88,12 @@ public:
                 unsigned int depth=0, char * name=NULL ) const;
 
   /** Returns true if the point is inside the line, false otherwise. */
-  bool IsInside( const PointType & point, 
+  bool IsInside( const PointType & point,
                  unsigned int depth, char * name) const;
 
-  /** Test whether a point is inside or outside the object 
+  /** Test whether a point is inside or outside the object
    *  For computational speed purposes, it is faster if the method does not
-   *  check the name of the class and the current depth */ 
+   *  check the name of the class and the current depth */
   virtual bool IsInside( const PointType & point) const;
 
   /** Compute the boundaries of the line.*/
@@ -106,11 +106,11 @@ protected:
   virtual ~LineSpatialObject();
   /** Method to print the object. */
   virtual void PrintSelf( std::ostream& os, itk::Indent indent ) const;
-  
+
 private:
   LineSpatialObject(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
- 
+
   /** Point list */
   PointListType   m_Points;
 };
diff --git a/Code/Common/otbLineSpatialObject.txx b/Code/Common/otbLineSpatialObject.txx
index a45341784b..bdaded8ac8 100644
--- a/Code/Common/otbLineSpatialObject.txx
+++ b/Code/Common/otbLineSpatialObject.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/Common/otbLineSpatialObjectList.h b/Code/Common/otbLineSpatialObjectList.h
index e0dfe2fd0f..481b724e09 100644
--- a/Code/Common/otbLineSpatialObjectList.h
+++ b/Code/Common/otbLineSpatialObjectList.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,10 +31,10 @@ namespace otb
 {
 /** \class LineSpatialObjectList
  */
- 
+
 class ITK_EXPORT LineSpatialObjectList :        public std::list< itk::LineSpatialObject<2>::Pointer >,
 						public itk::DataObject
-                                                
+
 {
 public:
   /** Standard class typedefs. */
@@ -43,9 +43,9 @@ public:
 
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(LineSpatialObjectList,itk::DataObject);
@@ -61,8 +61,8 @@ private:
   LineSpatialObjectList(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-}; 
-  
+};
+
 
 } // end namespace otb
 
diff --git a/Code/Common/otbList.h b/Code/Common/otbList.h
index 22e9906519..c116738423 100644
--- a/Code/Common/otbList.h
+++ b/Code/Common/otbList.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkDataObject.h"
 #include "itkObjectFactory.h"
 
-namespace otb 
+namespace otb
 {
 /** \class List
  *  \brief This class is a generic all-purpose wrapping around an std::vector<ObjectType*>.
@@ -60,7 +60,7 @@ class ITK_EXPORT List
   void Reserve(unsigned int size);
   /**
    * Get the capacity of the vector.
-   * \return The capacity of the vector. 
+   * \return The capacity of the vector.
    */
   unsigned int Capacity(void);
   /**
@@ -107,8 +107,8 @@ class ITK_EXPORT List
   {
     return m_InternalContainer[index];
   }
- 
- 
+
+
    /**
    * Return the first element of the list.
    * \return The first element of the list.
@@ -191,7 +191,7 @@ class ITK_EXPORT List
 	Iterator lIter(m_Iter+1);
     	return lIter;
       }
-      
+
       /**
        * Remove
        */
@@ -230,8 +230,8 @@ class ITK_EXPORT List
       	m_Iter=it.m_Iter;
       }
 
-	  /** 
-	    * Get the current internal iterator 
+	  /**
+	    * Get the current internal iterator
 		*/
 	  InternalIteratorType & GetIter(void)
 	  {
diff --git a/Code/Common/otbList.txx b/Code/Common/otbList.txx
index 2c93cb6ad0..b083f463a6 100644
--- a/Code/Common/otbList.txx
+++ b/Code/Common/otbList.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbList.h"
 
-namespace otb 
+namespace otb
 {
   /**
    * Constructor
@@ -34,7 +34,7 @@ namespace otb
    * \param size Size of the vector to reserve.
    */
   template <class TObject>
-  void 
+  void
   List<TObject>
   ::Reserve(unsigned int size)
   {
@@ -42,10 +42,10 @@ namespace otb
   }
   /**
    * Get the capacity of the vector.
-   * \return The capacity of the vector. 
+   * \return The capacity of the vector.
    */
   template <class TObject>
-  unsigned int 
+  unsigned int
   List<TObject>
   ::Capacity(void)
   {
@@ -56,7 +56,7 @@ namespace otb
    * \return The number of elements in the vector.
    */
   template <class TObject>
-  unsigned int 
+  unsigned int
   List<TObject>
   ::Size(void)
   {
@@ -67,7 +67,7 @@ namespace otb
    * \param size The new maximal size of the list.
    */
   template <class TObject>
-  void 
+  void
   List<TObject>
   ::Resize(unsigned int size)
   {
@@ -78,7 +78,7 @@ namespace otb
    * \param element Pointer to the element to append.
    */
   template <class TObject>
-  void 
+  void
   List<TObject>
   ::PushBack(const ObjectType* element)
   {
@@ -88,11 +88,11 @@ namespace otb
    * Delete the last element to the list.
    */
   template <class TObject>
-  void 
+  void
   List<TObject>
   ::PopBack(void)
   {
-    if( m_InternalContainer.size() > 0 ) 
+    if( m_InternalContainer.size() > 0 )
     {
         m_InternalContainer.pop_back();
     }
@@ -103,7 +103,7 @@ namespace otb
    * \param element Pointer to the element to set.
    */
   template <class TObject>
-  void 
+  void
   List<TObject>
   ::SetNthElement(unsigned int index,const ObjectType * element)
   {
@@ -204,7 +204,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename List<TObject>::Iterator 
+  typename List<TObject>::Iterator
   List<TObject>
   ::Begin(void)
   {
@@ -240,7 +240,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename List<TObject>::ReverseConstIterator 
+  typename List<TObject>::ReverseConstIterator
   List<TObject>
   ::ReverseBegin(void) const
   {
@@ -255,7 +255,7 @@ namespace otb
   typename List<TObject>::Iterator
   List<TObject>
   :: End(void)
-  { 
+  {
     Iterator iter(m_InternalContainer.end());
     return iter;
   }
@@ -264,7 +264,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename List<TObject>::ConstIterator 
+  typename List<TObject>::ConstIterator
   List<TObject>
   ::End(void) const
   {
@@ -276,7 +276,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename List<TObject>::ReverseIterator 
+  typename List<TObject>::ReverseIterator
   List<TObject>
   ::ReverseEnd(void)
   {
@@ -288,13 +288,13 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename List<TObject>::ReverseConstIterator 
+  typename List<TObject>::ReverseConstIterator
   List<TObject>
   ::ReverseEnd(void) const
   {
     ReverseConstIterator iter(m_InternalContainer.rend());
     return iter;
-  } 
+  }
   /**
    * Erase elements from begin to last.
    * \param begin Iterator pointing on first object to erase.
@@ -309,7 +309,7 @@ namespace otb
   }
   /**PrintSelf method */
   template <class TObject>
-  void 
+  void
   List<TObject>
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
diff --git a/Code/Common/otbMacro.h b/Code/Common/otbMacro.h
index 76e9035131..8747b97d20 100644
--- a/Code/Common/otbMacro.h
+++ b/Code/Common/otbMacro.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -20,9 +20,9 @@
 /**
  * otbMacro.h defines standard system-wide macros, constants, and other
  * parameters. One of its most important functions is to define macros used
- * to interface to instance variables in a standard fashion. 
+ * to interface to instance variables in a standard fashion.
  */
-  
+
 #ifndef __otbMacro_h
 #define __otbMacro_h
 
@@ -32,7 +32,7 @@
  * also used to catch errors, etc. Example usage looks like:
  * itkDebugMacro(<< "this is debug info" << this->SomeVariable); */
 #if defined(OTB_LEAN_AND_MEAN) || defined(__BORLANDC__)
-#define otbDebugMacro(x) 
+#define otbDebugMacro(x)
 #else
 #define otbDebugMacro(x) itkDebugMacro(x)
 /*  { if ( this->GetDebug() && *::itk::Object::GetGlobalWarningDisplay())   \
@@ -68,7 +68,7 @@
 	}
   #else
     #define otbGenericMsgDebugMacro(x)
-  #endif 
+  #endif
 #endif
 
 #define otbGenericMsgTestingMacro(x) \
@@ -108,8 +108,8 @@
 }
 #endif
 
-/** This macro is used to control condition. It use ONLY by the OTB developpers 
-  *  
+/** This macro is used to control condition. It use ONLY by the OTB developpers
+  *
   */
 #define otbControlConditionTestMacro(condition, message) \
 {       if( (condition) ) \
@@ -125,7 +125,7 @@
     itkDebugMacro("setting member " #name " to " << _arg); \
     this->m_##object->Set##name(_arg); \
     this->Modified(); \
-} 
+}
 
 /** Get built-in type.  Creates member Get"name"() (e.g., GetVisibility()); */
 #define otbGetObjectMemberMacro(object,name,type) \
@@ -156,8 +156,8 @@
     return this->m_##object->Get##name(); \
 }
 
-/** Testing macro. This macro doesn't throw a exception if the called command 
- * generate a itk::ExceptionObject object. For alls others use cases, the macro 
+/** Testing macro. This macro doesn't throw a exception if the called command
+ * generate a itk::ExceptionObject object. For alls others use cases, the macro
  * generate a exception. */
 #define otbTestingCheckValidCommand(command) \
   { \
@@ -204,7 +204,7 @@
         } \
    }
 
- 
+
 
 namespace otb
 {
diff --git a/Code/Common/otbMath.h b/Code/Common/otbMath.h
index 6c9d7a663c..158b8f601f 100644
--- a/Code/Common/otbMath.h
+++ b/Code/Common/otbMath.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -20,13 +20,13 @@
 /**
  * otbMath.h defines standard math macros, constants, and other
  * parameters.
- * All mathematics constans, functions (used in the OTB code) are the vcl version (vcl..., M_PI, ). 
+ * All mathematics constans, functions (used in the OTB code) are the vcl version (vcl..., M_PI, ).
  */
-  
+
 #ifndef __otbMath_h
 #define __otbMath_h
 
-// For Windows MSVC, defines these macros. 
+// For Windows MSVC, defines these macros.
 #ifdef _USE_MATH_DEFINES
 #define _MATH_DEFINES_DEFINED
 #endif
diff --git a/Code/Common/otbMirrorBoundaryCondition.h b/Code/Common/otbMirrorBoundaryCondition.h
index fe48151085..2c6d594b75 100644
--- a/Code/Common/otbMirrorBoundaryCondition.h
+++ b/Code/Common/otbMirrorBoundaryCondition.h
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ namespace otb
  * The input to this function object is a neighborhood iterator.  This boundary
  * condition object is designed to be given as a template argument to a
  * NeighborhoodIterator or any of the NeighborhoodIterator subclasses.
- * 
+ *
  * \ingroup DataRepresentation
  * \ingroup ImageObjects
  */
@@ -43,23 +43,23 @@ class ITK_EXPORT  MirrorBoundaryCondition
   : public itk::ImageBoundaryCondition<TImage>
 {
 public:
-  /** Standard class typedefs. */ 
+  /** Standard class typedefs. */
   typedef MirrorBoundaryCondition Self;
   typedef itk::ImageBoundaryCondition<TImage> Superclass;
-  
+
   /** Extract information from the image type. */
   typedef typename Superclass::PixelType PixelType;
   typedef typename Superclass::PixelPointerType PixelPointerType;
   typedef typename Superclass::IndexType IndexType;
   typedef typename Superclass::OffsetType OffsetType;
   typedef typename Superclass::NeighborhoodType NeighborhoodType;
-  
-  typedef typename Superclass::NeighborhoodAccessorFunctorType 
+
+  typedef typename Superclass::NeighborhoodAccessorFunctorType
                                  NeighborhoodAccessorFunctorType;
 
   /** Extract information from the image type. */
   itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
-  
+
   /** Default constructor. */
   MirrorBoundaryCondition() {}
 
@@ -67,7 +67,7 @@ public:
    * neighborhood iterator data.. */
   virtual PixelType operator()(const OffsetType& point_index,
                                const OffsetType& boundary_offset,
-                               const NeighborhoodType *data) const; 
+                               const NeighborhoodType *data) const;
 
   /** Computes and returns the appropriate pixel value from
    * neighborhood iterator data, using the functor. */
diff --git a/Code/Common/otbMirrorBoundaryCondition.txx b/Code/Common/otbMirrorBoundaryCondition.txx
index 3b15975ecd..655ad2a1ff 100644
--- a/Code/Common/otbMirrorBoundaryCondition.txx
+++ b/Code/Common/otbMirrorBoundaryCondition.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,7 +36,7 @@ MirrorBoundaryCondition<TImage>
   typename TImage::InternalPixelType *ptr;
   int linear_index = 0;
   unsigned int i;
-  
+
   // Find the pointer of the closest boundary pixel
 
   // Return the value of the pixel at the closest boundary point.
@@ -45,7 +45,7 @@ MirrorBoundaryCondition<TImage>
     linear_index += (point_index[i] + boundary_offset[i]) * data->GetStride(i);
     }
   ptr =data->operator[](linear_index);
-  
+
   // Wrap the pointer around the image in the necessary dimensions.  If we have
   // reached this point, we can assume that we are on the edge of the BUFFERED
   // region of the image.  Boundary conditions are only invoked if touching the
@@ -54,12 +54,12 @@ MirrorBoundaryCondition<TImage>
   // These are the step sizes for increments in each dimension of the image.
   const typename TImage::OffsetValueType * offset_table
     = iterator->GetImagePointer()->GetOffsetTable();
-    
-  
+
+
   for (i = 0; i < ImageDimension; ++i)
     {
     if (boundary_offset[i] != 0)
-      { 
+      {
 	// If the neighborhood overlaps on the low edge, then wrap from the
 	// high edge of the image.
 	if (point_index[i] < static_cast<OffsetValueType>(iterator->GetRadius(i)))
@@ -72,7 +72,7 @@ MirrorBoundaryCondition<TImage>
 	  }
       }
     }
-  
+
   return *reinterpret_cast<PixelType *>(ptr);
 }
 
@@ -89,7 +89,7 @@ MirrorBoundaryCondition<TImage>
   typename TImage::InternalPixelType *ptr;
   int linear_index = 0;
   unsigned int i;
-  
+
   // Find the pointer of the closest boundary pixel
   //  std::cout << "Boundary offset = " << boundary_offset << std::endl;
   // std::cout << "point index = " << point_index << std::endl;
@@ -101,7 +101,7 @@ MirrorBoundaryCondition<TImage>
     linear_index += (point_index[i] + boundary_offset[i]) * data->GetStride(i);
     }
   ptr = data->operator[](linear_index);
-  
+
   // Wrap the pointer around the image in the necessary dimensions.  If we have
   // reached this point, we can assume that we are on the edge of the BUFFERED
   // region of the image.  Boundary conditions are only invoked if touching the
@@ -110,8 +110,8 @@ MirrorBoundaryCondition<TImage>
   // These are the step sizes for increments in each dimension of the image.
   const typename TImage::OffsetValueType * offset_table
     = iterator->GetImagePointer()->GetOffsetTable();
-    
-  
+
+
   for (i = 0; i < ImageDimension; ++i)
     {
     if (boundary_offset[i] != 0)
@@ -128,7 +128,7 @@ MirrorBoundaryCondition<TImage>
 	  }
       }
     }
-  
+
   return neighborhoodAccessorFunctor.Get(ptr);
 }
 } // end namespace otb
diff --git a/Code/Common/otbMultiChannelExtractROI.h b/Code/Common/otbMultiChannelExtractROI.h
index 2e7c05ee2a069a38eea8a577dcfc454bfd9077f1..7148d7b81c544aa26627aef3cb0bceed3da0a56e 100644
GIT binary patch
delta 64
zcmV-G0Kfm!EWRwTS^<+=0ZFr^0m=olaR&?tlYb9*v-uCq0kg*u1p<@K6N!^q6t|NR
W70Q#{6&REE6;cQaBV}%6X=VyC?-)@4

delta 109
zcmdm|b6ICY6eFX;<S0f@Mup9b8Beh?DJX2tW#{1l(vvIsD?r?j{AU<J^j<+$CT;}<
zF0O*2%(BFi)X9#5(vzPFr-GDvi);rP!z6kN#5p4>0ivFW25|wEE2rkAWTtTe0Jd%(
AvH$=8

diff --git a/Code/Common/otbMultiChannelExtractROI.txx b/Code/Common/otbMultiChannelExtractROI.txx
index f79277692f..3ce13c7279 100644
--- a/Code/Common/otbMultiChannelExtractROI.txx
+++ b/Code/Common/otbMultiChannelExtractROI.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,7 +35,7 @@ namespace otb
  */
 template<class TInputPixelType, class TOutputPixelType>
 MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
-::MultiChannelExtractROI() :    
+::MultiChannelExtractROI() :
   ExtractROIBase< VectorImage<TInputPixelType,2> , VectorImage<TOutputPixelType,2> >(),
   m_FirstChannel(0),
   m_LastChannel(0),
@@ -125,7 +125,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
  *
  */
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -134,7 +134,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 
 
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::ChannelsReInitialization()
 {
@@ -142,7 +142,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
   m_ChannelsWorks.clear();
   // First passage in the method:
   if( m_Channels.empty() == true )
-    { 
+    {
       // - User SetFirst/LastChannel()
       if( m_ChannelsKind == 1)
 	{
@@ -178,7 +178,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 }
 
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::SetChannelsWorkWithLimits()
 {
@@ -194,42 +194,42 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 			<< "FirstChannel is greater than LastChannel"
 			<< typeid(itk::ImageBase<InputImageDimension>*).name() );
     }
-  
+
   for( unsigned int channel = m_FirstChannel ; channel <= m_LastChannel ; channel ++ )
     {
       m_ChannelsWorks.push_back(channel);
     }
-  
+
   m_Channels = m_ChannelsWorks;
 }
 
 
-/** 
+/**
  * ExtractImageFilter can produce an image which is a different resolution
  * than its input image.  As such, ExtractImageFilter needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::GenerateOutputInformation()
-{ 
+{
    // Call to the superclass implementation
   Superclass::GenerateOutputInformation();
   this->ChannelsReInitialization();
- 
+
   typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
-  
- 
+
+
   unsigned int nbComponentsPerPixel = inputPtr->GetNumberOfComponentsPerPixel();
   if( m_ChannelsKind != 0 )
     {
-      // Test if the asked channels index exists in the input image 
+      // Test if the asked channels index exists in the input image
       ChannelsType  m_BadChannels;
       m_BadChannels.clear();
       for(unsigned int i=0 ; i < m_ChannelsWorks.size() ; i++)
@@ -241,7 +241,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 		{
 		  if ( m_BadChannels[j]==m_ChannelsWorks[i] )
 		    isInsideBadChannels = true;
-		    
+
 		}
 	      if( !isInsideBadChannels)
 		m_BadChannels.push_back(m_ChannelsWorks[i]);
@@ -269,7 +269,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 
 
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        int threadId)
@@ -281,11 +281,11 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Define the portion of the input to walk for this thread
   InputImageRegionType inputRegionForThread;
   this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
-  
+
   // Define the iterators.
   typedef itk::ImageRegionIterator<OutputImageType> OutputIterator;
   typedef itk::ImageRegionConstIterator<InputImageType> InputIterator;
@@ -303,8 +303,8 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
         while( !outIt.IsAtEnd() )
         {
                 outIt.Set( inIt.Get() );
-                ++outIt; 
-                ++inIt; 
+                ++outIt;
+                ++inIt;
                 progress.CompletedPixel();
         }
   }
@@ -315,7 +315,7 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
       unsigned int channelIn(0);
       unsigned int channelOut(0);
       unsigned int nbChannels(0);
-      
+
       InputImagePixelType  pixelInput;
       while( !outIt.IsAtEnd() )
         {
@@ -330,8 +330,8 @@ MultiChannelExtractROI<TInputPixelType,TOutputPixelType>
 	      channelOut++;
 	    }
 	  outIt.Set( pixelOutput );
-	  ++outIt; 
-	  ++inIt; 
+	  ++outIt;
+	  ++inIt;
 	  progress.CompletedPixel();
         }
     }
diff --git a/Code/Common/otbMultiToMonoChannelExtractROI.h b/Code/Common/otbMultiToMonoChannelExtractROI.h
index 4ce8d62a59..c1be38728e 100644
--- a/Code/Common/otbMultiToMonoChannelExtractROI.h
+++ b/Code/Common/otbMultiToMonoChannelExtractROI.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -50,7 +50,7 @@ public:
   typedef itk::SmartPointer<const Self>         ConstPointer;
 
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(MultiToMonoChannelExtractROI, ExtractROIBase);
@@ -110,16 +110,16 @@ protected:
 private:
   MultiToMonoChannelExtractROI(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   /** Channel to process [1...] */
   unsigned int  m_Channel;
 };
 
-  
+
 } // end namespace otb
-  
+
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbMultiToMonoChannelExtractROI.txx"
 #endif
-  
+
 #endif
diff --git a/Code/Common/otbMultiToMonoChannelExtractROI.txx b/Code/Common/otbMultiToMonoChannelExtractROI.txx
index c723480c19..8c565efdb9 100644
--- a/Code/Common/otbMultiToMonoChannelExtractROI.txx
+++ b/Code/Common/otbMultiToMonoChannelExtractROI.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,7 +38,7 @@ MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
  *
  */
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -46,17 +46,17 @@ MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
 }
 
 
-/** 
+/**
  * ExtractImageFilter can produce an image which is a different resolution
  * than its input image.  As such, ExtractImageFilter needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::GenerateOutputInformation()
 {
@@ -75,7 +75,7 @@ MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
 
 
 template<class TInputPixelType, class TOutputPixelType>
-void 
+void
 MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
 ::ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
                        int threadId)
@@ -88,11 +88,11 @@ MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Define the portion of the input to walk for this thread
   InputImageRegionType inputRegionForThread;
   this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
-  
+
   // Define the iterators.
   typedef itk::ImageRegionIterator<OutputImageType> OutputIterator;
   typedef itk::ImageRegionConstIterator<InputImageType> InputIterator;
@@ -110,8 +110,8 @@ MultiToMonoChannelExtractROI<TInputPixelType,TOutputPixelType>
                 pixelInput = inIt.Get();
                 pixelOutput = static_cast<OutputValueType>(pixelInput[channelIn]);
                 outIt.Set( pixelOutput );
-                ++outIt; 
-                ++inIt; 
+                ++outIt;
+                ++inIt;
                 progress.CompletedPixel();
   }
 
diff --git a/Code/Common/otbObjectList.h b/Code/Common/otbObjectList.h
index 8d11ea4b50..a2e040bdfa 100644
--- a/Code/Common/otbObjectList.h
+++ b/Code/Common/otbObjectList.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkDataObject.h"
 #include "itkObjectFactory.h"
 
-namespace otb 
+namespace otb
 {
 /** \class ObjectList
  *  \brief This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
@@ -58,7 +58,7 @@ public:
   void Reserve(unsigned int size);
   /**
    * Get the capacity of the vector.
-   * \return The capacity of the vector. 
+   * \return The capacity of the vector.
    */
   unsigned int Capacity(void) const;
   /**
@@ -195,9 +195,9 @@ public:
     Iterator(const Iterator &it){
       m_Iter=it.m_Iter;
     };
-    
-    /** 
-	    * Get the current internal iterator 
+
+    /**
+	    * Get the current internal iterator
 		*/
     InternalIteratorType & GetIter(void)
     {
@@ -296,7 +296,7 @@ public:
   public:
     friend class ObjectList;
     friend class Iterator;
-    
+
     friend class ReverseConstIterator;
     /** typedef of the internal iterator */
     typedef typename InternalContainerType::reverse_iterator InternalReverseIteratorType;
diff --git a/Code/Common/otbObjectList.txx b/Code/Common/otbObjectList.txx
index d370c7f2c7..05afd9575a 100644
--- a/Code/Common/otbObjectList.txx
+++ b/Code/Common/otbObjectList.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbObjectList.h"
 
-namespace otb 
+namespace otb
 {
   /**
    * Constructor
@@ -34,7 +34,7 @@ namespace otb
    * \param size Size of the vector to reserve.
    */
   template <class TObject>
-  void 
+  void
   ObjectList<TObject>
   ::Reserve(unsigned int size)
   {
@@ -42,10 +42,10 @@ namespace otb
   }
   /**
    * Get the capacity of the vector.
-   * \return The capacity of the vector. 
+   * \return The capacity of the vector.
    */
   template <class TObject>
-  unsigned int 
+  unsigned int
   ObjectList<TObject>
   ::Capacity(void) const
   {
@@ -56,7 +56,7 @@ namespace otb
    * \return The number of elements in the vector.
    */
   template <class TObject>
-  unsigned int 
+  unsigned int
   ObjectList<TObject>
   ::Size(void) const
   {
@@ -67,7 +67,7 @@ namespace otb
    * \param size The new maximal size of the list.
    */
   template <class TObject>
-  void 
+  void
   ObjectList<TObject>
   ::Resize(unsigned int size)
   {
@@ -78,7 +78,7 @@ namespace otb
    * \param element Pointer to the element to append.
    */
   template <class TObject>
-  void 
+  void
   ObjectList<TObject>
   ::PushBack(ObjectType* element)
   {
@@ -90,7 +90,7 @@ namespace otb
    * \param element Pointer to the element to set.
    */
   template <class TObject>
-  void 
+  void
   ObjectList<TObject>
   ::SetNthElement(unsigned int index,ObjectPointerType element)
   {
@@ -102,7 +102,7 @@ namespace otb
    * \return The pointer to the nth element of the list.
    */
   template <class TObject>
-  typename ObjectList<TObject>::ObjectPointerType 
+  typename ObjectList<TObject>::ObjectPointerType
   ObjectList<TObject>
   ::GetNthElement(unsigned int index) const
   {
@@ -114,7 +114,7 @@ namespace otb
    */
 
   template <class TObject>
-  typename ObjectList<TObject>::ObjectPointerType 
+  typename ObjectList<TObject>::ObjectPointerType
   ObjectList<TObject>
   ::Front(void)
   {
@@ -125,7 +125,7 @@ namespace otb
    * \return The last element of the list.
    */
   template <class TObject>
-  typename ObjectList<TObject>::ObjectPointerType 
+  typename ObjectList<TObject>::ObjectPointerType
   ObjectList<TObject>
   ::Back(void)
   {
@@ -160,7 +160,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename ObjectList<TObject>::Iterator 
+  typename ObjectList<TObject>::Iterator
   ObjectList<TObject>
   ::Begin(void)
   {
@@ -196,7 +196,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename ObjectList<TObject>::ReverseConstIterator 
+  typename ObjectList<TObject>::ReverseConstIterator
   ObjectList<TObject>
   ::ReverseBegin(void) const
   {
@@ -211,7 +211,7 @@ namespace otb
   typename ObjectList<TObject>::Iterator
   ObjectList<TObject>
   :: End(void)
-  { 
+  {
     Iterator iter(m_InternalContainer.end());
     return iter;
   }
@@ -220,7 +220,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename ObjectList<TObject>::ConstIterator 
+  typename ObjectList<TObject>::ConstIterator
   ObjectList<TObject>
   ::End(void) const
   {
@@ -232,7 +232,7 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename ObjectList<TObject>::ReverseIterator 
+  typename ObjectList<TObject>::ReverseIterator
   ObjectList<TObject>
   ::ReverseEnd(void)
   {
@@ -244,13 +244,13 @@ namespace otb
    * \return The iterator.
    */
   template <class TObject>
-  typename ObjectList<TObject>::ReverseConstIterator 
+  typename ObjectList<TObject>::ReverseConstIterator
   ObjectList<TObject>
   ::ReverseEnd(void) const
   {
     ReverseConstIterator iter(m_InternalContainer.rend());
     return iter;
-  } 
+  }
   /**
    * Erase elements from begin to last.
    * \param begin Iterator pointing on first object to erase.
@@ -274,10 +274,10 @@ namespace otb
   {
     m_InternalContainer.erase(loc.GetIter());
   }
-  
+
   /**PrintSelf method */
   template <class TObject>
-  void 
+  void
   ObjectList<TObject>
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
diff --git a/Code/Common/otbObjectListSource.h b/Code/Common/otbObjectListSource.h
index 1438e48e33..4066f59473 100644
--- a/Code/Common/otbObjectListSource.h
+++ b/Code/Common/otbObjectListSource.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,15 +23,15 @@
 
 namespace otb
 {
-  
+
 /** \class ObjectListSource
    * \brief Base class for all process objects that output ObjectList data.
   *
   *
    * ObjectListSource is the base class for all process objects that output ObjectList data.
-   * Specifically, this class defines the GetOutput() method that returns a pointer to the 
-   * output ObjectList. 
-   * 
+   * Specifically, this class defines the GetOutput() method that returns a pointer to the
+   * output ObjectList.
+   *
    * Be aware that this class is templated over the list type, not the object type. It will
    * be typically something like otb::ObjectList<ObjectType>. This is to enable the use of
    * class derived from ObjectList or other implementations.
@@ -39,7 +39,7 @@ namespace otb
    * \ingroup ObjectListFilter
  */
   template <class TOutputList >
-      class ITK_EXPORT ObjectListSource : public itk::ProcessObject 
+      class ITK_EXPORT ObjectListSource : public itk::ProcessObject
       {
         public:
           /** Standard class typedefs. */
@@ -50,16 +50,16 @@ namespace otb
 
           /** Method for creation through the object factory. */
           itkNewMacro(Self);
-  
+
           /** Run-time type information (and related methods). */
           itkTypeMacro(ObjectListSource, ProcessObject);
 
           /** Some typedefs. */
           typedef TOutputList OutputListType;
           typedef typename TOutputList::Pointer OutputListPointer;
-  
+
           typedef itk::DataObject::Pointer DataObjectPointer;
-          
+
   /** Make a DataObject of the correct type to used as the specified
            * output.  Every ProcessObject subclass must be able to create a
            * DataObject that can be used as a specified output. This method
@@ -74,7 +74,7 @@ namespace otb
            * multiple outputs of different types, then that class must provide
    * an implementation of MakeOutput(). */
           virtual DataObjectPointer MakeOutput(unsigned int idx);
-          
+
             /** Graft the specified DataObject onto this ProcessObject's output.
            * This method grabs a handle to the specified DataObject's path
            * data to use as its output's own path data. It also copies the
@@ -110,7 +110,7 @@ namespace otb
            * filter's pipeline mechanism must be consistent with what the
              * mini-pipeline will do). */
           void GraftOutput(itk::DataObject *graft);
-          
+
             /** Graft the specified data object onto this ProcessObject's idx'th
            * output. This is the similar to GraftOutput method except is
            * allows you specify which output is affected. The specified index
@@ -118,7 +118,7 @@ namespace otb
            * ProcessObject::GetNumberOfOutputs()). See the GraftOutput for
              * general usage information. */
           void GraftNthOutput(unsigned int idx, itk::DataObject *graft);
-          
+
             /** Get the output data of this process object.  The output of this
            * function is not valid until an appropriate Update() method has
            * been called, either explicitly or implicitly.  Both the filter
@@ -135,7 +135,7 @@ namespace otb
            * \endcode
            *
            * In this situation, \a someFilter and \a anotherFilter are said
-           * to constitute a \b pipeline.  
+           * to constitute a \b pipeline.
            *
            * \code
            *   image = someFilter->GetOutput();
@@ -150,7 +150,7 @@ namespace otb
            * either order.)
            *
            * Note that Update() is not called automatically except within a
-           * pipeline as in the first example.  When \b streaming (using a 
+           * pipeline as in the first example.  When \b streaming (using a
            * StreamingImageFilter) is activated, it may be more efficient to
            * use a pipeline than to call Update() once for each filter in
            * turn.
@@ -162,7 +162,7 @@ namespace otb
           OutputListType * GetOutput(void);
           OutputListType * GetOutput(unsigned int idx);
 
-  
+
         protected:
           /** Constructor */
           ObjectListSource();
@@ -171,9 +171,9 @@ namespace otb
           /**PrintSelf method */
           virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-          /** Ensure that the list are cleared before processing */ 
+          /** Ensure that the list are cleared before processing */
           virtual void  AllocateOutputs();
-          
+
   /** ObjectListSource can be implemented as a multithreaded filter.
            * Therefore, this implementation provides a ThreadedGenerateData() routine
            * which is called for each processing thread. The output image data is
diff --git a/Code/Common/otbObjectListSource.txx b/Code/Common/otbObjectListSource.txx
index 89289a6393..a9e119df21 100644
--- a/Code/Common/otbObjectListSource.txx
+++ b/Code/Common/otbObjectListSource.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,12 +34,12 @@ namespace otb
   // Create the output. We use static_cast<> here because we know the default
   // output must be of type TOutputImage
     typename TOutputList::Pointer output
-        = static_cast<TOutputList*>(this->MakeOutput(0).GetPointer()); 
+        = static_cast<TOutputList*>(this->MakeOutput(0).GetPointer());
     this->Superclass::SetNumberOfRequiredOutputs(1);
     this->Superclass::SetNthOutput(0, output.GetPointer());
-  
+
   }
-  
+
   /**
    *
    */
@@ -63,11 +63,11 @@ namespace otb
     {
       return 0;
     }
-  
+
     return static_cast<TOutputList*>
         (this->Superclass::GetOutput(0));
   }
-  
+
   /**
    *
    */
@@ -79,10 +79,10 @@ namespace otb
     return static_cast<TOutputList*>
         (this->Superclass::GetOutput(idx));
   }
-  
+
   /**
    *
-   */ 
+   */
   template<class TOutputList>
       void
       ObjectListSource<TOutputList>
@@ -90,7 +90,7 @@ namespace otb
   {
     this->GraftNthOutput(0, graft);
   }
-     
+
   /**
    *
    */
@@ -101,17 +101,17 @@ namespace otb
   {
     if ( idx >= this->GetNumberOfOutputs() )
     {
-      itkExceptionMacro(<<"Requested to graft output " << idx << 
+      itkExceptionMacro(<<"Requested to graft output " << idx <<
           " but this filter only has " << this->GetNumberOfOutputs() << " Outputs.");
-    }  
-         
+    }
+
     if ( !graft )
     {
       itkExceptionMacro(<<"Requested to graft output that is a NULL pointer" );
     }
-           
+
     itk::DataObject * output = this->GetOutput(idx);
-           
+
     // Call GraftImage to copy meta-information, regions, and the pixel container
     output->Graft( graft );
   }
@@ -132,7 +132,7 @@ namespace otb
       outputPtr->Clear();
     }
   }
-  
+
 /**
    * GenerateData
  */
@@ -143,7 +143,7 @@ namespace otb
   {
     itkExceptionMacro("subclass should override this method!!!");
   }
-  
+
 /**
    * PrintSelf Method
  */
diff --git a/Code/Common/otbObjectListToObjectListFilter.h b/Code/Common/otbObjectListToObjectListFilter.h
index fc0bb54d4b..36ae611477 100644
--- a/Code/Common/otbObjectListToObjectListFilter.h
+++ b/Code/Common/otbObjectListToObjectListFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,20 +22,20 @@
 
 namespace otb
 {
-  
+
 /** \class ObjectListToObjectListFilter
-   * \brief Base class for filters that take an ObjectList as input and produce an ObjectList as output. 
+   * \brief Base class for filters that take an ObjectList as input and produce an ObjectList as output.
    *
-   * ObjectListToObjectListFilter is the base class for all process objects that output 
-   * ObjectList data and require ObjectList data as input. Specifically, this class 
+   * ObjectListToObjectListFilter is the base class for all process objects that output
+   * ObjectList data and require ObjectList data as input. Specifically, this class
    * defines the SetInput() method for defining the input to a filter.
    *
    * Be aware that this class is templated over the list type, not the object type. It will
    * be typically something like otb::ObjectList<ObjectType>. This is to enable the use of
    * class derived from ObjectList or other implementations.
-   * 
    *
-   * \ingroup ObjectListFilter  
+   *
+   * \ingroup ObjectListFilter
  */
   template <class TInputList, class TOutputList >
       class ITK_EXPORT ObjectListToObjectListFilter : public otb::ObjectListSource<TOutputList>
@@ -49,7 +49,7 @@ namespace otb
 
           /** Method for creation through the object factory. */
           itkNewMacro(Self);
-  
+
           /** Run-time type information (and related methods). */
           itkTypeMacro(ObjectListToObjectListFilter, ObjectListSource);
 
@@ -61,14 +61,14 @@ namespace otb
           typedef typename TInputList::ConstIterator InputListIterator;
           typedef typename InputListType::ObjectType InputObjectType;
           typedef typename OutputListType::ObjectType OutputObjectType;
-  
+
           typedef itk::DataObject::Pointer DataObjectPointer;
 
-  
+
           virtual void SetInput( const InputListType *input);
           const InputListType * GetInput(void);
 
-  
+
         protected:
           /** Constructor */
           ObjectListToObjectListFilter();
diff --git a/Code/Common/otbObjectListToObjectListFilter.txx b/Code/Common/otbObjectListToObjectListFilter.txx
index c3b3baa3a4..020c309ba6 100644
--- a/Code/Common/otbObjectListToObjectListFilter.txx
+++ b/Code/Common/otbObjectListToObjectListFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -42,20 +42,20 @@ namespace otb
   ::SetInput(const InputListType *input)
   {
  // Process object is not const-correct so the const_cast is required here
-    this->itk::ProcessObject::SetNthInput(0, 
+    this->itk::ProcessObject::SetNthInput(0,
                                           const_cast< InputListType * >( input ) );
   }
 
   template <class TInputList, class TOutputList>
       const typename ObjectListToObjectListFilter<TInputList,TOutputList>::InputListType *
           ObjectListToObjectListFilter<TInputList,TOutputList>
-  ::GetInput(void) 
+  ::GetInput(void)
   {
     if (this->GetNumberOfInputs() < 1)
     {
       return 0;
     }
-  
+
     return static_cast<const TInputList * >
         (this->itk::ProcessObject::GetInput(0) );
   }
diff --git a/Code/Common/otbPathFunction.h b/Code/Common/otbPathFunction.h
index 374a205cc0..93f3607fe3 100644
--- a/Code/Common/otbPathFunction.h
+++ b/Code/Common/otbPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
  *
  * PathFunction is a baseclass for all objects that evaluates
  * a function of an image using a path list.
- * This class is templated over the input image type, the path type 
+ * This class is templated over the input image type, the path type
  * and the function output and the coordinate representation type
  * (e.g. float or double).
  *
@@ -42,8 +42,8 @@ namespace otb
  */
 template <class TInputPath,
           class TOutput>
-class ITK_EXPORT PathFunction : 
-    public itk::FunctionBase< TInputPath, TOutput > 
+class ITK_EXPORT PathFunction :
+    public itk::FunctionBase< TInputPath, TOutput >
 {
 public:
 
@@ -52,14 +52,14 @@ public:
   typedef itk::FunctionBase<  TInputPath,TOutput >                     Superclass;
   typedef itk::SmartPointer<Self>                                      Pointer;
   typedef itk::SmartPointer<const Self>                                ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(PathFunction, itk::FunctionBase);
 
   /** InputPathType typedef support. */
   typedef typename Superclass::InputType InputPathType;
 
-  /** InputPathPointer typedef support */ 
+  /** InputPathPointer typedef support */
   typedef typename InputPathType::ConstPointer InputPathConstPointer;
 
   /** OutputType typedef support. */
@@ -82,7 +82,7 @@ protected:
 private:
   PathFunction(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
 
 } // namespace otb
diff --git a/Code/Common/otbPathFunction.txx b/Code/Common/otbPathFunction.txx
index c44c33efb0..9fceaa6021 100644
--- a/Code/Common/otbPathFunction.txx
+++ b/Code/Common/otbPathFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
diff --git a/Code/Common/otbPathListSource.h b/Code/Common/otbPathListSource.h
index 2c8e05bc41..f9fd6ad905 100644
--- a/Code/Common/otbPathListSource.h
+++ b/Code/Common/otbPathListSource.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,9 +24,9 @@
 
 namespace otb
 {
-  
+
 /** \class PathListSource
- * \brief Base class for filters with a PathList output type.  
+ * \brief Base class for filters with a PathList output type.
  *
  * PathListSource is the base class for all filters producing a PathList.
  * This class defines the GetOutput().
@@ -45,10 +45,10 @@ public:
   typedef ObjectListSource<ObjectList<TOutputPath> >              Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-    
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(PathListSource,ObjectListSource);
 
@@ -60,7 +60,7 @@ public:
   typedef typename Superclass::OutputListType       OutputPathListType;
   typedef typename OutputPathListType::Pointer      OutputPathListPointerType;
   typedef typename OutputPathListType::ConstPointer OutputPathListConstPointerType;
-  
+
   /** Get the output data of this process object.  The output of this
    * function is not valid until an appropriate Update() method has
    * been called, either explicitly or implicitly.  Both the filter
@@ -77,7 +77,7 @@ public:
    * \endcode
    *
    * In this situation, \a someFilter and \a anotherFilter are said
-   * to constitute a \b pipeline.  
+   * to constitute a \b pipeline.
    *
    * \code
    *   image = someFilter->GetOutput();
@@ -92,7 +92,7 @@ public:
    * either order.)
    *
    * Note that Update() is not called automatically except within a
-   * pipeline as in the first example.  When \b streaming (using a 
+   * pipeline as in the first example.  When \b streaming (using a
    * StreamingImageFilter) is activated, it may be more efficient to
    * use a pipeline than to call Update() once for each filter in
    * turn.
@@ -103,7 +103,7 @@ public:
    */
 //   OutputPathListType * GetOutput(void);
 //   OutputPathListType * GetOutput(unsigned int idx);
-  
+
   /** Graft the specified DataObject onto this ProcessObject's output.
    * This method grabs a handle to the specified DataObject's path
    * data to use as its output's own path data. It also copies the
@@ -170,7 +170,7 @@ protected:
   PathListSource() {};
   virtual ~PathListSource() {}
 //   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
 private:
   PathListSource(const Self&); //purposely not implemented
   void operator=(const Self&);   //purposely not implemented
diff --git a/Code/Common/otbPathListToHistogramGenerator.h b/Code/Common/otbPathListToHistogramGenerator.h
index e567bb376d..51cb979b0c 100644
--- a/Code/Common/otbPathListToHistogramGenerator.h
+++ b/Code/Common/otbPathListToHistogramGenerator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,8 +39,8 @@ namespace otb {
  *  the ListSampleToHistogramGenerator.
  *
  */
-  
- 
+
+
 template< class TPath,class TFunction >
 class PathListToHistogramGenerator : public itk::Object
 {
@@ -73,12 +73,12 @@ public:
   typedef itk::Statistics::ListSample< ListSampleVectorType >      ListSampleType ;
   typedef typename ListSampleType::Pointer                         ListSamplePointer;
   typedef typename ListSampleType::ConstPointer                    ListSampleConstPointer;
-  
+
   typedef itk::Statistics::DenseFrequencyContainer        FrequencyContainerType;
 
 
-  typedef itk::Statistics::ListSampleToHistogramGenerator< 
-                         ListSampleType, 
+  typedef itk::Statistics::ListSampleToHistogramGenerator<
+                         ListSampleType,
 			 MeasurementType,
                          FrequencyContainerType,1>        GeneratorType;
 
@@ -98,15 +98,15 @@ public:
 
   /** Connects the input PathList for which the histogram is going to be computed */
   void SetInput( PathListPointer path);
-  
+
   /** Return the histogram. o00
-   \warning This output is only valid after the Compute() method has been invoked 
+   \warning This output is only valid after the Compute() method has been invoked
    \sa Compute */
   const HistogramType * GetOutput() const;
-  
+
   /** Set number of histogram bins */
   void SetNumberOfBins( const SizeType & size );
- 
+
   /** Set marginal scale value to be passed to the histogram generator */
   void SetMarginalScale( double marginalScale );
   void SetHistogramMin(const MeasurementVectorType & histogramMin);
@@ -129,7 +129,7 @@ private:
 };
 
 
-} // end of namespace OTB 
+} // end of namespace OTB
 
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbPathListToHistogramGenerator.txx"
diff --git a/Code/Common/otbPathListToHistogramGenerator.txx b/Code/Common/otbPathListToHistogramGenerator.txx
index 9419846e1e..74c4aa5cf3 100644
--- a/Code/Common/otbPathListToHistogramGenerator.txx
+++ b/Code/Common/otbPathListToHistogramGenerator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,12 +22,12 @@
 #include "otbPathListToHistogramGenerator.h"
 
 
-namespace otb { 
+namespace otb {
 
 
 template< class TPath,class TFunction >
 PathListToHistogramGenerator< TPath, TFunction >
-::PathListToHistogramGenerator() 
+::PathListToHistogramGenerator()
 {
   m_HistogramGenerator = GeneratorType::New();
 }
@@ -37,7 +37,7 @@ PathListToHistogramGenerator< TPath, TFunction >
 template< class TPath,class TFunction >
 void
 PathListToHistogramGenerator< TPath, TFunction >
-::SetInput( PathListPointer path ) 
+::SetInput( PathListPointer path )
 {
   m_PathList = path ;
 }
@@ -56,23 +56,23 @@ PathListToHistogramGenerator< TPath, TFunction >
 template< class TPath,class TFunction >
 void
 PathListToHistogramGenerator< TPath, TFunction >
-::Compute() 
+::Compute()
 {
-	
+
     PathPointer vertexList;
-    
+
     ListSamplePointer  ListSample = ListSampleType::New();
     int nbElementPathList = m_PathList->size();
- 
+
     ListSampleVectorType ResultFunction;
-    
+
     typename TFunction::Pointer function = TFunction::New();
-   
+
     for(int noPathList = 0 ; noPathList < nbElementPathList; noPathList++ )
     {
-       vertexList = (*m_PathList)[noPathList]; 
+       vertexList = (*m_PathList)[noPathList];
        function->SetInputPath( vertexList );
-       
+
        ResultFunction[0] = static_cast<MeasurementType>( function->Evaluate() );
        ListSample->PushBack(ResultFunction);
 
@@ -87,7 +87,7 @@ PathListToHistogramGenerator< TPath, TFunction >
 template< class TPath,class TFunction >
 void
 PathListToHistogramGenerator< TPath, TFunction >
-::SetNumberOfBins( const SizeType & size ) 
+::SetNumberOfBins( const SizeType & size )
 {
   m_HistogramGenerator->SetNumberOfBins( size );
 }
diff --git a/Code/Common/otbPathListToPathListFilter.h b/Code/Common/otbPathListToPathListFilter.h
index c6dd6a8cca..f283ae6896 100644
--- a/Code/Common/otbPathListToPathListFilter.h
+++ b/Code/Common/otbPathListToPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -36,13 +36,13 @@ class ITK_EXPORT PathListToPathListFilter
   typedef ObjectListToObjectListFilter<ObjectList<TPath>, ObjectList<TPath> >         Superclass;
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PathListToPathListFilter, ObjectListToObjectListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::InputObjectType PathType;
   typedef typename Superclass::InputListType PathListType;
@@ -53,7 +53,7 @@ class ITK_EXPORT PathListToPathListFilter
   typedef typename PathType::Pointer OutputPathPointerType;
   typedef typename Superclass::OutputListType OutputPathListType;
   typedef typename Superclass::OutputListPointer OutputPathListPointerType;
-  
+
 protected:
   /** Constructor */
   PathListToPathListFilter(){};
diff --git a/Code/Common/otbPersistentFilterStreamingDecorator.h b/Code/Common/otbPersistentFilterStreamingDecorator.h
index 37946d0b40..0130627a4e 100644
--- a/Code/Common/otbPersistentFilterStreamingDecorator.h
+++ b/Code/Common/otbPersistentFilterStreamingDecorator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ namespace otb
 {
 /** \class PersistentFilterStreamingDecorator
  *  \brief This filter link a persistent filter with a StreamingImageVirtualWriter.
- * 
+ *
  *  The StreamingVirtualWriter will break the input image into pieces and stream each
  *  piece through the persistent filter. That way, the persistent filter will computes
  *  its data on the whole image, but never loads the whole of it, and eventually processes
@@ -48,13 +48,13 @@ class ITK_EXPORT PersistentFilterStreamingDecorator
   typedef itk::ProcessObject                Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PersistentFilterStreamingDecorator,ProcessObject);
-  
+
   /** Template parameters typedefs */
   typedef TFilter FilterType;
   typedef typename FilterType::Pointer FilterPointerType;
diff --git a/Code/Common/otbPersistentFilterStreamingDecorator.txx b/Code/Common/otbPersistentFilterStreamingDecorator.txx
index ca68d6b028..1efd984a0b 100644
--- a/Code/Common/otbPersistentFilterStreamingDecorator.txx
+++ b/Code/Common/otbPersistentFilterStreamingDecorator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -49,7 +49,7 @@ PersistentFilterStreamingDecorator<TFilter>
     {
     return 0;
     }
-  
+
   return static_cast<ImageType*>(this->ProcessObject::GetInput(0));
 }
 template <class TFilter>
diff --git a/Code/Common/otbPersistentImageFilter.h b/Code/Common/otbPersistentImageFilter.h
index 285a01c1f7..92fdb52e3e 100644
--- a/Code/Common/otbPersistentImageFilter.h
+++ b/Code/Common/otbPersistentImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,13 +23,13 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class PersistentImageFilter
- *  \brief This filter is the base class for all filter persisting data through multiple 
- *   update. 
- *   For instance, a filter computing global statistics on an image with streaming 
- *   capabilities will have to keep the temporary results for each streamed piece of the 
+ *  \brief This filter is the base class for all filter persisting data through multiple
+ *   update.
+ *   For instance, a filter computing global statistics on an image with streaming
+ *   capabilities will have to keep the temporary results for each streamed piece of the
  *   image in order to synthetize the global statistics at the end. This filter is an
  *   itk::ImageToImageFilter, providing two additional methods. The first one, Synthetize(),
- *   allows the user to synthetize() temporary data produced by the multiple updates on different 
+ *   allows the user to synthetize() temporary data produced by the multiple updates on different
  *   pieces of the image to the global result. The second one, Reset(), allows the user to
  *   reset the temporary data for a new input image for instance.
  *
@@ -48,10 +48,10 @@ class ITK_EXPORT PersistentImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>                           Pointer;
   typedef itk::SmartPointer<const Self>                     ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PersistentImageFilter,ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
diff --git a/Code/Common/otbPointSetAndValuesFunction.h b/Code/Common/otbPointSetAndValuesFunction.h
index 70f0a805f6..d683c30a4e 100644
--- a/Code/Common/otbPointSetAndValuesFunction.h
+++ b/Code/Common/otbPointSetAndValuesFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -40,19 +40,19 @@ namespace otb
       typedef itk::FunctionBase<itk::Point<TCoordRep,::itk::GetPointSetDimension<TPointSet>::PointDimension>,TValue> Superclass;
       typedef itk::SmartPointer<Self>           Pointer;
       typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
       /** New macro */
       itkNewMacro(Self);
- 
+
       /** Creation through object factory macro */
       itkTypeMacro(PointSetAndValuesFunction, FunctionBase);
- 
+
       typedef TPointSet PointSetType;
       typedef typename PointSetType::ConstPointer PointSetConstPointerType;
       typedef TValue ValueType;
       typedef TCoordRep CoordRepType;
       typedef typename PointSetType::PointType PointType;
-      
+
       typedef itk::Index<PointType::PointDimension> IndexType;
       typedef itk::ContinuousIndex<CoordRepType,PointType::PointDimension> ContinuousIndexType;
 
@@ -64,16 +64,16 @@ namespace otb
 
       /**
        * Set the point set.
-       * \param the point set 
+       * \param the point set
        */
       virtual void SetPointSet( const PointSetType * ptr );
       /**
        * Get the point set.
-       * \return the point set 
+       * \return the point set
        */
       const PointSetType * GetPointSe() const
       { return m_PointSet.GetPointer(); }
-      
+
       /** Evaluate the function at specified Point position.
        * Subclasses must provide this method. */
       virtual TValue Evaluate( const PointType& point ) const = 0;
@@ -85,14 +85,14 @@ namespace otb
       /** Evaluate the function at specified ContinousIndex position.
        * Subclasses must provide this method. */
       virtual TValue EvaluateAtContinuousIndex( const ContinuousIndexType & index ) const = 0;
-  
+
       protected:
       /** Constructor */
       PointSetAndValuesFunction()
       {
 	m_PointSet = PointSetType::New();
 	m_ValueVector = ValueVectorType::New();
-	
+
       }
       /** Destructor */
       virtual ~PointSetAndValuesFunction() {};
diff --git a/Code/Common/otbPointSetSource.h b/Code/Common/otbPointSetSource.h
index 7c73c64429..abe1c8df53 100644
--- a/Code/Common/otbPointSetSource.h
+++ b/Code/Common/otbPointSetSource.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ namespace otb
  *
  * \ingroup DataSources
  */
- 
+
 template <class TOutputPointSet>
 class ITK_EXPORT PointSetSource : public itk::ProcessObject
 {
@@ -47,9 +47,9 @@ public:
   typedef itk::ProcessObject             Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(PointSetSource,itk::ProcessObject);
@@ -58,11 +58,11 @@ public:
   typedef itk::DataObject::Pointer             DataObjectPointer;
   typedef TOutputPointSet                      OutputPointSetType;
   typedef typename OutputPointSetType::Pointer OutputPointSetPointer;
-  
+
   /** Get the point set output of this process object.  */
   OutputPointSetType * GetOutput(void);
   OutputPointSetType * GetOutput(unsigned int idx);
-  
+
   /** Set the point set output of this process object. This call is slated
    * to be removed from ITK. You should GraftOutput() and possible
    * DataObject::DisconnectPipeline() to properly change the output. */
@@ -124,12 +124,12 @@ protected:
   PointSetSource();
   virtual ~PointSetSource() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   /** Requested region of Point Set is specified as i of N unstructured regions.
-   * Since all DataObjects should be able to set the requested region in 
+   * Since all DataObjects should be able to set the requested region in
    * unstructured form, just copy output->RequestedRegion all inputs. */
   void GenerateInputRequestedRegion();
-  
+
 private:
   PointSetSource(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -139,7 +139,7 @@ private:
   int m_GenerateDataRegion;
   int m_GenerateDataNumberOfRegions;
   };
-  
+
 
 } // end namespace otb
 
diff --git a/Code/Common/otbPointSetSource.txx b/Code/Common/otbPointSetSource.txx
index a5992ff2d9..5326964e1a 100644
--- a/Code/Common/otbPointSetSource.txx
+++ b/Code/Common/otbPointSetSource.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ PointSetSource<TOutputPointSet>
   // Create the output. We use static_cast<> here because we know the default
   // output must be of type TOutputPointSet
   OutputPointSetPointer output
-    = static_cast<TOutputPointSet*>(this->MakeOutput(0).GetPointer()); 
+    = static_cast<TOutputPointSet*>(this->MakeOutput(0).GetPointer());
 
   this->ProcessObject::SetNumberOfRequiredOutputs(1);
   this->ProcessObject::SetNthOutput( 0, output.GetPointer() );
@@ -65,12 +65,12 @@ PointSetSource<TOutputPointSet>
     {
     return 0;
     }
-  
+
   return static_cast<TOutputPointSet*>
     (this->ProcessObject::GetOutput(0));
 }
 
-  
+
 /**
  *
  */
@@ -88,7 +88,7 @@ PointSetSource<TOutputPointSet>
  *
  */
 template<class TOutputPointSet>
-void 
+void
 PointSetSource<TOutputPointSet>
 ::SetOutput(OutputPointSetType *output)
 {
@@ -101,7 +101,7 @@ PointSetSource<TOutputPointSet>
  *
  */
 template<class TOutputPointSet>
-void 
+void
 PointSetSource<TOutputPointSet>
 ::GenerateInputRequestedRegion()
 {
@@ -110,7 +110,7 @@ PointSetSource<TOutputPointSet>
 
 
 /**
- * 
+ *
  */
 template<class TOutputPointSet>
 void
@@ -122,7 +122,7 @@ PointSetSource<TOutputPointSet>
 
 
 /**
- * 
+ *
  */
 template<class TOutputPointSet>
 void
@@ -131,9 +131,9 @@ PointSetSource<TOutputPointSet>
 {
   if ( idx >= this->GetNumberOfOutputs() )
     {
-    itkExceptionMacro(<<"Requested to graft output " << idx << 
+    itkExceptionMacro(<<"Requested to graft output " << idx <<
         " but this filter only has " << this->GetNumberOfOutputs() << " Outputs.");
-    }  
+    }
 
   if ( !graft )
     {
@@ -151,7 +151,7 @@ PointSetSource<TOutputPointSet>
  *
  */
 template<class TOutputPointSet>
-void 
+void
 PointSetSource<TOutputPointSet>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/Common/otbPolyLineImageConstIterator.h b/Code/Common/otbPolyLineImageConstIterator.h
index 415d095d61..a81b0586de 100644
--- a/Code/Common/otbPolyLineImageConstIterator.h
+++ b/Code/Common/otbPolyLineImageConstIterator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
  *  This iterator encapsulates the itk::LineIterator along with the VectorContainer iterator on
  *  the vertex list of the polyline.
  *
- * \ingroup Iterators 
+ * \ingroup Iterators
  * \sa PolyLineParametricPath
  * \sa PolyLineParametricPathWithValue
  * \sa LineIterator
@@ -56,7 +56,7 @@ class ITK_EXPORT PolyLineImageConstIterator
   typedef typename TImage::RegionType            RegionType;
   typedef typename TImage::SpacingType           SpacingType;
   typedef typename TImage::PointType             PointType;
-  typedef TImage                                 ImageType;           
+  typedef TImage                                 ImageType;
   typedef TPath                                  PathType;
   typedef typename PathType::VertexType          VertexType;
   typedef typename PathType::VertexListType      VertexListType;
@@ -70,9 +70,9 @@ class ITK_EXPORT PolyLineImageConstIterator
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(PolyLineImageConstIterator, None);
-  
+
   /** Get the dimension (size) of the index. */
-  static unsigned int GetImageIteratorDimension() 
+  static unsigned int GetImageIteratorDimension()
     {
     return TImage::ImageDimension;
     }
@@ -88,8 +88,8 @@ class ITK_EXPORT PolyLineImageConstIterator
     }
   /** Is the iterator at the end of the line? */
   bool IsAtEnd()
-    {   
-	  return (m_InternalVertexIterator == m_Path->GetVertexList()->End()) 
+    {
+	  return (m_InternalVertexIterator == m_Path->GetVertexList()->End())
 	    && m_InternalImageIterator.IsAtEnd();
     }
   /** Move an iterator to the beginning of the line. */
@@ -104,7 +104,7 @@ class ITK_EXPORT PolyLineImageConstIterator
   /** Default Destructor. */
   virtual ~PolyLineImageConstIterator() {};
 
-protected: //made protected so other iterators can access 
+protected: //made protected so other iterators can access
   /** Smart pointer to the source image. */
   typename ImageType::ConstWeakPointer m_Image;
   /** Smart pointer to the path */
diff --git a/Code/Common/otbPolyLineImageConstIterator.txx b/Code/Common/otbPolyLineImageConstIterator.txx
index bef8f6fe7b..8796c1fc2a 100644
--- a/Code/Common/otbPolyLineImageConstIterator.txx
+++ b/Code/Common/otbPolyLineImageConstIterator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
  */
 template <class TImage, class TPath>
 PolyLineImageConstIterator<TImage, TPath>
-::PolyLineImageConstIterator(const ImageType *imagePtr,const PathType * pathPtr) 
+::PolyLineImageConstIterator(const ImageType *imagePtr,const PathType * pathPtr)
   : m_InternalImageIterator(const_cast<ImageType *>(imagePtr),
 			    imagePtr->GetLargestPossibleRegion().GetIndex(),
 			    imagePtr->GetLargestPossibleRegion().GetIndex())
@@ -48,7 +48,7 @@ PolyLineImageConstIterator<TImage, TPath>
     for(unsigned int i = 0;i<ImageType::ImageDimension;++i)
     {
       target[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
-    }    
+    }
   }
   else
   {
@@ -85,17 +85,17 @@ PolyLineImageConstIterator<TImage, TPath>
   ++m_InternalVertexIterator;
   if(m_InternalVertexIterator!=m_Path->GetVertexList()->End())
   {
-      
+
     for(unsigned int i = 0;i<ImageType::ImageDimension;++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>
@@ -115,7 +115,7 @@ PolyLineImageConstIterator<TImage,TPath>
         source[i] = static_cast<unsigned int>(m_InternalVertexIterator.Value()[i]);
       }
 	  // otbMsgDebugMacro(<<"Source: "<<source);
-      ++m_InternalVertexIterator;	  
+      ++m_InternalVertexIterator;
       if(m_InternalVertexIterator!=m_Path->GetVertexList()->End())
       {
         IndexType target;
@@ -124,7 +124,7 @@ PolyLineImageConstIterator<TImage,TPath>
           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;
       }
     }
diff --git a/Code/Common/otbPolyLineImageIterator.h b/Code/Common/otbPolyLineImageIterator.h
index f85596a44e..12abc174e2 100644
--- a/Code/Common/otbPolyLineImageIterator.h
+++ b/Code/Common/otbPolyLineImageIterator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
  *  This iterator encapsulates the itk::LineIterator along with the VectorContainer iterator on
  *  the vertex list of the polyline.
  *
- * \ingroup Iterators 
+ * \ingroup Iterators
  * \sa PolyLineParametricPath
  * \sa PolyLineParametricPathWithValue
  * \sa LineIterator
@@ -48,7 +48,7 @@ class ITK_EXPORT PolyLineImageIterator
 
   itkStaticConstMacro(ImageIteratorDimension, unsigned int,
                       TImage::ImageDimension);
-  
+
   typedef typename TImage::IndexType             IndexType;
   typedef typename TImage::IndexValueType        IndexValueType;
   typedef typename TImage::OffsetType            OffsetType;
@@ -58,7 +58,7 @@ class ITK_EXPORT PolyLineImageIterator
   typedef typename TImage::RegionType            RegionType;
   typedef typename TImage::SpacingType           SpacingType;
   typedef typename TImage::PointType             PointType;
-  typedef TImage                                 ImageType;           
+  typedef TImage                                 ImageType;
   typedef TPath                                  PathType;
   typedef typename PathType::VertexType          VertexType;
   typedef typename PathType::VertexListType      VertexListType;
@@ -69,16 +69,16 @@ class ITK_EXPORT PolyLineImageIterator
   typedef typename TImage::InternalPixelType     InternalPixelType;
   typedef typename TImage::PixelType             PixelType;
   typedef typename TImage::AccessorType          AccessorType;
- 
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(PolyLineImageIterator,PolyLineImageConstIterator);
-  
+
   /** Set the pixel value */
   void Set(const PixelType & value)
     {
       this->m_InternalImageIterator.Set(value);
     }
-  /** Return a reference to the pixel 
+  /** Return a reference to the pixel
    * This method will provide the fastest access to pixel
    * data, but it will NOT support ImageAdaptors. */
   PixelType & Value(void)
@@ -91,7 +91,7 @@ class ITK_EXPORT PolyLineImageIterator
       return *this;
     };
   /** Constructor establishes an iterator to walk along a line */
-  PolyLineImageIterator(ImageType *imagePtr,PathType * pathPtr) 
+  PolyLineImageIterator(ImageType *imagePtr,PathType * pathPtr)
     : Superclass(imagePtr,pathPtr) {};
   /** Default Destructor. */
   virtual ~PolyLineImageIterator() {};
diff --git a/Code/Common/otbPolyLineParametricPathWithValue.h b/Code/Common/otbPolyLineParametricPathWithValue.h
index 45bfb21716..182c642301 100644
--- a/Code/Common/otbPolyLineParametricPathWithValue.h
+++ b/Code/Common/otbPolyLineParametricPathWithValue.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
  *  \brief This class implement a PolyLineParametricPath for which a value can be set.
  * The value is stored in the itk::MetaDataDictionary.
  * The precision of the value can be set.
- * 
+ *
  * \sa itk::PolyLineParametricPath.
  */
 template < class TValue,unsigned int VDimension=2>
@@ -41,22 +41,22 @@ class ITK_EXPORT PolyLineParametricPathWithValue
   typedef itk::PolyLineParametricPath<VDimension>  Superclass;
   typedef itk::SmartPointer<Self>                  Pointer;
   typedef itk::SmartPointer<const Self>            ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PolyLineParametricPath, MySuperclass);
-  
+
   /** Template parameters typedefs */
  typedef TValue ValueType;
- 
+
  /** Derived typedefs */
  typedef typename Superclass::VertexType VertexType;
  typedef typename Superclass::VertexListType VertexListType;
  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
  typedef typename VertexListType::ConstIterator   VertexListConstIteratorType;
- 
+
  itkGetMacro(Key,std::string);
 
  void SetValue(ValueType value)
@@ -79,7 +79,7 @@ class ITK_EXPORT PolyLineParametricPathWithValue
    }
    return resp;
  }
- 
+
  /**
   * Return the path length (perimeter).
   * \return The length.
@@ -90,7 +90,7 @@ protected:
   /** Constructor */
   PolyLineParametricPathWithValue();
   /** Destructor */
-  virtual ~PolyLineParametricPathWithValue() 
+  virtual ~PolyLineParametricPathWithValue()
  { }
  /**PrintSelf method */
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
diff --git a/Code/Common/otbPolyLineParametricPathWithValue.txx b/Code/Common/otbPolyLineParametricPathWithValue.txx
index 8724e8d56a..d2c397e3fa 100644
--- a/Code/Common/otbPolyLineParametricPathWithValue.txx
+++ b/Code/Common/otbPolyLineParametricPathWithValue.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbPolyLineParametricPathWithValue.h"
 
-namespace otb 
+namespace otb
 {
   /**
    * Constructor
@@ -33,21 +33,21 @@ namespace otb
     m_Key = "Value";
     itk::EncapsulateMetaData<ValueType>(dict,m_Key,0);
   }
-  
+
   template < class TValue,unsigned int VDimension>
       double PolyLineParametricPathWithValue<TValue,VDimension>
   ::GetLength()
   {
     double length = 0.0;
     VertexListConstIteratorType it =  this->GetVertexList()->Begin();
-  
+
     if(this->GetVertexList()->Size()>1)
     {
 
 
       VertexType pt1 = it.Value();//just init, won't be used like that
       VertexType pt2 = it.Value();
-    
+
       it++;
       while(it != this->GetVertexList()->End())
       {
@@ -61,17 +61,17 @@ namespace otb
         length += vcl_sqrt(accum);
         it++;
       }
-    
+
     }
     else //if there is strictly less than 2 points, length is 0
     {
       length = 0.0;
     }
-  
+
     return length;
   }
 
-  
+
   /**
    * PrintSelf Method
    */
@@ -89,6 +89,6 @@ namespace otb
     }
     os << std::endl;
   }
-  
+
 } // end namespace otb
 #endif
diff --git a/Code/Common/otbPolygon.h b/Code/Common/otbPolygon.h
index c5f3fd4e3e..f6af07a656 100644
--- a/Code/Common/otbPolygon.h
+++ b/Code/Common/otbPolygon.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,13 +26,13 @@ namespace otb
 /** \class Polygon
  *  \brief This class represent a 2D polygon.
  *
- *  It derives from otb::PolyLineParametricPathWithValue. The polygon is 
- * considered to be the closed path represented by the 
+ *  It derives from otb::PolyLineParametricPathWithValue. The polygon is
+ * considered to be the closed path represented by the
  * PolyLineParametricPathWithValue.
- * 
- *  It implements some useful methods to work with polygons, such as surface 
- * computation, as well as method useful in the spatial reasoning context, such 
- * as IsInside, IsOnEdge, IsTouching, IsCrossing. 
+ *
+ *  It implements some useful methods to work with polygons, such as surface
+ * computation, as well as method useful in the spatial reasoning context, such
+ * as IsInside, IsOnEdge, IsTouching, IsCrossing.
  *
  * \sa otb::PolyLineParametricPathWithValue
  */
@@ -49,10 +49,10 @@ class ITK_EXPORT Polygon
   typedef TValue                                    ValueType;
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(Polygon, PolyLineParametricPathWithValue);
-  
+
   /** Derived typedefs */
   typedef typename Superclass::VertexType          VertexType;
   typedef typename Superclass::VertexListType      VertexListType;
@@ -72,14 +72,14 @@ class ITK_EXPORT Polygon
    * \return True if the point is inside the polygon.
    */
   bool IsInside(VertexType point);
-  
+
   /**
    * Check wether point is strictly on the edge of the polygon.
    * \param point The point to check.
    * \return True if the point is on the edge of the polygon.
    */
   bool IsOnEdge(VertexType point);
-  
+
   /**
    * Returns the number of crossings of the polygon with a given segment.
    * \param a First point of the segment,
@@ -105,7 +105,7 @@ class ITK_EXPORT Polygon
    * \return True if the two segments are strictly crossing.
    */
   bool IsCrossing(VertexType a1, VertexType a2, VertexType b1, VertexType b2);
-  
+
   /**
    * Check wether two segments[a1a2] and [b1b2] are touching without crossing.
    * \param a1 First point of the first segment,
@@ -127,27 +127,27 @@ class ITK_EXPORT Polygon
   * \return The surface.
   */
  double GetSurface();
- 
+
   /**
   * Return the polygon length (perimeter).
   * \return The length.
   */
  virtual double GetLength();
- 
+
 protected:
   /** Constructor */
-  Polygon() 
+  Polygon()
     {
       m_Epsilon = 0.000001;
     };
-    
+
   /** Destructor */
   virtual ~Polygon() {};
-  
+
  /**PrintSelf method */
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-  
+
 private:
   Polygon(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/Common/otbPolygon.txx b/Code/Common/otbPolygon.txx
index 0de62e4dc8..311493af15 100644
--- a/Code/Common/otbPolygon.txx
+++ b/Code/Common/otbPolygon.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
    */
 
 template<class TValue>
-bool 
+bool
 Polygon<TValue>
 ::IsInside(VertexType point)
 {
@@ -39,9 +39,9 @@ Polygon<TValue>
   VertexListConstIteratorType it = this->GetVertexList()->Begin();
   double xa = it.Value()[0];
   double ya = it.Value()[1];
-  ++it; 
+  ++it;
   while(it != this->GetVertexList()->End())
-    {      
+    {
       double xb = it.Value()[0];
       double yb = it.Value()[1];
       if(vcl_abs(xb-xa)<m_Epsilon)
@@ -50,7 +50,7 @@ Polygon<TValue>
 	    {
 	      ++crossingCount;
 	    }
-	  else if (ya<yb && xa>x && y>=ya && y<yb) 
+	  else if (ya<yb && xa>x && y>=ya && y<yb)
 	    {
 	      ++crossingCount;
 	    }
@@ -58,7 +58,7 @@ Polygon<TValue>
       else if(vcl_abs(yb-ya)>=m_Epsilon)
 	{
 	  double xcross = xa + (xb - xa)*(y - ya)/(yb-ya);
-	  
+
 	  if(ya>yb && xcross>x && y >= yb && y < ya)
 	    {
 	      ++crossingCount;
@@ -88,7 +88,7 @@ Polygon<TValue>
   else if(vcl_abs(yb-ya)>=m_Epsilon)
     {
       double xcross = xa + (xb - xa)*(y - ya)/(yb-ya);
-      
+
       if(ya>yb && xcross>x && y >= yb && y < ya)
 	{
 	  ++crossingCount;
@@ -108,7 +108,7 @@ Polygon<TValue>
  * \return True if the point is on the edge of the polygon.
  */
 template<class TValue>
-bool 
+bool
 Polygon<TValue>
 ::IsOnEdge(VertexType point)
 {
@@ -116,7 +116,7 @@ Polygon<TValue>
   bool resp = false;
   double x = point[0];
   double y = point[1];
-  double xb,yb; 
+  double xb,yb;
   VertexListConstIteratorType it = this->GetVertexList()->Begin();
   double xa = it.Value()[0];
   double ya = it.Value()[1];
@@ -165,19 +165,19 @@ Polygon<TValue>
       double oo = (ya - cd * xa);
       double xmin = std::min(xa,xb);
       double xmax = std::max(xa,xb);
-      
+
       if ((vcl_abs(y - cd * x - oo)<m_Epsilon)
 	  && ( x <= xmax)
 	  && ( x >= xmin))
 	{
 	  resp = true;
-	  //std::cout<<"Case 1: Point is on segment "<<xa<<", "<<ya<<" <-> "<<xb<<", "<<yb<<std::endl;	
+	  //std::cout<<"Case 1: Point is on segment "<<xa<<", "<<ya<<" <-> "<<xb<<", "<<yb<<std::endl;
 	}
     }
-  else 
+  else
     {
       double ymin = std::min(ya,yb);
-      double ymax = std::max(ya,yb);	
+      double ymax = std::max(ya,yb);
       if((vcl_abs(x-xa)<=m_Epsilon)
 	 &&(y<=ymax)
 	 &&(y>=ymin))
@@ -195,8 +195,8 @@ Polygon<TValue>
  * \param b Second point of the segment,
  * \return the number of strict crossings of segment [ab] with the polygon.
  */
-template<class TValue> 
-unsigned int 
+template<class TValue>
+unsigned int
 Polygon<TValue>
 ::NbCrossing(VertexType a, VertexType b)
 {
@@ -230,7 +230,7 @@ Polygon<TValue>
  * \return the number of touchings without crossing of segment [ab] with the polygon.
  */
 template<class TValue>
-unsigned int 
+unsigned int
 Polygon<TValue>
 ::NbTouching(VertexType a, VertexType b)
 {
@@ -266,7 +266,7 @@ Polygon<TValue>
  * \return True if the two segments are strictly crossing.
  */
 template<class TValue>
-bool 
+bool
 Polygon<TValue>
 ::IsCrossing(VertexType a1, VertexType a2, VertexType b1, VertexType b2)
 {
@@ -278,7 +278,7 @@ Polygon<TValue>
   double xamin = std::min(a1[0],a2[0]);
   double xamax = std::max(a1[0],a2[0]);
   double yamin = std::min(a1[1],a2[1]);
-  double yamax = std::max(a1[1],a2[1]);    
+  double yamax = std::max(a1[1],a2[1]);
   if(vcl_abs(a1[0]-a2[0])<m_Epsilon && vcl_abs(b1[0]-b2[0])<m_Epsilon)
     {
       resp = false;
@@ -286,7 +286,7 @@ Polygon<TValue>
   else if(vcl_abs(a1[0]-a2[0])<m_Epsilon)
     {
       double cd2 = (b2[1] - b1[1]) / (b2[0] - b1[0]);
-      double oo2 = b1[1] - cd2 * b1[0];      
+      double oo2 = b1[1] - cd2 * b1[0];
       double ycross = cd2 * a1[0] + oo2;
       resp = ( xbmin < a1[0] && xbmax > a1[0]
 	       && yamin < ycross && yamax > ycross);
@@ -307,7 +307,7 @@ Polygon<TValue>
       double oo2 = b1[1] - cd2 * b1[0];
       if(cd1 != cd2)
 	{
-	  double xcross = (oo2 - oo1) / (cd1 - cd2);	  
+	  double xcross = (oo2 - oo1) / (cd1 - cd2);
 	  resp = (xamin < xcross  && xbmin < xcross
 		  &&   xamax > xcross  && xbmax > xcross);
 	}
@@ -322,8 +322,8 @@ Polygon<TValue>
  * \param a1 Second point of the second segment.
  * \return True if the two segments are touching without crossing.
  */
-template<class TValue> 
-bool 
+template<class TValue>
+bool
 Polygon<TValue>
 ::IsTouching(VertexType a1, VertexType a2, VertexType b1, VertexType  b2)
 {
@@ -333,7 +333,7 @@ Polygon<TValue>
   double ybmin = std::min(b1[1],b2[1]);
   double ybmax = std::max(b1[1],b2[1]);
   double xamin = std::min(a1[0],a2[0]);
-  double xamax = std::max(a1[0],a2[0]); 
+  double xamax = std::max(a1[0],a2[0]);
   double yamin = std::min(a1[1],a2[1]);
   double yamax = std::max(a1[1],a2[1]);
   if(vcl_abs(a1[0]-a2[0])<m_Epsilon && vcl_abs(b1[0]-b2[0])<m_Epsilon)
@@ -348,7 +348,7 @@ Polygon<TValue>
     {
       double cd2 = (b2[1] - b1[1]) / (b2[0] - b1[0]);
       double oo2 = b1[1] - cd2 * b1[0];
-      
+
       if(vcl_abs(a1[1]-cd2*a1[0]-oo2)<m_Epsilon)
 	{
 	  resp = ( a1[0]>=xbmin && a1[0]<=xbmax);
@@ -356,13 +356,13 @@ Polygon<TValue>
       else if(vcl_abs(a2[1]-cd2*a2[0]-oo2)<m_Epsilon)
 	{
 	  resp = ( a2[0]>=xbmin && a2[0]<=xbmax);
-	} 
+	}
     }
   else if(vcl_abs(b1[0]-b2[0])<m_Epsilon)
     {
       double cd1 = (a2[1] - a1[1]) / (a2[0] - a1[0]);
       double oo1 = a1[1] - cd1 * a1[0];
-      
+
       if(vcl_abs(b1[1]-cd1*b1[0]-oo1)<m_Epsilon)
 	{
 	  resp = ( b1[0]>=xamin && b1[0]<=xamax);
@@ -370,7 +370,7 @@ Polygon<TValue>
 	else if(vcl_abs(b2[1]-cd1*b2[0]-oo1)<m_Epsilon)
 	  {
 	    resp = ( b2[0]>=xamin && b2[0]<=xamax);
-	  } 
+	  }
     }
   else
     {
@@ -394,7 +394,7 @@ Polygon<TValue>
 	  else if(vcl_abs(a2[1]-cd2*a2[0]-oo2)<m_Epsilon)
 	    {
 		resp = ( a2[0]>=xbmin && a2[0]<=xbmax);
-	    } 
+	    }
 	  if(vcl_abs(b1[1]-cd1*b1[0]-oo1)<m_Epsilon)
 	    {
 		resp = ( b1[0]>=xamin && b1[0]<=xamax);
@@ -402,7 +402,7 @@ Polygon<TValue>
 	  else if(vcl_abs(b2[1]-cd1*b2[0]-oo1)<m_Epsilon)
 	    {
 	      resp = ( b2[0]>=xamin && b2[0]<=xamax);
-	    } 
+	    }
 	}
     }
   return resp;
@@ -433,16 +433,16 @@ Polygon<TValue>
   if(this->GetVertexList()->Size()>0)
     {
       x = static_cast<long int>(it.Value()[0]);
-      y = static_cast<long int>(it.Value()[1]); 
+      y = static_cast<long int>(it.Value()[1]);
       index[0] = x;
       index[1] = y;
-  
+
       ++it;
       while(it != this->GetVertexList()->End())
-	{      
+	{
 	  x = static_cast<long int>(it.Value()[0]);
-	  y = static_cast<long int>(it.Value()[1]); 
-	  
+	  y = static_cast<long int>(it.Value()[1]);
+
 	  // Index search
 	  if ( x < index[0] )
 	    {
@@ -461,10 +461,10 @@ Polygon<TValue>
 	    {
 	      maxId[1] = y;
 	    }
-	  
+
 	  ++it;
 	}
-      
+
       size[0] = maxId[0] - index[0];
       size[1] = maxId[1] - index[1];
     }
@@ -484,19 +484,19 @@ template<class TValue>
 {
   m_Surface = 0.0;
   VertexListConstIteratorType it =  this->GetVertexList()->Begin();
-  
+
   if(this->GetVertexList()->Size()>2)
   {
     VertexType origin = it.Value();
     it++;
     VertexType pt1 = it.Value();
     VertexType pt2 = it.Value();
-    
+
     while(it != this->GetVertexList()->End())
     {
       pt1=pt2;
       pt2 = it.Value();
-          
+
       double vector1x = pt1[0] - origin[0];
       double vector1y = pt1[1] - origin[1];
       double vector2x = pt2[0] - origin[0];
@@ -505,7 +505,7 @@ template<class TValue>
       m_Surface += crossProdduct;
       it++;
     }
-    
+
     m_Surface = fabs(m_Surface/2.0);
 
   }
@@ -513,7 +513,7 @@ template<class TValue>
   {
     m_Surface = 0.0;
   }
-  
+
   return m_Surface;
 }
 
@@ -526,7 +526,7 @@ template<class TValue>
 {
   double length = 0.0;
   VertexListConstIteratorType it =  this->GetVertexList()->Begin();
-  
+
   VertexType origin = it.Value();
   if(this->GetVertexList()->Size()>1)
   {
@@ -534,7 +534,7 @@ template<class TValue>
 
     VertexType pt1 = it.Value();//just init, won't be used like that
     VertexType pt2 = it.Value();
-    
+
     it++;
     while(it != this->GetVertexList()->End())
     {
@@ -548,7 +548,7 @@ template<class TValue>
       length += vcl_sqrt(accum);
       it++;
     }
-    
+
     //Adding the last segment (between first and last point)
     double accum=0.0;
     for (int i=0; i<2; i++)
@@ -556,13 +556,13 @@ template<class TValue>
       accum += (origin[i]-pt2[i])*(origin[i]-pt2[i]);
     }
     length += vcl_sqrt(accum);
-    
+
   }
   else //if there is strictly less than 2 points, length is 0
   {
     length = 0.0;
   }
-  
+
   return length;
 }
 
diff --git a/Code/Common/otbShiftScaleImageAdaptor.h b/Code/Common/otbShiftScaleImageAdaptor.h
index 92c5d3771b..1e670cde43 100644
--- a/Code/Common/otbShiftScaleImageAdaptor.h
+++ b/Code/Common/otbShiftScaleImageAdaptor.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@
 
 namespace otb
 {
- 
+
 namespace Accessor {
 /** \class ShiftScalePixelAccessor
  * \brief Give access to the vcl_sqrt() function of a value
@@ -37,13 +37,13 @@ namespace Accessor {
  *
  * ShiftScalePixelAccessor is templated over an internal type and an
  * external type representation. This class cast the input
- * applies the funtion to it and cast the result according 
+ * applies the funtion to it and cast the result according
  * to the types defined as template parameters
  *
  * \ingroup ImageAdaptors
  */
 template <class TInternalType, class TExternalType >
-class ITK_EXPORT ShiftScalePixelAccessor  
+class ITK_EXPORT ShiftScalePixelAccessor
 {
 public:
   /** External typedef. It defines the external aspect
@@ -53,34 +53,34 @@ public:
   /** Internal typedef. It defines the internal real
    * representation of data. */
   typedef TInternalType InternalType;
-  
-  InternalType GetShift() 
+
+  InternalType GetShift()
     { return m_Shift; }
-  void SetShift(InternalType value) 
-    { m_Shift = value; } 
-  
-  InternalType GetScale() 
+  void SetShift(InternalType value)
+    { m_Shift = value; }
+
+  InternalType GetScale()
     { return m_Scale; }
-  void SetScale(InternalType value) 
-    { m_Scale = value; } 
+  void SetScale(InternalType value)
+    { m_Scale = value; }
 
 
-  inline void Set(TInternalType & output, const TExternalType & input) 
+  inline void Set(TInternalType & output, const TExternalType & input)
 //     {output = (TInternalType)((double) (input));}
     {output = (TInternalType)((double) m_Scale*(input+m_Shift));}
 
   inline const TExternalType Get(const TInternalType & input) const
 //     {return (TExternalType)((double) (input));}
     {return (TExternalType)((double) m_Scale*(input+m_Shift));}
-  
+
   private:
     InternalType m_Shift;
     InternalType m_Scale;
-    
+
 };
 
 } // end namespace Accessor
- 
+
 /** \class ShiftScaleImageAdaptor
  * \brief Presents an image as being composed of the vcl_sqrt() of its pixels
  *
@@ -109,20 +109,20 @@ public:
                                        typename TImage::PixelType,
                                        TOutputPixelType > AccessorType;
   typedef typename AccessorType::ExternalType PixelType;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro( ShiftScaleImageAdaptor, ImageAdaptor );
-  
-  typename TImage::PixelType GetShift () 
+
+  typename TImage::PixelType GetShift ()
   {
-    itkDebugMacro("returning " << " m_Shift of " << this->GetPixelAccessor().GetShift() ); 
-    return this->GetPixelAccessor().GetShift(); 
+    itkDebugMacro("returning " << " m_Shift of " << this->GetPixelAccessor().GetShift() );
+    return this->GetPixelAccessor().GetShift();
   }
-  
-  virtual void SetShift (typename TImage::PixelType value) 
+
+  virtual void SetShift (typename TImage::PixelType value)
   {
     itkDebugMacro("setting m_Shift to " << value);
     if (this->GetPixelAccessor().GetShift() != value)
@@ -130,16 +130,16 @@ public:
       this->GetPixelAccessor().SetShift(value);
       this->Modified();
       }
-  } 
-  
-  typename TImage::PixelType GetScale () 
+  }
+
+  typename TImage::PixelType GetScale ()
   {
-    itkDebugMacro("returning " << " m_Scale of " << this->GetPixelAccessor().GetScale() ); 
-    return this->GetPixelAccessor().GetScale(); 
+    itkDebugMacro("returning " << " m_Scale of " << this->GetPixelAccessor().GetScale() );
+    return this->GetPixelAccessor().GetScale();
   }
-  
-  
-  virtual void SetScale (typename TImage::PixelType value) 
+
+
+  virtual void SetScale (typename TImage::PixelType value)
   {
     itkDebugMacro("setting m_Scale to " << value);
     if (this->GetPixelAccessor().GetScale() != value)
@@ -147,12 +147,12 @@ public:
       this->GetPixelAccessor().SetScale(value);
       this->Modified();
       }
-  } 
-  
+  }
+
 protected:
   ShiftScaleImageAdaptor() {}
   virtual ~ShiftScaleImageAdaptor() {}
-  
+
 private:
   ShiftScaleImageAdaptor(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/Common/otbSpatialObjectSource.h b/Code/Common/otbSpatialObjectSource.h
index 7506088e8f..10e87191cc 100644
--- a/Code/Common/otbSpatialObjectSource.h
+++ b/Code/Common/otbSpatialObjectSource.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -52,12 +52,12 @@ class ITK_EXPORT SpatialObjectSource
   /** Data object pointer */
   typedef itk::DataObject::Pointer DataObjectPointer;
 
-  /** 
+  /**
    * Get the output spatial object.
    * \return The output spatial object.
    */
   virtual SpatialObjectType * GetOutput(void);
-  
+
 
  protected:
   /** Constructor */
@@ -69,7 +69,7 @@ class ITK_EXPORT SpatialObjectSource
 
 private:
   SpatialObjectSource(const Self&);//purposely not implemented
-  void operator=(const Self&); //purposely not implemented 
+  void operator=(const Self&); //purposely not implemented
 
 };
 } // end namespace otb
diff --git a/Code/Common/otbSpatialObjectSource.txx b/Code/Common/otbSpatialObjectSource.txx
index 2d7da5e7c6..729c6f4da9 100644
--- a/Code/Common/otbSpatialObjectSource.txx
+++ b/Code/Common/otbSpatialObjectSource.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 template <class TSpatialObject>
diff --git a/Code/Common/otbStandardFilterWatcher.cxx b/Code/Common/otbStandardFilterWatcher.cxx
index 5b6d843c2d..fb28bb00f4 100644
--- a/Code/Common/otbStandardFilterWatcher.cxx
+++ b/Code/Common/otbStandardFilterWatcher.cxx
@@ -33,7 +33,7 @@ StandardFilterWatcher
 
 StandardFilterWatcher
 ::StandardFilterWatcher( const StandardFilterWatcher& watch)
-{ 
+{
   // Initialize state
   m_StarsCount = watch.m_StarsCount;
 }
diff --git a/Code/Common/otbStandardFilterWatcher.h b/Code/Common/otbStandardFilterWatcher.h
index acde9c6750..7a6f1276ef 100644
--- a/Code/Common/otbStandardFilterWatcher.h
+++ b/Code/Common/otbStandardFilterWatcher.h
@@ -30,7 +30,7 @@ namespace otb
    *  \brief This class shows the percentage progress execution
    *         of the pipeline filtering process
    *
-   *  This class is based on oberservers desgin patter 
+   *  This class is based on oberservers desgin patter
    *  Abstract class ProcessObject is the subject
    *  Event are oberservers
    *
@@ -49,39 +49,39 @@ namespace otb
   class ITK_EXPORT StandardFilterWatcher : public otb::FilterWatcherBase
     {
     public:
-      
+
       /** Constructor. Takes a ProcessObject to monitor and an optional
        * comment string that is prepended to each event message. */
       StandardFilterWatcher(itk::ProcessObject* process,
 			    const char *comment="");
-      
+
       /** Copy constructor */
       StandardFilterWatcher(const StandardFilterWatcher&);
-      
+
       /** operator=  */
       void operator=(const StandardFilterWatcher& );
-            
+
       /** Get/Set number of stars */
       void SetStars( int count ) { m_StarsCount = count;}
       const int& GetStars() const { return m_StarsCount;}
-      
+
     protected:
-      
+
       /** Callback method to show the ProgressEvent */
       virtual void ShowProgress();
-      
+
       /** Callback method to show the StartEvent */
       virtual void StartFilter();
-      
+
       /** Callback method to show the EndEvent */
       virtual void EndFilter();
-      
+
     private:
-      
+
       /** Stars coutning */
       int m_StarsCount;
     };
-  
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Common/otbStandardWriterWatcher.cxx b/Code/Common/otbStandardWriterWatcher.cxx
index 7e3b6e870a..c3202a1a31 100644
--- a/Code/Common/otbStandardWriterWatcher.cxx
+++ b/Code/Common/otbStandardWriterWatcher.cxx
@@ -41,7 +41,7 @@ StandardWriterWatcher
 
 StandardWriterWatcher
 ::StandardWriterWatcher( const StandardWriterWatcher& watch)
-{ 
+{
   // Initialize state
   m_StarsCount = watch.m_StarsCount;
 }
diff --git a/Code/Common/otbStandardWriterWatcher.h b/Code/Common/otbStandardWriterWatcher.h
index 9aa16d7c4c..9f91b77245 100644
--- a/Code/Common/otbStandardWriterWatcher.h
+++ b/Code/Common/otbStandardWriterWatcher.h
@@ -30,7 +30,7 @@ namespace otb
    *  \brief This class shows the percentage progress execution
    *         of the pipeline filtering process
    *
-   *  This class is based on oberservers desgin patter 
+   *  This class is based on oberservers desgin patter
    *  Abstract class ProcessObject is the subject
    *  Event are oberservers
    *
@@ -49,53 +49,53 @@ namespace otb
   class ITK_EXPORT StandardWriterWatcher : public otb::WriterWatcherBase
     {
     public:
-      
+
       /** Constructor. Takes a ProcessObject to monitor and an optional
        * comment string that is prepended to each event message. */
       StandardWriterWatcher(itk::ProcessObject* process,
 			    const char *comment="");
       StandardWriterWatcher(itk::ProcessObject* process,itk::ProcessObject * source,
 			    const char *comment="");
-      
+
       /** Copy constructor */
       StandardWriterWatcher(const StandardWriterWatcher&);
-      
+
       /** operator=  */
       void operator=(const StandardWriterWatcher& );
-            
+
       /** Get/Set number of stars */
       void SetStars( int count ) { m_StarsCount = count;}
       const int& GetStars() const { return m_StarsCount;}
-      
+
     protected:
-      
+
       /** Callback method to show the ProgressEvent */
       virtual void ShowWriterProgress();
-      
+
       /** Callback method to show the StartEvent */
       virtual void StartWriter();
-      
+
       /** Callback method to show the EndEvent */
       virtual void EndWriter();
 
       /** Callback method to show the ProgressEvent */
       virtual void ShowFilterProgress();
-      
+
       /** Callback method to show the StartEvent */
       virtual void StartFilter(){};
-      
+
       /** Callback method to show the EndEvent */
       virtual void EndFilter(){};
 
       /** This is the method invoked by ShowFilterProgress() and ShowWriterProgress() */
       virtual void ShowProgress();
-  
+
     private:
-      
+
       /** Stars coutning */
       int m_StarsCount;
     };
-  
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Common/otbStreamingTraits.h b/Code/Common/otbStreamingTraits.h
index 0f56c17f0b..78cbcb0fbc 100644
--- a/Code/Common/otbStreamingTraits.h
+++ b/Code/Common/otbStreamingTraits.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -42,7 +42,7 @@ namespace otb
  * this enum defines the different streaming mode available in OTB.
    */
   typedef enum
-    { 
+    {
         SET_NUMBER_OF_STREAM_DIVISIONS = 1,
         SET_BUFFER_MEMORY_SIZE = 2,
         SET_BUFFER_NUMBER_OF_LINES = 3,
@@ -50,12 +50,12 @@ namespace otb
         SET_TILING_WITH_SET_NUMBER_OF_STREAM_DIVISIONS = 5,
         SET_TILING_WITH_SET_AUTOMATIC_NUMBER_OF_STREAM_DIVISIONS = 6
     } StreamingMode;
-  
+
 /** \class StreamingTraits
  *  \brief This class is a helper class for terminal streaming filter implementation.
  * \sa StreamingImageFileWriter
  * \sa StreamingStatisticsImageFilter
- */  
+ */
 template <class TImage>
 class ITK_EXPORT StreamingTraits
 {
@@ -67,7 +67,7 @@ public:
   typedef typename ImageType::Pointer ImagePointerType;
   typedef typename ImageType::RegionType RegionType;
   typedef typename ImageType::InternalPixelType PixelType;
-  
+
   typedef StreamingMode StreamingModeType;
 
   /** Dimension of input image. */
@@ -82,26 +82,26 @@ public:
   typedef itk::NearestNeighborInterpolateImageFunction<TImage,double>       NearestNeighborInterpolationType;
   // OTB Interpolators
   // Gaussian Interpolators
-  typedef WindowedSincInterpolateImageGaussianFunction<ImageType>          GaussianInterpolationType; 
+  typedef WindowedSincInterpolateImageGaussianFunction<ImageType>          GaussianInterpolationType;
   // Cosine Interpolators
   typedef WindowedSincInterpolateImageCosineFunction<ImageType>            CosineInterpolationType;
-  // Hamming Interpolators 
-  typedef WindowedSincInterpolateImageHammingFunction<ImageType>           HammingInterpolationType; 
+  // Hamming Interpolators
+  typedef WindowedSincInterpolateImageHammingFunction<ImageType>           HammingInterpolationType;
   // Welch
   typedef WindowedSincInterpolateImageWelchFunction<ImageType>             WelchInterpolationType;
   // Lanczos
-  typedef WindowedSincInterpolateImageLanczosFunction<ImageType>           LanczosInterpolationType; 
+  typedef WindowedSincInterpolateImageLanczosFunction<ImageType>           LanczosInterpolationType;
   // Blackman
   typedef WindowedSincInterpolateImageBlackmanFunction<ImageType>          BlackmanInterpolationType;
   // Prolate
   typedef otb::ProlateInterpolateImageFunction<ImageType>                  ProlateInterpolationType;
-  
+
 
   /**
    * This method computes the number of streaming divisions, based on
    * the streaming mode and the image attributes. The last three parameters are ignored if
    * the mode does not need them.
-   * \param image The image to stream, 
+   * \param image The image to stream,
    * \param region the region to stream,
    * \param splitter the splitter used for the division,
    * \param mode  the streaming mode,
@@ -113,16 +113,16 @@ public:
   static unsigned long CalculateNumberOfStreamDivisions(const TImage * image,
                                                         RegionType region,
                                                         SplitterType * splitter,
-                                                        StreamingModeType mode, 
+                                                        StreamingModeType mode,
                                                         unsigned long numberOfStreamDivision,
                                                         unsigned long bufferMemorySize,
                                                         unsigned long bufferNumberOfLinesDivisions);
-         
-         
+
+
   static unsigned int CalculateNeededRadiusForInterpolator(const InterpolationType* interpolator);
-  
+
   static std::string GetMethodUseToCalculateNumberOfStreamDivisions(StreamingModeType mode);
-         
+
 };
 }// End namespace otb
 
diff --git a/Code/Common/otbStreamingTraits.txx b/Code/Common/otbStreamingTraits.txx
index 8a7ed6eac3..f909e1871c 100644
--- a/Code/Common/otbStreamingTraits.txx
+++ b/Code/Common/otbStreamingTraits.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -35,13 +35,13 @@ template <class TImage>
 unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TImage * image,
                                                         RegionType region,
                                                         SplitterType * splitter,
-                                                        StreamingModeType mode, 
+                                                        StreamingModeType mode,
                                                         unsigned long numberOfStreamDivision,
                                                         unsigned long bufferMemorySize,
                                                         unsigned long bufferNumberOfLinesDivisions)
-{      
+{
         unsigned long numDivisions(0);
-      
+
         switch(mode)
         {
                 case SET_TILING_WITH_SET_NUMBER_OF_STREAM_DIVISIONS : // Just like SET_AUTOMATIC_NUMBER_OF_STREAM_DIVISIONS
@@ -66,10 +66,10 @@ unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TI
                         otbMsgDevMacro(<<"BufferMemorySize                         = "<<bufferMemorySize);
                         otbMsgDevMacro(<<"bufferMemorySizeOctet                    = "<<bufferMemorySizeOctet);
 
-                        //Active streaming 
+                        //Active streaming
                         if( regionSize > bufferMemorySizeOctet )
                         {
-                                //The regionSize must be at list equal to the sizeLine 
+                                //The regionSize must be at list equal to the sizeLine
                                 if( regionSize < sizeLine )
                                 {
                                         otbMsgDevMacro(<<"Force buffer size.");
@@ -83,7 +83,7 @@ unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TI
                                 //Non streaming
                                 numDivisions = 1;
                         }
-                
+
                 }
                 break;
                 case SET_BUFFER_NUMBER_OF_LINES :
@@ -113,7 +113,7 @@ unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TI
                         //Convert in octet unit
                         unsigned long streamMaxSizeBufferForStreaming = streamMaxSizeBufferForStreamingBytes/8;
                         const unsigned long streamImageSizeToActivateStreaming = streamImageSizeToActivateStreamingBytes/8;
-                  
+
                                         unsigned long numberColumnsOfRegion = region.GetSize()[0]; // X dimension
                         const unsigned long sizeLine = numberColumnsOfRegion * \
                                                                                               image->GetNumberOfComponentsPerPixel() * \
@@ -129,7 +129,7 @@ unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TI
                         otbMsgDevMacro(<<"sizeLine                                     = "<<sizeLine);
                         otbMsgDevMacro(<<"regionSize                                   = "<<regionSize);
 
-                        //Active streaming 
+                        //Active streaming
                         if( regionSize > streamImageSizeToActivateStreaming )
                         {
                                 //On s'assure que la taille du bandeau fait au moins une ligne de l'image si pas TILING
@@ -147,7 +147,7 @@ unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TI
                                 //Non streaming
                                 numDivisions = 1;
                         }
-                
+
                 }
                 break;
                 default :
@@ -156,28 +156,28 @@ unsigned long StreamingTraits<TImage>::CalculateNumberOfStreamDivisions(const TI
         }
         if( numDivisions == 0) numDivisions = 1;
         otbMsgDevMacro(<<" -> Resume : method : "<<mode<<"\n -> Number of divisions = "<<numDivisions);
-        
+
         // Compute real number of splitter
         unsigned int numDivisionsFromSplitter = splitter->GetNumberOfSplits(region, numDivisions);
-  
+
         /** In tiling streaming mode, we keep the number of divisions calculed by splitter */
         if ((numDivisionsFromSplitter < numDivisions)||(mode==SET_TILING_WITH_SET_NUMBER_OF_STREAM_DIVISIONS)||(mode==SET_TILING_WITH_SET_AUTOMATIC_NUMBER_OF_STREAM_DIVISIONS))
         {
                 numDivisions = numDivisionsFromSplitter;
         }
-        
+
         return(numDivisions);
 }
-         
-         
+
+
 template <class TImage>
 unsigned int StreamingTraits<TImage>::CalculateNeededRadiusForInterpolator(const InterpolationType* interpolator)
 {
         unsigned int neededRadius = 0;
         std::string className;
-        
+
         className = interpolator->GetNameOfClass();
-        
+
         if (className == "LinearInterpolateImageFunction")
 	  {
 	    otbMsgDevMacro(<<"Linear Interpolator");
@@ -234,12 +234,12 @@ unsigned int StreamingTraits<TImage>::CalculateNeededRadiusForInterpolator(const
                 itkGenericExceptionMacro(<< "Windowed Sinc Interpolator not supported yet in resample");
                 otbMsgDevMacro(<<"Windowed Sinc Interpolator not supported yet in resample");
 //                dynamic_cast<typename itk::WindowedSincInterpolateImageFunction*>(interpolator);
-        }                        
+        }
         else
         {
                 itkGenericExceptionMacro(<< "Interpolator not recognized, please choose another type !");
-        }        */                        
-        
+        }        */
+
         return neededRadius;
 }
 
@@ -272,9 +272,9 @@ std::string StreamingTraits<TImage>::GetMethodUseToCalculateNumberOfStreamDivisi
       break;
     }
 
-} 
+}
+
 
-         
 }// End namespace otb
 
 #endif
diff --git a/Code/Common/otbSystem.cxx b/Code/Common/otbSystem.cxx
index e86150cf75..44f97b718d 100644
--- a/Code/Common/otbSystem.cxx
+++ b/Code/Common/otbSystem.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -142,7 +142,7 @@ bool System::IsADirName(const std::string&  pszPath)
     bool isADir(false);
     std::string  pszFileSpec;
     std::string path(pszPath);
-    
+
     if (pszPath.empty() == true)
         path = ".";
 
@@ -168,7 +168,7 @@ std::vector<std::string> System::Readdir(const std::string&  pszPath)
     std::vector<std::string>  listFileFind;
     std::string  pszFileSpec;
     std::string path(pszPath);
-    
+
     if (pszPath.empty() == true)
         path = ".";
 
@@ -198,7 +198,7 @@ bool System::IsADirName(const std::string&  pszPath)
     bool isADir(false);
     DIR           *hDir;
     std::string path(pszPath);
-    
+
     if (pszPath.empty() == true)
         path = ".";
 
@@ -237,7 +237,7 @@ std::vector<std::string> System::Readdir(const std::string& pszPath)
     std::vector<std::string>  listFileFind;
     struct dirent *psDirEntry;
     std::string path(pszPath);
-    
+
     if (pszPath.empty() == true)
         path = ".";
 
diff --git a/Code/Common/otbSystem.h b/Code/Common/otbSystem.h
index 57930fafce..319dac4cb8 100644
--- a/Code/Common/otbSystem.h
+++ b/Code/Common/otbSystem.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,8 +27,8 @@
 
 #ifdef _WIN
       #define OTB_FILE_SEPARATOR '\\'
-#else 
-     #define OTB_FILE_SEPARATOR '/'     
+#else
+     #define OTB_FILE_SEPARATOR '/'
 #endif
 
 namespace otb
@@ -41,7 +41,7 @@ namespace otb
  * System operations, filename or strings manipulations, etc.
  *
  */
-class ITK_EXPORT System 
+class ITK_EXPORT System
 {
 public:
 
diff --git a/Code/Common/otbTestMain.h b/Code/Common/otbTestMain.h
index 5b183e7aea..79cb9a8c8b 100644
--- a/Code/Common/otbTestMain.h
+++ b/Code/Common/otbTestMain.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -168,7 +168,7 @@ int main(int ac, char* av[] )
     else if (strcmp(av[1], "--compare-ascii") == 0)
     {
       lFlagRegression = true;
-      lEpsilon = (double)(::atof(av[2]));	
+      lEpsilon = (double)(::atof(av[2]));
       baseLineFilenamesAscii.reserve(1);
       testFilenamesAscii.reserve(1);
       baseLineFilenamesAscii.push_back(av[3]);
@@ -179,7 +179,7 @@ int main(int ac, char* av[] )
     else if (strcmp(av[1], "--compare-n-ascii") == 0)
     {
       lFlagRegression = true;
-      lEpsilon = (double)(::atof(av[2]));	
+      lEpsilon = (double)(::atof(av[2]));
         // Number of comparisons to do
       unsigned int nbComparisons=(unsigned int)(::atoi(av[3]));
       baseLineFilenamesAscii.reserve(nbComparisons);
@@ -251,7 +251,7 @@ int main(int ac, char* av[] )
       result = 0;
       std::cout << " -> Test EXIT SUCCESS."<<std::endl;
       if( lFlagRegression == false )
-      {      
+      {
         std::cout << "-------------  No control baseline tests    -------------"<<std::endl;
       }
       else
@@ -279,7 +279,7 @@ int main(int ac, char* av[] )
               std::map<std::string,int> baselines = RegressionTestBaselines(const_cast<char*>(baselineFilenameImage.c_str()));
               std::map<std::string,int>::reverse_iterator baseline = baselines.rbegin();
               multiResult = 1;
-              std::cout<<"Number of baseline images: "<<baselines.size()<<std::endl; 
+              std::cout<<"Number of baseline images: "<<baselines.size()<<std::endl;
               while(baseline!=baselines.rend() && (multiResult!=0))
               {
                 std::cout<<"Testing non-regression on image: "<<(baseline->first).c_str()<<std::endl;
@@ -287,14 +287,14 @@ int main(int ac, char* av[] )
                     (baseline->first).c_str(),
                      0,
                      lToleranceDiffPixelImage);
-					    
+
                 multiResult = baseline->second;
                 ++baseline;
               }
               if (multiResult != 0)
               {
                 baseline = baselines.rbegin();
-                baseline->second 
+                baseline->second
                     = RegressionTestImage(cpt,testFilenameImage.c_str(),
                                           (baseline->first).c_str(),
                                            1,
@@ -303,7 +303,7 @@ int main(int ac, char* av[] )
               cpt++;
               result += multiResult;
             }
-				
+
           }
 
                         // Non-regression testing on metadata.
@@ -323,7 +323,7 @@ int main(int ac, char* av[] )
               std::map<std::string,int> baselines = RegressionTestBaselines(const_cast<char*>(baselineFilenameImage.c_str()));
               std::map<std::string,int>::reverse_iterator baseline = baselines.rbegin();
               multiResult = 1;
-              std::cout<<"Number of baseline images: "<<baselines.size()<<std::endl; 
+              std::cout<<"Number of baseline images: "<<baselines.size()<<std::endl;
               while(baseline!=baselines.rend() && (multiResult!=0))
               {
                 std::cout<<"Testing non-regression on image: "<<(baseline->first).c_str()<<std::endl;
@@ -331,14 +331,14 @@ int main(int ac, char* av[] )
                     (baseline->first).c_str(),
                      0,
                      lToleranceDiffPixelImage);
-					    
+
                 multiResult = baseline->second;
                 ++baseline;
               }
               if (multiResult != 0)
               {
                 baseline = baselines.rbegin();
-                baseline->second 
+                baseline->second
                     = RegressionTestMetaData(testFilenameImage.c_str(),
                                              (baseline->first).c_str(),
                                               1,
@@ -365,7 +365,7 @@ int main(int ac, char* av[] )
               std::map<std::string,int> baselines = RegressionTestBaselines(const_cast<char*>(baselineFilenameAscii.c_str()));
               std::map<std::string,int>::reverse_iterator baseline = baselines.rbegin();
               multiResult = 1;
-              std::cout<<"Number of baseline files: "<<baselines.size()<<std::endl; 
+              std::cout<<"Number of baseline files: "<<baselines.size()<<std::endl;
               while(baseline!=baselines.rend() && (multiResult!=0))
               {
                 std::cout<<"Testing non-regression on file: "<<(baseline->first).c_str()<<std::endl;
@@ -373,14 +373,14 @@ int main(int ac, char* av[] )
                     (baseline->first).c_str(),
                      0,
                      lEpsilon);
-					    
+
                 multiResult = baseline->second;
                 ++baseline;
               }
               if (multiResult != 0)
               {
                 baseline = baselines.rbegin();
-                baseline->second 
+                baseline->second
                     = RegressionTestAsciiFile(testFilenameAscii.c_str(),
                                               (baseline->first).c_str(),
                                                1,
@@ -392,7 +392,7 @@ int main(int ac, char* av[] )
                         // Test de non regression sur des fichiers binaires
           if (baselineFilenameBinary && testFilenameBinary)
           {
-        
+
             std::map<std::string,int> baselines;
             baselines[std::string(baselineFilenameBinary)] = 0;
             std::map<std::string,int>::iterator baseline = baselines.begin();
@@ -477,7 +477,7 @@ bool isNumeric(std::string str)
   while ((i<str.size())&&(result==true))
   {
     number = str[i];
-		
+
     if (isPoint(number))
       nbOfPoints++ ;
     if (isNumber(number))
@@ -485,7 +485,7 @@ bool isNumeric(std::string str)
     if ((!isNumber(number)&&!isPoint(number)&&!isMinusSign(number))
           ||(isMinusSign(number)&&(i!=0)))
       result = false ;
-			
+
     i++;
   }
   if ((str.size()==0)||(nbOfPoints > 1)/*||(nbOfNumbers==0)*/)
@@ -502,12 +502,12 @@ bool isScientificNumeric(std::string str)
   bool pointDetected(false);
   bool eDetected(false);
   bool signDetected(false);
-  
+
   // Analyse first character (+, -, 0...9)
   unsigned int cpt(0);
   if( (str[0] != '+') && (str[0] != '-') && (!isNumber(number)) ) return false;
   if( (str[0] == '+') || (str[0] == '-') ) { cpt++; signDetected = true; }
-  
+
   while( cpt < str.size() )
   {
     if ( str[cpt] == '.' )
@@ -518,23 +518,23 @@ bool isScientificNumeric(std::string str)
     }
     else if ( ( str[cpt] == 'e' )||( str[cpt] == 'E' ) )
     {
-                // Exit false if two e 
+                // Exit false if two e
       if( eDetected == true ) return false;
       eDetected = true;
     }
     else if ( ( str[cpt] == '-' )||( str[cpt] == '+' ) )
     {
-                // Exit false if already sign with no E detected 
+                // Exit false if already sign with no E detected
       if ( ( signDetected == true ) && ( eDetected == false ) )return false;
       signDetected = true;
     }
-    else 
+    else
     {
       number = str[cpt];
       if (!isNumber(number)) return false;
     }
-    cpt++;  
-  }  
+    cpt++;
+  }
 
   return true;
 }
@@ -621,7 +621,7 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
   {
     fluxfilediff.open(diffAsciiFileName.c_str());
   }
-	
+
   std::string strfiletest;
   std::string strfileref;
 
@@ -637,7 +637,7 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
   }
 
   TypeEtat etatPrec(ETAT_NUM), etatCour(ETAT_NUM) ;
-        
+
   std::vector<std::string> listStrDiffLineFileRef;
   std::vector<std::string> listStrDiffLineFileTest;
 
@@ -645,37 +645,37 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
   {
     otb::StringStream buffstreamRef, buffstreamTest ;
     buffstreamRef << strfileref ;
-    
+
     //check if we've reach end of test file
-    if (std::getline(fluxfiletest,strfiletest) == 0) 
+    if (std::getline(fluxfiletest,strfiletest) == 0)
     {
       std::string strRef = "";
-      
+
       buffstreamRef >> strRef ;
-      fluxfilediff << "Line missing in test file: " << numLine 
+      fluxfilediff << "Line missing in test file: " << numLine
           << " : " << strRef
           << std::endl ;
       nbdiff++;
     }
     else
     {
-			
+
       buffstreamTest << strfiletest ;
       int nblinediff(0);
-	
+
       while (buffstreamRef.peek() != EOF)
       {
         std::string strRef = "";
         std::string strTest = "";
-			
+
         std::string strNumRef = "";
         std::string strCharRef = "";
         std::string strNumTest = "";
         std::string strCharTest = "";
-			
+
         buffstreamRef >> strRef ;
         buffstreamTest >> strTest ;
-			
+
         bool chgt= false;
         std::string charTmpRef = "";
         std::string charTmpTest = "";
@@ -689,18 +689,18 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
             {
               if( reportErrors )
               {
-                fluxfilediff << "Diff at line " << numLine << " : compare numeric value with no numeric value ("<<strRef 
+                fluxfilediff << "Diff at line " << numLine << " : compare numeric value with no numeric value ("<<strRef
                     << strRef << " != " << strTest <<")"<< std::endl ;
                 nblinediff++;
               }
               nbdiff++;
-                                
+
             }
             else if (vcl_abs(atof(strRef.c_str())-atof(strTest.c_str())) > epsilon)
             {
               if( reportErrors )
               {
-                fluxfilediff << "Diff at line " << numLine << " : vcl_abs ( (" 
+                fluxfilediff << "Diff at line " << numLine << " : vcl_abs ( ("
                     << strRef << ") - (" << strTest
                     << ") ) > " << epsilon << std::endl ;
                 nblinediff++;
@@ -718,16 +718,16 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
               {
                 charTmpTest=strTest[i];
               }
-				
+
               if (isNumeric(charTmpRef))
                 etatCour = ETAT_NUM;
-              else 
+              else
                 etatCour = ETAT_CHAR;
-				
+
 				// "reference" state initialisation.
               if (i==0)
                 etatPrec=etatCour;
-				
+
 				// Case where there's a number after characteres.
               if ((etatCour==ETAT_NUM)&&(etatPrec==ETAT_CHAR))
               {
@@ -735,14 +735,14 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
                 {
                   if( reportErrors )
                   {
-                    fluxfilediff << "Diff at line " << numLine 
+                    fluxfilediff << "Diff at line " << numLine
                         << " : " << strCharRef
                         << " != " << strCharTest << std::endl ;
                     nblinediff++;
                   }
                   nbdiff++;
                 }
-				    
+
                 strCharRef="";
                 strCharTest="";
                 strNumRef=charTmpRef;
@@ -752,19 +752,19 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
 				// Case where there's a character after numbers.
               else if ((etatCour==ETAT_CHAR)&&(etatPrec==ETAT_NUM))
               {
-				    
+
                 if (vcl_abs(atof(strNumRef.c_str())-atof(strNumTest.c_str())) > epsilon)
                 {
                   if( reportErrors )
                   {
-                    fluxfilediff << "Diff at line " << numLine << " : vcl_abs ( (" 
+                    fluxfilediff << "Diff at line " << numLine << " : vcl_abs ( ("
                         << strNumRef << ") - (" << strNumTest
                         << ") ) > " << epsilon << std::endl ;
                     nblinediff++;
                   }
                   nbdiff++;
-                }	
-				    
+                }
+
                 strNumRef="";
                 strNumTest="";
                 strCharRef=charTmpRef;
@@ -777,29 +777,29 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
                 {
                   strCharRef+=charTmpRef;
                   strCharTest+=charTmpTest;
-                }						
+                }
                 else
                 {
                   strNumRef+=charTmpRef;
                   strNumTest+=charTmpTest;
                 }
               }
-				
+
               etatPrec = etatCour;
               i++;
-            }	
-			    
+            }
+
 			    // Simpliest case : string characters or numeric value between 2 separators
             if (!chgt)
             {
               if (isNumeric(strRef))
               {
-				    
+
                 if (vcl_abs(atof(strRef.c_str())-atof(strTest.c_str())) > epsilon)
                 {
                   if( reportErrors )
                   {
-                    fluxfilediff << "Diff at line " << numLine << " : vcl_abs( (" 
+                    fluxfilediff << "Diff at line " << numLine << " : vcl_abs( ("
                         << strRef << ") - (" << strTest
                         << ") ) > " << epsilon << std::endl ;
                     nblinediff++;
@@ -807,13 +807,13 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
                   nbdiff++;
                 }
               }
-              else 
+              else
               {
                 if ( strRef != strTest )
                 {
                   if( reportErrors )
                   {
-                    fluxfilediff << "Diff at line " << numLine 
+                    fluxfilediff << "Diff at line " << numLine
                         << " : " << strRef
                         << " != " << strTest << std::endl ;
                     nblinediff++;
@@ -834,9 +834,9 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
           }
         }
       }
-    
+
       numLine++;
-    //Store alls differences lines 
+    //Store alls differences lines
       if ( nblinediff!=0 && reportErrors)
       {
         listStrDiffLineFileRef.push_back(strfileref);
@@ -844,9 +844,9 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
       }
 
     }
-    
+
   }
-	
+
 
   while(std::getline(fluxfiletest,strfiletest) != 0)
   {
@@ -855,7 +855,7 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
     std::string strTest = "";
     buffstreamTest << strfiletest ;
     buffstreamTest >> strTest ;
-    fluxfilediff << "Additional line in test file: " << numLine 
+    fluxfilediff << "Additional line in test file: " << numLine
         << " : " << strTest
         << std::endl ;
     nblinediff++;
@@ -866,15 +866,15 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
       listStrDiffLineFileTest.push_back(strfiletest);
     }
   }
-  
-  
+
+
   fluxfiletest.close();
   fluxfileref.close();
   if( reportErrors )
   {
     fluxfilediff.close();
   }
-	
+
   if ( nbdiff!=0 && reportErrors)
   {
     std::cout << "<DartMeasurement name=\"ASCIIFileError\" type=\"numeric/int\">";
@@ -900,7 +900,7 @@ int RegressionTestAsciiFile(const char * testAsciiFileName, const char * baselin
 int RegressionTestBinaryFile(const char * testBinaryFileName, const char * baselineBinaryFileName, int reportErrors)
 {
   int nbdiff(0);
-  FILE *fluxfiletest=NULL;	
+  FILE *fluxfiletest=NULL;
   FILE *fluxfileref=NULL;
   fluxfiletest = fopen(testBinaryFileName,"rb");
   fluxfileref = fopen(baselineBinaryFileName,"rb");
@@ -916,12 +916,12 @@ int RegressionTestBinaryFile(const char * testBinaryFileName, const char * basel
   while( !feof(fluxfiletest) && !feof(fluxfileref) )
   {
     if ( fgetc(fluxfiletest) != fgetc(fluxfileref) )
-    { 
+    {
       nbdiff++;
     }
   }
 /*    	if ( feof(fluxfiletest) != feof(fluxfileref) )
-  { 
+  {
   fprintf(stderr,"L'un des fichiers n'a pas �t� lu enti�rement\n");
 }*/
   fclose(fluxfiletest);
@@ -976,7 +976,7 @@ int RegressionTestImage (int cpt, const char *testImageFilename, const char *bas
   baselineSize = baselineReader->GetOutput()->GetLargestPossibleRegion().GetSize();
   ImageType::SizeType testSize;
   testSize = testReader->GetOutput()->GetLargestPossibleRegion().GetSize();
-  
+
   if (baselineSize != testSize)
   {
     std::cerr << "The size of the Baseline image and Test image do not match!" << std::endl;
@@ -1036,7 +1036,7 @@ int RegressionTestImage (int cpt, const char *testImageFilename, const char *bas
       try
       {
         rescale->SetInput(diff->GetOutput());
-	
+
         for(unsigned int i = 1;i<=min(diff->GetOutput()->GetNumberOfComponentsPerPixel(),3U);++i)
         {
           rescale->SetChannel(i);
@@ -1156,7 +1156,7 @@ int RegressionTestMetaData (const char *testImageFilename, const char *baselineI
   baselineSize = baselineReader->GetOutput()->GetLargestPossibleRegion().GetSize();
   ImageType::SizeType testSize;
   testSize = testReader->GetOutput()->GetLargestPossibleRegion().GetSize();
-  
+
   if (baselineSize != testSize)
   {
     std::cerr << "The size of the Baseline image and Test image do not match!" << std::endl;
@@ -1168,7 +1168,7 @@ int RegressionTestMetaData (const char *testImageFilename, const char *baselineI
   }
   ImageType::Pointer blImPtr = baselineReader->GetOutput();
   ImageType::Pointer testImPtr = testReader->GetOutput();
-  
+
   // test orgin
   if(blImPtr->GetOrigin()!=testImPtr->GetOrigin())
   {
@@ -1201,7 +1201,7 @@ int RegressionTestMetaData (const char *testImageFilename, const char *baselineI
         << " has projection reference " << testImPtr->GetProjectionRef() << std::endl;
     errcount++;
   }
-  
+
   // test Geographic transform
   if(blImPtr->GetGeoTransform()!=testImPtr->GetGeoTransform())
   {
@@ -1268,7 +1268,7 @@ int RegressionTestMetaData (const char *testImageFilename, const char *baselineI
     errcount++;
   }
 
-  
+
   // test gcp count
   if(blImPtr->GetGCPCount()!=testImPtr->GetGCPCount())
   {
@@ -1279,7 +1279,7 @@ int RegressionTestMetaData (const char *testImageFilename, const char *baselineI
         << " has gcp count " << testImPtr->GetGCPCount() << std::endl;
     errcount++;
   }
-  else 
+  else
   {
     for(unsigned int i=0;i<blImPtr->GetGCPCount();++i)
     {
@@ -1315,7 +1315,7 @@ int RegressionTestMetaData (const char *testImageFilename, const char *baselineI
     }
   }
   if(errcount>0)
-  {     
+  {
     std::cout << "<DartMeasurement name=\"MetadataError\" type=\"numeric/int\">";
     std::cout << errcount;
     std::cout <<  "</DartMeasurement>" << std::endl;
diff --git a/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.h b/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.h
index db09933fc0..c76f9d3914 100644
--- a/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.h
+++ b/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,12 +30,12 @@ namespace otb {
  * This class is parameterized over the input image type
  * and the type of the output image.  It is also parameterized by the
  * operation to be applied.  A Functor style is used.
- * 
+ *
  * \ingroup IntensityImageFilters   Multithreaded
- */	
+ */
 template <class TInputImage, class TOutputImage, class TFunction >
-class ITK_EXPORT UnaryFunctorNeighborhoodImageFilter 
-	: public itk::ImageToImageFilter<TInputImage,TOutputImage> 
+class ITK_EXPORT UnaryFunctorNeighborhoodImageFilter
+	: public itk::ImageToImageFilter<TInputImage,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -46,7 +46,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(UnaryFunctorNeighborhoodImageFilter,ImageToImageFilter);
 
@@ -55,7 +55,7 @@ public:
   typedef TFunction                             FunctorType;
   typedef typename Superclass::InputImageType   InputImageType;
   typedef typename InputImageType::ConstPointer InputImagePointer;
-  typedef typename InputImageType::RegionType   InputImageRegionType; 
+  typedef typename InputImageType::RegionType   InputImageRegionType;
   typedef typename InputImageType::PixelType    InputImagePixelType;
   typedef typename InputImageType::SizeType     InputImageSizeType;
   typedef typename Superclass::OutputImageType  OutputImageType;
@@ -97,7 +97,7 @@ public:
     this->Modified();
   }
 
-  typedef itk::ConstNeighborhoodIterator<TInputImage>     NeighborhoodIteratorType; 
+  typedef itk::ConstNeighborhoodIterator<TInputImage>     NeighborhoodIteratorType;
   typedef typename NeighborhoodIteratorType::RadiusType   RadiusType;
   typedef unsigned char RadiusSizeType;
 
diff --git a/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.txx b/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.txx
index 0cdc847c75..4f9a5f1f71 100644
--- a/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.txx
+++ b/Code/Common/otbUnaryFunctorNeighborhoodImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -46,12 +46,12 @@ UnaryFunctorNeighborhoodImageFilter<TInputImage,TOutputImage,TFunction>
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
   typename Superclass::InputImagePointer  inputPtr =
     const_cast< TInputImage * >( this->GetInput());
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -60,7 +60,7 @@ UnaryFunctorNeighborhoodImageFilter<TInputImage,TOutputImage,TFunction>
   // requested region)
   typename TInputImage::RegionType inputRequestedRegion;
   inputRequestedRegion = inputPtr->GetRequestedRegion();
-  
+
   // pad the input requested region by the operator radius
   inputRequestedRegion.PadByRadius( m_Radius );
 
@@ -97,7 +97,7 @@ template <class TInputImage, class TOutputImage, class TFunction >
 void
 UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage, TFunction>
 ::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread, int threadId)
-{ 
+{
   itk::ZeroFluxNeumannBoundaryCondition<TInputImage> nbc;
 
 // We use dynamic_cast since inputs are stored as DataObjects.  The
@@ -110,7 +110,7 @@ UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage, TFunction>
   RadiusType r;
   r.Fill(m_Radius);
   NeighborhoodIteratorType neighInputIt;
-    
+
   itk::ImageRegionIterator<TOutputImage> outputIt;
 
 
@@ -124,13 +124,13 @@ UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage, TFunction>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-    { 
+    {
     neighInputIt = itk::ConstNeighborhoodIterator<TInputImage>(r, inputPtr, *fit);
-      
+
     outputIt = itk::ImageRegionIterator<TOutputImage>(outputPtr, *fit);
     neighInputIt.OverrideBoundaryCondition(&nbc);
     neighInputIt.GoToBegin();
@@ -144,7 +144,7 @@ UnaryFunctorNeighborhoodImageFilter<TInputImage, TOutputImage, TFunction>
       ++outputIt;
       progress.CompletedPixel();
       }
-    }  
+    }
 }
 
 } // end namespace otb
diff --git a/Code/Common/otbVectorData.h b/Code/Common/otbVectorData.h
index addb88c702..646c39da07 100644
--- a/Code/Common/otbVectorData.h
+++ b/Code/Common/otbVectorData.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,11 +25,11 @@
 namespace otb
 {
   /** \class VectorData
-   * \brief this class represents a hierarchy of vector data. 
-   * 
+   * \brief this class represents a hierarchy of vector data.
+   *
    * This class contains an itk::TreeContainer templated with otb::DataNode.
-   * It represents a tree structure of vector data. These data can be read from 
-   * shapefiles or kml files for instance. 
+   * It represents a tree structure of vector data. These data can be read from
+   * shapefiles or kml files for instance.
    *
    * The internal tree can be walked with itk::TreeIteratorBase subclasses.
    *
@@ -38,9 +38,9 @@ namespace otb
    * \sa VectorDataFileWriter
    *
    */
-template <class TPrecision = double, unsigned int VDimension =2> 
-class VectorData 
-  : public itk::DataObject  
+template <class TPrecision = double, unsigned int VDimension =2>
+class VectorData
+  : public itk::DataObject
 {
   public:
   /** Standard class typedefs */
@@ -72,8 +72,8 @@ class VectorData
   virtual ~VectorData(){};
   /** PrintSelf method */
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-   
-  private:    
+
+  private:
   VectorData(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
diff --git a/Code/Common/otbVectorData.txx b/Code/Common/otbVectorData.txx
index 6502fb91ca..689dcb726c 100644
--- a/Code/Common/otbVectorData.txx
+++ b/Code/Common/otbVectorData.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -44,7 +44,7 @@ VectorData<TPrecision,VDimension>
 
   itk::PreOrderTreeIterator<DataTreeType> it(m_DataTree);
   it.GoToBegin();
-  
+
   while(!it.IsAtEnd())
     {
       itk::PreOrderTreeIterator<DataTreeType> itParent = it;
diff --git a/Code/Common/otbVectorImageToASImageAdaptor.h b/Code/Common/otbVectorImageToASImageAdaptor.h
index 4cacca2791..a4990ae1fc 100644
--- a/Code/Common/otbVectorImageToASImageAdaptor.h
+++ b/Code/Common/otbVectorImageToASImageAdaptor.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
- 
+
 
 /** \class VectorImageToASImageAdaptor
  * \brief Presents an image of pixel type Vector as being and image of
@@ -47,9 +47,9 @@ public:
                                        >  > Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro( VectorImageToASImageAdaptor, ImageAdaptor );
@@ -59,11 +59,11 @@ public:
   typedef typename Superclass::PixelContainer        PixelContainer;
   typedef typename Superclass::PixelContainerPointer PixelContainerPointer;
   typedef typename Superclass::PixelContainerConstPointer PixelContainerConstPointer;
-  
+
  protected:
   VectorImageToASImageAdaptor() {}
   virtual ~VectorImageToASImageAdaptor() {}
-  
+
  private:
   VectorImageToASImageAdaptor(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/Common/otbVectorImageToASPixelAccessor.h b/Code/Common/otbVectorImageToASPixelAccessor.h
index 09d77843d6..1cb4f26578 100644
--- a/Code/Common/otbVectorImageToASPixelAccessor.h
+++ b/Code/Common/otbVectorImageToASPixelAccessor.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ namespace Accessor
  * \class VectorImageToASPixelAccessor
  * \brief Give access to a Vector pixel type as if it were a RGBPixel type.
  *
- * This class is intended to be used as parameter of 
+ * This class is intended to be used as parameter of
  * an ImageAdaptor to make an Vector image appear as being
  * an image of RGB pixel type.
  *
@@ -59,7 +59,7 @@ public:
 
   /** Write access to the VectorToRGB component */
   inline void Set( InternalType & output, const ExternalType & input ) const
-    { 
+    {
     output[0] = input[0];
     output[1] = input[1];
     output[2] = input[2];
@@ -74,7 +74,7 @@ public:
 
 private:
 };
-  
+
 }  // end namespace Accessor
 }  // end namespace otb
 
diff --git a/Code/Common/otbWriterWatcherBase.cxx b/Code/Common/otbWriterWatcherBase.cxx
index 8400cbcd08..4ef6e87981 100644
--- a/Code/Common/otbWriterWatcherBase.cxx
+++ b/Code/Common/otbWriterWatcherBase.cxx
@@ -38,7 +38,7 @@ WriterWatcherBase
   // Initialize state
   m_Process = process;
   m_Comment = comment;
-  
+
   // Create a series of commands
   m_StartWriterCommand = CommandType::New();
   m_EndWriterCommand = CommandType::New();
@@ -46,7 +46,7 @@ WriterWatcherBase
   m_StartFilterCommand = CommandType::New();
   m_EndFilterCommand = CommandType::New();
   m_ProgressFilterCommand = CommandType::New();
-    
+
   // Assign the callbacks
   m_StartFilterCommand->SetCallbackFunction(this,
                                         &WriterWatcherBase::StartFilter);
@@ -60,14 +60,14 @@ WriterWatcherBase
                                         &WriterWatcherBase::EndWriter);
   m_ProgressWriterCommand->SetCallbackFunction(this,
                                         &WriterWatcherBase::ShowWriterProgress);
-  
+
   // Add the commands as observers
   m_StartWriterTag = m_Process->AddObserver(itk::StartEvent(),
 				      m_StartWriterCommand);
-  
+
   m_EndWriterTag = m_Process->AddObserver(itk::EndEvent(),
 				    m_EndWriterCommand);
-  
+
   m_ProgressWriterTag = m_Process->AddObserver(itk::ProgressEvent(),
 					 m_ProgressWriterCommand);
 
@@ -75,14 +75,14 @@ WriterWatcherBase
   if(m_Process->GetInputs()[0]->GetSource())
     {
       m_SourceProcess = m_Process->GetInputs()[0]->GetSource();
-      
+
       // Add the commands as observers
       m_StartFilterTag = m_SourceProcess->AddObserver(itk::StartEvent(),
 						m_StartFilterCommand);
-  
+
       m_EndFilterTag = m_SourceProcess->AddObserver(itk::EndEvent(),
 					      m_EndFilterCommand);
-      
+
       m_ProgressFilterTag = m_SourceProcess->AddObserver(itk::ProgressEvent(),
 						   m_ProgressFilterCommand);
     }
@@ -95,7 +95,7 @@ WriterWatcherBase
   // Initialize state
   m_Process = process;
   m_Comment = comment;
-  
+
   // Create a series of commands
   m_StartWriterCommand = CommandType::New();
   m_EndWriterCommand = CommandType::New();
@@ -103,7 +103,7 @@ WriterWatcherBase
   m_StartFilterCommand = CommandType::New();
   m_EndFilterCommand = CommandType::New();
   m_ProgressFilterCommand = CommandType::New();
-    
+
   // Assign the callbacks
   m_StartFilterCommand->SetCallbackFunction(this,
                                         &WriterWatcherBase::StartFilter);
@@ -117,26 +117,26 @@ WriterWatcherBase
                                         &WriterWatcherBase::EndWriter);
   m_ProgressWriterCommand->SetCallbackFunction(this,
                                         &WriterWatcherBase::ShowWriterProgress);
-  
+
   // Add the commands as observers
   m_StartWriterTag = m_Process->AddObserver(itk::StartEvent(),
 				      m_StartWriterCommand);
-  
+
   m_EndWriterTag = m_Process->AddObserver(itk::EndEvent(),
 				    m_EndWriterCommand);
-  
+
   m_ProgressWriterTag = m_Process->AddObserver(itk::ProgressEvent(),
 					 m_ProgressWriterCommand);
 
   m_SourceProcess = source;
-  
+
   // Add the commands as observers
   m_StartFilterTag = m_SourceProcess->AddObserver(itk::StartEvent(),
 						  m_StartFilterCommand);
-  
+
   m_EndFilterTag = m_SourceProcess->AddObserver(itk::EndEvent(),
 						m_EndFilterCommand);
-  
+
   m_ProgressFilterTag = m_SourceProcess->AddObserver(itk::ProgressEvent(),
 						     m_ProgressFilterCommand);
 }
@@ -176,27 +176,27 @@ WriterWatcherBase
 	  m_SourceProcess->RemoveObserver(m_ProgressFilterTag);
 	}
     }
-  
+
   // Initialize state
   m_TimeProbe = watch.m_TimeProbe;
   m_Process = watch.m_Process;
   m_SourceProcess = watch.m_SourceProcess;
   m_Comment = watch.m_Comment;
-  
+
   m_StartFilterTag = 0;
   m_EndFilterTag = 0;
   m_ProgressFilterTag = 0;
   m_StartWriterTag = 0;
   m_EndWriterTag = 0;
   m_ProgressWriterTag = 0;
-  
+
   // Create a series of commands
   if (m_Process)
     {
       m_StartWriterCommand = CommandType::New();
       m_EndWriterCommand = CommandType::New();
       m_ProgressWriterCommand = CommandType::New();
-      
+
       // Assign the callbacks
       m_StartWriterCommand->SetCallbackFunction(this,
 						&WriterWatcherBase::StartWriter);
@@ -204,7 +204,7 @@ WriterWatcherBase
 					      &WriterWatcherBase::EndWriter);
       m_ProgressWriterCommand->SetCallbackFunction(this,
 						   &WriterWatcherBase::ShowWriterProgress);
-      
+
       // Add the commands as observers
       m_StartWriterTag = m_Process->AddObserver(itk::StartEvent(), m_StartWriterCommand);
       m_EndWriterTag = m_Process->AddObserver(itk::EndEvent(), m_EndWriterCommand);
@@ -217,7 +217,7 @@ WriterWatcherBase
       m_StartFilterCommand = CommandType::New();
       m_EndFilterCommand = CommandType::New();
       m_ProgressFilterCommand = CommandType::New();
-      
+
       // Assign the callbacks
       m_StartFilterCommand->SetCallbackFunction(this,
 						&WriterWatcherBase::StartFilter);
@@ -225,7 +225,7 @@ WriterWatcherBase
 					      &WriterWatcherBase::EndFilter);
       m_ProgressFilterCommand->SetCallbackFunction(this,
 						   &WriterWatcherBase::ShowFilterProgress);
-      
+
       // Add the commands as observers
       m_StartFilterTag = m_SourceProcess->AddObserver(itk::StartEvent(), m_StartFilterCommand);
       m_EndFilterTag = m_SourceProcess->AddObserver(itk::EndEvent(), m_EndFilterCommand);
@@ -269,27 +269,27 @@ WriterWatcherBase
 	  m_SourceProcess->RemoveObserver(m_ProgressFilterTag);
 	}
     }
-  
+
   // Initialize state
   m_TimeProbe = watch.m_TimeProbe;
   m_Process = watch.m_Process;
   m_SourceProcess = watch.m_SourceProcess;
   m_Comment = watch.m_Comment;
-  
+
   m_StartFilterTag = 0;
   m_EndFilterTag = 0;
   m_ProgressFilterTag = 0;
   m_StartWriterTag = 0;
   m_EndWriterTag = 0;
   m_ProgressWriterTag = 0;
-  
+
   // Create a series of commands
   if (m_Process)
     {
       m_StartWriterCommand = CommandType::New();
       m_EndWriterCommand = CommandType::New();
       m_ProgressWriterCommand = CommandType::New();
-      
+
       // Assign the callbacks
       m_StartWriterCommand->SetCallbackFunction(this,
 						&WriterWatcherBase::StartWriter);
@@ -297,7 +297,7 @@ WriterWatcherBase
 					      &WriterWatcherBase::EndWriter);
       m_ProgressWriterCommand->SetCallbackFunction(this,
 						   &WriterWatcherBase::ShowWriterProgress);
-      
+
       // Add the commands as observers
       m_StartWriterTag = m_Process->AddObserver(itk::StartEvent(), m_StartWriterCommand);
       m_EndWriterTag = m_Process->AddObserver(itk::EndEvent(), m_EndWriterCommand);
@@ -309,7 +309,7 @@ WriterWatcherBase
       m_StartFilterCommand = CommandType::New();
       m_EndFilterCommand = CommandType::New();
       m_ProgressFilterCommand = CommandType::New();
-      
+
       // Assign the callbacks
       m_StartFilterCommand->SetCallbackFunction(this,
 						&WriterWatcherBase::StartFilter);
@@ -317,7 +317,7 @@ WriterWatcherBase
 					      &WriterWatcherBase::EndFilter);
       m_ProgressFilterCommand->SetCallbackFunction(this,
 						   &WriterWatcherBase::ShowFilterProgress);
-      
+
       // Add the commands as observers
       m_StartFilterTag = m_SourceProcess->AddObserver(itk::StartEvent(), m_StartFilterCommand);
       m_EndFilterTag = m_SourceProcess->AddObserver(itk::EndEvent(), m_EndFilterCommand);
diff --git a/Code/Common/otbWriterWatcherBase.h b/Code/Common/otbWriterWatcherBase.h
index cb82a25000..093d45b959 100644
--- a/Code/Common/otbWriterWatcherBase.h
+++ b/Code/Common/otbWriterWatcherBase.h
@@ -31,7 +31,7 @@ namespace otb
   /** \class WriterWatcherBase
    *  \brief This class is an abstract class
    *         Provides an interface to progress task mechanic
-   *         
+   *
    *  Implement your callbacks
    *  \li ShowWriterProgress : callback called for each completed tile
    *  \li StartWriter        : callback called at the begin of tile writing
@@ -44,7 +44,7 @@ namespace otb
   class ITK_EXPORT WriterWatcherBase
     {
     public:
-      
+
       /** Constructor. Takes a ProcessObject to monitor and an optional
        * comment string that is prepended to each event message. */
       WriterWatcherBase(itk::ProcessObject* process,
@@ -56,101 +56,101 @@ namespace otb
 
       /** Default constructor */
       WriterWatcherBase();
-      
+
       /** Copy constructor */
       WriterWatcherBase(const WriterWatcherBase&);
-      
+
       /** operator=  */
       void operator=(const WriterWatcherBase& );
-      
+
       /** Destructor. */
       virtual ~WriterWatcherBase();
-      
+
       /** Methods to access member data */
       /** Get a pointer to the process object being watched. */
       itk::ProcessObject *GetProcess () {return m_Process.GetPointer();}
-      
+
       /** Get the comment for the watcher. */
       std::string GetComment() {return m_Comment;}
-      
+
       /** Get a reference to the TimeProbe */
       itk::TimeProbe &GetTimeProbe() {return m_TimeProbe;}
-      
+
     protected:
-      
+
       /** Callback method to show the ProgressEvent from the writer */
       virtual void ShowWriterProgress() = 0;
-      
+
       /** Callback method to show the StartEvent from the writer*/
       virtual void StartWriter() = 0;
-      
+
       /** Callback method to show the EndEvent from the writer*/
       virtual void EndWriter() = 0;
 
       /** Callback method to show the ProgressEvent from the filter */
       virtual void ShowFilterProgress() = 0;
-      
+
       /** Callback method to show the StartEvent from the filter*/
       virtual void StartFilter() = 0;
-      
+
       /** Callback method to show the EndEvent from the filter*/
       virtual void EndFilter() = 0;
-     
+
       /** Computing time */
       itk::TimeProbe m_TimeProbe;
-      
+
       /** Associated comment */
       std::string m_Comment;
-      
+
       /** Abstract process object */
       itk::ProcessObject::Pointer m_Process;
-      
+
       /** Second abstract process object representing the source */
       itk::ProcessObject::Pointer m_SourceProcess;
 
       /** Internal type */
       typedef itk::SimpleMemberCommand<WriterWatcherBase> CommandType;
-      
+
       /** Start writer callback */
       CommandType::Pointer m_StartWriterCommand;
-      
+
       /** End writer callback */
       CommandType::Pointer m_EndWriterCommand;
-      
+
       /** Progress writer callback */
       CommandType::Pointer m_ProgressWriterCommand;
 
       /** Start filter callback */
       CommandType::Pointer m_StartFilterCommand;
-      
+
       /** End writer callback */
       CommandType::Pointer m_EndFilterCommand;
-      
+
       /** Progress writer callback */
       CommandType::Pointer m_ProgressFilterCommand;
-      
+
       /** Start oberserver */
       unsigned long m_StartWriterTag;
-      
+
       /** End observer */
       unsigned long m_EndWriterTag;
-      
+
       /** Progress observer */
       unsigned long m_ProgressWriterTag;
 
       /** Start oberserver */
       unsigned long m_StartFilterTag;
-      
+
       /** End observer */
       unsigned long m_EndFilterTag;
-      
+
       /** Progress observer */
       unsigned long m_ProgressFilterTag;
 
     private:
 
     };
-  
+
 } // end namespace otb
 
 #endif
diff --git a/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.h b/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.h
index 119ec4b4b5..db41a50a8b 100644
--- a/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,7 +23,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class BSplinesInterpolateDeformationFieldGenerator
- *  \brief This filters encapsulate the itk::DeformationFieldSource to produce a BSpline interpolation of the point in point set whose metric values are 
+ *  \brief This filters encapsulate the itk::DeformationFieldSource to produce a BSpline interpolation of the point in point set whose metric values are
  * sufficient.
  * \sa itk::DeformationFieldSource
  * \ingroup DisparityMap
@@ -38,13 +38,13 @@ class ITK_EXPORT BSplinesInterpolateDeformationFieldGenerator
   typedef PointSetToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(BSplinesInterpolateDeformationFieldGenerator,PointSetToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PointSetType PointSetType;
   typedef typename Superclass::PointSetPointerType PointSetPointerType;
diff --git a/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx b/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx
index 9c9ec871f7..41f11b84d4 100644
--- a/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbBSplinesInterpolateDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -53,10 +53,10 @@ BSplinesInterpolateDeformationFieldGenerator<TPointSet, TDeformationField>
   PointsIterator pointIterator = this->GetPointSet()->GetPoints()->Begin();
   PointsIterator end = this->GetPointSet()->GetPoints()->End();
   unsigned int pointId = 0;
-  
-  PointDataIterator  pointDataIterator = this->GetPointSet()->GetPointData()->Begin();  
-  
-  while( pointIterator != end ) 
+
+  PointDataIterator  pointDataIterator = this->GetPointSet()->GetPointData()->Begin();
+
+  while( pointIterator != end )
     {
       typename PointDataContainer::Element valueAndDeformations = pointDataIterator.Value();
 
@@ -75,14 +75,14 @@ BSplinesInterpolateDeformationFieldGenerator<TPointSet, TDeformationField>
       ++pointIterator;
       ++pointDataIterator;
     }
-  
+
   typename DeformationFieldSourceType::Pointer deformer = DeformationFieldSourceType::New();
   deformer->SetOutputSpacing(this->GetOutputSpacing());
   deformer->SetOutputOrigin(this->GetOutputOrigin());
   deformer->SetOutputRegion(outputPtr->GetRequestedRegion());
   deformer->SetSourceLandmarks(sourceLandmarks.GetPointer());
   deformer->SetTargetLandmarks(targetLandmarks.GetPointer());
-  
+
   deformer->Update();
   outputPtr->Allocate();
   PixelType defaultPixel;
@@ -91,7 +91,7 @@ BSplinesInterpolateDeformationFieldGenerator<TPointSet, TDeformationField>
   outputPtr->FillBuffer(defaultPixel);
   typedef itk::ImageRegionIterator<ImageType> ImageIteratorType;
   typedef itk::ImageRegionIterator<DeformationFieldType> OutputIteratorType;
- 
+
   ImageIteratorType inIt(deformer->GetOutput(),outputPtr->GetRequestedRegion());
   OutputIteratorType outIt(outputPtr,outputPtr->GetRequestedRegion());
   int i=0;
diff --git a/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.h b/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.h
index 7988c273e5..ae5bb795f5 100644
--- a/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,10 +29,10 @@ namespace otb
 /** \class BSplinesInterpolateTransformDeformationFieldGenerator
  *  \brief This class generate the deformation field by using spline interpolation on the parameters of the transform.
  *
- *  Spline interpolation of non regularly scattered data is provided by a filter from the insight journal, 
+ *  Spline interpolation of non regularly scattered data is provided by a filter from the insight journal,
  *  ij::BSplineScatteredDataPointSetToImageFilter. It allows interpolation using any spline order and implements a multi-level approach.
- *  
- *  This filter is used for each parameter. One can also specify the indices of the angular parameters. Angular parameters are first 
+ *
+ *  This filter is used for each parameter. One can also specify the indices of the angular parameters. Angular parameters are first
  *  converted to complex exponential, the interpolated and converted back to the angular space. This is done to avoid interpolating angular discontinuities,
  *  which is a non-sense.
  *
@@ -48,13 +48,13 @@ class ITK_EXPORT BSplinesInterpolateTransformDeformationFieldGenerator
   typedef PointSetWithTransformToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(BSplinesInterpolateTransformDeformationFieldGenerator,PointSetWithTransformsToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PointSetType PointSetType;
   typedef typename Superclass::PointSetPointerType PointSetPointerType;
@@ -81,19 +81,19 @@ class ITK_EXPORT BSplinesInterpolateTransformDeformationFieldGenerator
    * \param index The index of the angular parameter.
    */
   void AddAngularParameter(unsigned int index);
-  /** 
+  /**
    * Remove an angular parameter.
    * \param index The index of the angular parameter.
-   */  
+   */
   void RemoveAngularParameter(unsigned int index);
-  
+
   itkSetMacro(SplineOrder,unsigned int);
   itkGetMacro(SplineOrder,unsigned int);
   itkSetMacro(NumberOfControlPoints,unsigned int);
   itkGetMacro(NumberOfControlPoints,unsigned int);
   itkSetMacro(NumberOfLevels,unsigned int);
   itkGetMacro(NumberOfLevels,unsigned int);
-  
+
 protected:
   /** Constructor */
   BSplinesInterpolateTransformDeformationFieldGenerator();
diff --git a/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.txx b/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.txx
index 9343c7aabd..9cce110ad4 100644
--- a/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbBSplinesInterpolateTransformDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -83,7 +83,7 @@ BSplinesInterpolateTransformDeformationFieldGenerator<TPointSet, TDeformationFie
 	  if(vcl_abs(this->GetPointSet()->GetPointData()->GetElement(pointDataCounter)[0])>=this->GetMetricThreshold())
 	    {
 	      typename InternalPointSetType::PixelType V(0.0);
-	      
+
 	       if(!IsAngular(paramIndex))
 		 {
 		   V[0] = this->GetPointSet()->GetPointData()->GetElement(pointDataCounter)[paramIndex+3];
@@ -95,22 +95,22 @@ BSplinesInterpolateTransformDeformationFieldGenerator<TPointSet, TDeformationFie
 		   V[1] = static_cast<ValueType>(vcl_sin( this->GetPointSet()->GetPointData()->GetElement(pointDataCounter)[paramIndex+3]));
 		 }
 	       unsigned long nbPoints = tmpPointSet->GetNumberOfPoints();
-	       tmpPointSet->SetPoint( nbPoints, it.Value());  
+	       tmpPointSet->SetPoint( nbPoints, it.Value());
 	       tmpPointSet->SetPointData( nbPoints, V );
 	    }
 	  ++pointDataCounter;
-	} 
+	}
 
       // Set the interpolator parameters
       splineIntList->Back()->SetInput(tmpPointSet);
-      splineIntList->Back()->SetSplineOrder(m_SplineOrder);  
-      typename SPlineInterpolateFilterType::ArrayType ncps;  
-      ncps.Fill(m_NumberOfControlPoints);  
+      splineIntList->Back()->SetSplineOrder(m_SplineOrder);
+      typename SPlineInterpolateFilterType::ArrayType ncps;
+      ncps.Fill(m_NumberOfControlPoints);
       splineIntList->Back()->SetNumberOfControlPoints( ncps );
       splineIntList->Back()->SetNumberOfLevels(m_NumberOfLevels);
       // splineIntList->Back()->SetGenerateOutputImage(false);
-  
-      // Define the parametric domain. 
+
+      // Define the parametric domain.
       splineIntList->Back()->SetOrigin(this->GetOutput()->GetOrigin());
       splineIntList->Back()->SetSpacing(this->GetOutput()->GetSpacing());
       splineIntList->Back()->SetSize(this->GetOutput()->GetLargestPossibleRegion().GetSize());
@@ -120,7 +120,7 @@ BSplinesInterpolateTransformDeformationFieldGenerator<TPointSet, TDeformationFie
   // Interpolation
   typedef itk::ImageRegionIteratorWithIndex<DeformationFieldType> IteratorType;
   IteratorType outIt(outputPtr,outputPtr->GetRequestedRegion());
-  
+
 
   // main loop
   for(outIt.GoToBegin();!outIt.IsAtEnd();++outIt)
diff --git a/Code/DisparityMap/otbDisparityMapEstimationMethod.h b/Code/DisparityMap/otbDisparityMapEstimationMethod.h
index e08219be35..1af61708b6 100644
--- a/Code/DisparityMap/otbDisparityMapEstimationMethod.h
+++ b/Code/DisparityMap/otbDisparityMapEstimationMethod.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,9 +28,9 @@
 namespace otb
 {
   /** \class DisparityMapEstimationMethod
-   *  \brief This class performs an estimation of the local deformation 
-   *  modelled by a given transform between the fixed and the moving image, 
-   *  at each point of the given point set. 
+   *  \brief This class performs an estimation of the local deformation
+   *  modelled by a given transform between the fixed and the moving image,
+   *  at each point of the given point set.
    *
    *  It uses the ITK registration framework locally for each point and thus
    *  provides the flexibility of this framework. The parameters of each transform
@@ -43,7 +43,7 @@ namespace otb
    *  - The row deformation value,
    *  - The final estimated parameters of the transform.
    *
-   *  This class is derived from the MAECENAS code provided by Jordi Inglada, 
+   *  This class is derived from the MAECENAS code provided by Jordi Inglada,
    *  from CNES.
    */
 template <class TFixedImage, class TMovingImage, class TPointSet>
@@ -56,19 +56,19 @@ class ITK_EXPORT DisparityMapEstimationMethod
   typedef PointSetSource<TPointSet>          Superclass;
   typedef itk::SmartPointer<Self>            Pointer;
   typedef itk::SmartPointer<const Self>      ConstPointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(DisparityMapEstimationMethod, ProcessObject);
-  
+
   /** Typedef for the Fixed image. */
   typedef TFixedImage  FixedImageType;
   typedef typename FixedImageType::Pointer FixedImagePointerType;
   typedef typename FixedImageType::PixelType FixedPixelType;
   typedef typename FixedImageType::SizeType SizeType;
-  
+
   /** Typedef for the Moving image. */
   typedef TMovingImage MovingImageType;
   typedef typename MovingImageType::Pointer MovingImagePointerType;
@@ -91,7 +91,7 @@ class ITK_EXPORT DisparityMapEstimationMethod
   typedef itk::DataObjectDecorator<TransformType> TransformOutputType;
   typedef typename TransformOutputType::Pointer TransformOutputPointerType;
   typedef typename TransformOutputType::ConstPointer TransformOutputConstPointerType;
-  
+
   /** Typedef for the generic interpolator. */
   typedef typename MetricType::InterpolatorType InterpolatorType;
   typedef typename InterpolatorType::Pointer InterpolatorPointerType;
diff --git a/Code/DisparityMap/otbDisparityMapEstimationMethod.txx b/Code/DisparityMap/otbDisparityMapEstimationMethod.txx
index 2a9e421444..44fa6da3c0 100644
--- a/Code/DisparityMap/otbDisparityMapEstimationMethod.txx
+++ b/Code/DisparityMap/otbDisparityMapEstimationMethod.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -136,8 +136,8 @@ DisparityMapEstimationMethod<TFixedImage,TMovingImage,TPointSet>
   const MovingImageType * moving = this->GetMovingImage();
   const PointSetType * pointSet = this->GetPointSet();
   PointSetType* output = this->GetOutput();
-  
-  // Typedefs 
+
+  // Typedefs
   typedef typename PointSetType::PointsContainer PointsContainer;
   typedef typename PointsContainer::ConstIterator PointsIterator;
   typedef itk::ImageRegistrationMethod<FixedImageType,MovingImageType> RegistrationType;
@@ -147,24 +147,24 @@ DisparityMapEstimationMethod<TFixedImage,TMovingImage,TPointSet>
   // points retrieving
   typename PointsContainer::ConstPointer points = pointSet->GetPoints();
 
-  // Iterator set up 
+  // Iterator set up
   PointsIterator  pointIterator = points->Begin();
   PointsIterator end = points->End();
   unsigned int dataId = 0;
 
   otbMsgDevMacro(<<"Starting registration");
-  
+
   /// Iterate through the point set
-  while(pointIterator!= end) 
+  while(pointIterator!= end)
     {
-    typename PointSetType::PointType p = pointIterator.Value();   // access the point    
+    typename PointSetType::PointType p = pointIterator.Value();   // access the point
 
     // Extract the needed sub-images
     typename FixedExtractType::Pointer fixedExtractor = FixedExtractType::New();
     typename MovingExtractType::Pointer movingExtractor = MovingExtractType::New();
     fixedExtractor->SetInput(fixed);
     movingExtractor->SetInput(moving);
-    
+
     // Fixed extractor setup
     fixedExtractor->SetStartX(static_cast<unsigned long>(p[0]-m_ExploSize[0]));
     fixedExtractor->SetStartY(static_cast<unsigned long>(p[1]-m_ExploSize[1]));
@@ -181,7 +181,7 @@ DisparityMapEstimationMethod<TFixedImage,TMovingImage,TPointSet>
     // update the extractors
     fixedExtractor->Update();
     movingExtractor->Update();
-    
+
 //     std::cout<<"Fixed extract origin: "<<fixedExtractor->GetOutput()->GetOrigin()<<std::endl;
 //     std::cout<<"Fixed extract spacing: "<<fixedExtractor->GetOutput()->GetSpacing()<<std::endl;
 //     std::cout<<"Moving extract origin: "<<movingExtractor->GetOutput()->GetOrigin()<<std::endl;
@@ -209,7 +209,7 @@ DisparityMapEstimationMethod<TFixedImage,TMovingImage,TPointSet>
 
     // Registration filter definition
     typename RegistrationType::Pointer   registration = RegistrationType::New();
-    
+
     // Registration filter setup
     registration->SetOptimizer(m_Optimizer);
     registration->SetTransform(m_Transform);
@@ -217,14 +217,14 @@ DisparityMapEstimationMethod<TFixedImage,TMovingImage,TPointSet>
     registration->SetMetric(m_Metric);
     registration->SetFixedImage(fixedExtractor->GetOutput());
     registration->SetMovingImage(movingExtractor->GetOutput());
-    
+
     // initial transform parameters setup
     registration->SetInitialTransformParameters( m_InitialTransformParameters);
     m_Interpolator->SetInputImage(movingExtractor->GetOutput());
-    
+
     // Perform the registration
-    registration->StartRegistration(); 
-    
+    registration->StartRegistration();
+
     // Retrieve the final parameters
     ParametersType finalParameters = registration->GetLastTransformParameters();
     double value = m_Optimizer->GetValue(registration->GetLastTransformParameters());
@@ -232,7 +232,7 @@ DisparityMapEstimationMethod<TFixedImage,TMovingImage,TPointSet>
     // Computing moving image point
     typename FixedImageType::PointType inputPoint,outputPoint;
     typename FixedImageType::IndexType inputIndex;
-    
+
     // ensure that we have the right coord rep type
     inputIndex[0] = static_cast<unsigned int>(p[0]);
     inputIndex[1] = static_cast<unsigned int>(p[1]);
diff --git a/Code/DisparityMap/otbMIRegistrationFilter.h b/Code/DisparityMap/otbMIRegistrationFilter.h
index 3c05a37b50..ad39874b7d 100644
--- a/Code/DisparityMap/otbMIRegistrationFilter.h
+++ b/Code/DisparityMap/otbMIRegistrationFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,8 +27,8 @@ namespace otb {
 /** \class MIRegistrationFilter
  * \brief Deformably register two images using the PDEs and Mutual Information.
  *
- * MIRegistrationFilter implements the ####### 
- * register two images by computing the deformation field which will map a 
+ * MIRegistrationFilter implements the #######
+ * register two images by computing the deformation field which will map a
  * moving image onto a fixed image.
  *
  * A deformation field is represented as a image whose pixel type is some
@@ -55,12 +55,12 @@ namespace otb {
  *
  * \warning This filter assumes that the fixed image type, moving image type
  * and deformation field type all have the same number of dimensions.
- * 
- * \sa MIRegistrationFunction 
+ *
+ * \sa MIRegistrationFunction
  * \ingroup DeformableImageRegistration MultiThreaded
  */
 template<class TFixedImage, class TMovingImage, class TDeformationField>
-class ITK_EXPORT MIRegistrationFilter : 
+class ITK_EXPORT MIRegistrationFilter :
     public itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
                                             TDeformationField>
 {
@@ -76,7 +76,7 @@ public:
   itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
-  itkTypeMacro( MIRegistrationFilter, 
+  itkTypeMacro( MIRegistrationFilter,
                 itk::PDEDeformableRegistrationFilter );
 
   /** Inherit types from superclass. */
@@ -89,11 +89,11 @@ public:
   /** MovingImage image type. */
   typedef typename Superclass::MovingImageType    MovingImageType;
   typedef typename Superclass::MovingImagePointer  MovingImagePointer;
-  
+
   /** Deformation field type. */
-  typedef typename Superclass::DeformationFieldType 
+  typedef typename Superclass::DeformationFieldType
   DeformationFieldType;
-  typedef typename Superclass::DeformationFieldPointer  
+  typedef typename Superclass::DeformationFieldPointer
   DeformationFieldPointer;
 
   /** FiniteDifferenceFunction type. */
@@ -105,7 +105,7 @@ public:
                                      DeformationFieldType>  MIRegistrationFunctionType;
 
   typedef typename MIRegistrationFunctionType::RadiusType RadiusType;
-  
+
   /** Get the metric value. The metric value is computed over the the
    * overlapping region between the two images.  This is value is only
    * available for the previous iteration and NOT the current
@@ -115,7 +115,7 @@ public:
 
   virtual void SetMIRadius(RadiusType radius);
   virtual RadiusType GetMIRadius() const;
-  
+
 protected:
   MIRegistrationFilter();
   ~MIRegistrationFilter() {}
diff --git a/Code/DisparityMap/otbMIRegistrationFilter.txx b/Code/DisparityMap/otbMIRegistrationFilter.txx
index 7b031702e9..7a0286966f 100644
--- a/Code/DisparityMap/otbMIRegistrationFilter.txx
+++ b/Code/DisparityMap/otbMIRegistrationFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,12 +29,12 @@ template <class TFixedImage, class TMovingImage, class TDeformationField>
 MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::MIRegistrationFilter()
 {
- 
+
   typename MIRegistrationFunctionType::Pointer drfp;
   drfp = MIRegistrationFunctionType::New();
 
   drfp->SetDeformationField( this->GetDeformationField() );
-  
+
   this->SetDifferenceFunction( static_cast<FiniteDifferenceFunctionType *>(
                                  drfp.GetPointer() ) );
 
@@ -45,7 +45,7 @@ template <class TFixedImage, class TMovingImage, class TDeformationField>
 void
 MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
-{ 
+{
   Superclass::PrintSelf( os, indent );
    os << indent << "MI Radius: " <<
     this->GetMIRadius() << std::endl;
@@ -60,21 +60,21 @@ void
 MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::InitializeIteration()
 {
- 
+
   // call the superclass  implementation
   Superclass::InitializeIteration();
 
   // set the gradient selection flag
-  MIRegistrationFunctionType *drfp = 
+  MIRegistrationFunctionType *drfp =
     dynamic_cast<MIRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to MIRegistrationFunction" );
    }
- 
+
   /*
    * Smooth the deformation field
    */
@@ -94,64 +94,64 @@ double
 MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::GetMetric() const
 {
- 
-  MIRegistrationFunctionType *drfp = 
+
+  MIRegistrationFunctionType *drfp =
     dynamic_cast<MIRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to MIRegistrationFunction" );
    }
-   
+
   return drfp->GetEnergy();
 
 }
 
 
 /*
- * 
+ *
  */
 template <class TFixedImage, class TMovingImage, class TDeformationField>
 typename MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>::RadiusType
 MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::GetMIRadius() const
 {
- 
-  MIRegistrationFunctionType *drfp = 
+
+  MIRegistrationFunctionType *drfp =
     dynamic_cast<MIRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to MIRegistrationFunction" );
    }
-   
+
   return drfp->GetRadius();
 
 }
 
 /*
- * 
+ *
  */
 template <class TFixedImage, class TMovingImage, class TDeformationField>
 void
 MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
-::SetMIRadius(RadiusType radius) 
+::SetMIRadius(RadiusType radius)
 {
- 
-  MIRegistrationFunctionType *drfp = 
+
+  MIRegistrationFunctionType *drfp =
     dynamic_cast<MIRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to MIRegistrationFunction" );
    }
-   
+
   drfp->SetRadius(radius);
 
 }
@@ -170,21 +170,21 @@ MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
     {
     this->SmoothUpdateField();
     }
-  
+
   this->Superclass::ApplyUpdate(dt);
 
-  MIRegistrationFunctionType *drfp = 
+  MIRegistrationFunctionType *drfp =
     dynamic_cast<MIRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to MIRegistrationFunction" );
    }
 
 //  this->SetRMSChange( drfp->GetRMSChange() );
-   
+
 }
 
 template <class TFixedImage, class TMovingImage, class TDeformationField>
@@ -193,25 +193,25 @@ MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::GenerateInputRequestedRegion()
 {
    // get pointers to the input and output
-  typename Superclass::FixedImagePointer fixedPtr = 
+  typename Superclass::FixedImagePointer fixedPtr =
       const_cast< TFixedImage * >( this->GetFixedImage() );
-  typename Superclass::MovingImagePointer movingPtr = 
+  typename Superclass::MovingImagePointer movingPtr =
       const_cast< TMovingImage * >( this->GetMovingImage() );
   typename TDeformationField::Pointer outputPtr = this->GetOutput();
-      
+
   if ( !fixedPtr || !movingPtr || !outputPtr )
   {
     return;
   }
-      
+
       // get a copy of the input requested region (should equal the output
       // requested region)
   typename TDeformationField::RegionType requestedRegion;
   requestedRegion = outputPtr->GetRequestedRegion();
-      
+
       // pad the input requested region by the operator radius
   requestedRegion.PadByRadius( this->GetMIRadius() );
-      
+
       // crop the input requested region at the input's largest possible region
   if ( requestedRegion.Crop(fixedPtr->GetLargestPossibleRegion()))
   {
@@ -225,27 +225,27 @@ MIRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
     {
         // Couldn't crop the region (requested region is outside the largest
     // possible region).  Throw an exception.
-    
+
     // store what we tried to request (prior to trying to crop)
       movingPtr->SetRequestedRegion( requestedRegion );
-    
+
     // build an exception
       itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
       e.SetLocation(ITK_LOCATION);
       e.SetDescription("Requested region is (at least partially) outside the largest possible region of the moving image.");
       e.SetDataObject(movingPtr);
       throw e;
-        
+
     }
   }
   else
   {
     // Couldn't crop the region (requested region is outside the largest
     // possible region).  Throw an exception.
-    
+
     // store what we tried to request (prior to trying to crop)
     fixedPtr->SetRequestedRegion( requestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     e.SetLocation(ITK_LOCATION);
diff --git a/Code/DisparityMap/otbNCCRegistrationFilter.h b/Code/DisparityMap/otbNCCRegistrationFilter.h
index 1cfe2bf80d..7d092d3e08 100644
--- a/Code/DisparityMap/otbNCCRegistrationFilter.h
+++ b/Code/DisparityMap/otbNCCRegistrationFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,8 +27,8 @@ namespace otb {
 /** \class NCCRegistrationFilter
  * \brief Deformably register two images using the PDEs and NCC.
  *
- * NCCRegistrationFilter implements the ####### 
- * register two images by computing the deformation field which will map a 
+ * NCCRegistrationFilter implements the #######
+ * register two images by computing the deformation field which will map a
  * moving image onto a fixed image.
  *
  * A deformation field is represented as a image whose pixel type is some
@@ -55,16 +55,16 @@ namespace otb {
  *
  * \warning This filter assumes that the fixed image type, moving image type
  * and deformation field type all have the same number of dimensions.
- * 
- * \sa NCCRegistrationFunction 
+ *
+ * \sa NCCRegistrationFunction
  * \ingroup DeformableImageRegistration MultiThreaded
  *
  * \example  DisparityMap/NCCRegistrationFilterExample.cxx
- * 
- * 
+ *
+ *
  */
 template<class TFixedImage, class TMovingImage, class TDeformationField>
-class ITK_EXPORT NCCRegistrationFilter : 
+class ITK_EXPORT NCCRegistrationFilter :
     public itk::PDEDeformableRegistrationFilter< TFixedImage, TMovingImage,
                                             TDeformationField>
 {
@@ -80,7 +80,7 @@ public:
   itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
-  itkTypeMacro( NCCRegistrationFilter, 
+  itkTypeMacro( NCCRegistrationFilter,
                 itk::PDEDeformableRegistrationFilter );
 
   /** Inherit types from superclass. */
@@ -93,11 +93,11 @@ public:
   /** MovingImage image type. */
   typedef typename Superclass::MovingImageType    MovingImageType;
   typedef typename Superclass::MovingImagePointer  MovingImagePointer;
-  
+
   /** Deformation field type. */
-  typedef typename Superclass::DeformationFieldType 
+  typedef typename Superclass::DeformationFieldType
   DeformationFieldType;
-  typedef typename Superclass::DeformationFieldPointer  
+  typedef typename Superclass::DeformationFieldPointer
   DeformationFieldPointer;
 
   /** FiniteDifferenceFunction type. */
@@ -109,11 +109,11 @@ public:
                                      DeformationFieldType>  NCCRegistrationFunctionType;
 
   typedef typename NCCRegistrationFunctionType::RadiusType RadiusType;
-  
+
   /** Get the metric value. The metric value is computed over the the
    * overlapping region between the two images.  This is value is only
    * available for the previous iteration and NOT the current
-   * iteration. 
+   * iteration.
    *\return metric
    **/
   virtual double GetMetric() const;
@@ -123,13 +123,13 @@ public:
    * \param radius
    */
   virtual void SetNCCRadius(RadiusType radius);
-  
+
   /**
    * Get the radius.
    * \return radius.
    **/
   virtual RadiusType GetNCCRadius() const;
-  
+
 protected:
   NCCRegistrationFilter();
   ~NCCRegistrationFilter() {}
@@ -140,8 +140,8 @@ protected:
 
   /** Apply update. */
   virtual void ApplyUpdate(TimeStepType dt);
-  
-  
+
+
   /** Update the Input requested region. */
   virtual void GenerateInputRequestedRegion();
 
diff --git a/Code/DisparityMap/otbNCCRegistrationFilter.txx b/Code/DisparityMap/otbNCCRegistrationFilter.txx
index e692568ddc..e02cb3df7a 100644
--- a/Code/DisparityMap/otbNCCRegistrationFilter.txx
+++ b/Code/DisparityMap/otbNCCRegistrationFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,12 +29,12 @@ template <class TFixedImage, class TMovingImage, class TDeformationField>
 NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::NCCRegistrationFilter()
 {
- 
+
   typename NCCRegistrationFunctionType::Pointer drfp;
   drfp = NCCRegistrationFunctionType::New();
 
   drfp->SetDeformationField( this->GetDeformationField() );
-  
+
   this->SetDifferenceFunction( static_cast<FiniteDifferenceFunctionType *>(
                                  drfp.GetPointer() ) );
 
@@ -45,7 +45,7 @@ template <class TFixedImage, class TMovingImage, class TDeformationField>
 void
 NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
-{ 
+{
   Superclass::PrintSelf( os, indent );
    os << indent << "NCC Radius: " <<
     this->GetNCCRadius() << std::endl;
@@ -60,18 +60,18 @@ void
 NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::InitializeIteration()
 {
- 
+
   // call the superclass  implementation
   Superclass::InitializeIteration();
 
   // set the gradient selection flag
-  NCCRegistrationFunctionType *drfp = 
+  NCCRegistrationFunctionType *drfp =
     dynamic_cast<NCCRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to NCCRegistrationFunction" );
    }
 
@@ -95,94 +95,94 @@ double
 NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::GetMetric() const
 {
- 
-  NCCRegistrationFunctionType *drfp = 
+
+  NCCRegistrationFunctionType *drfp =
     dynamic_cast<NCCRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to NCCRegistrationFunction" );
    }
-   
+
   return drfp->GetEnergy();
 
 }
 
 
 /*
- * 
+ *
  */
 template <class TFixedImage, class TMovingImage, class TDeformationField>
 typename NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>::RadiusType
 NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::GetNCCRadius() const
 {
- 
-  NCCRegistrationFunctionType *drfp = 
+
+  NCCRegistrationFunctionType *drfp =
     dynamic_cast<NCCRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to NCCRegistrationFunction" );
    }
-   
+
   return drfp->GetRadius();
 
 }
 
 /*
- * 
+ *
  */
 template <class TFixedImage, class TMovingImage, class TDeformationField>
 void
 NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
-::SetNCCRadius(RadiusType radius) 
+::SetNCCRadius(RadiusType radius)
 {
- 
-  NCCRegistrationFunctionType *drfp = 
+
+  NCCRegistrationFunctionType *drfp =
     dynamic_cast<NCCRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to NCCRegistrationFunction" );
    }
-   
+
   drfp->SetRadius(radius);
 
   this->Modified();
 }
 
 template <class TFixedImage, class TMovingImage, class TDeformationField>
-void 
-NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>    
+void
+NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
 ::GenerateInputRequestedRegion()
 {
    // get pointers to the input and output
-  typename Superclass::FixedImagePointer fixedPtr = 
+  typename Superclass::FixedImagePointer fixedPtr =
       const_cast< TFixedImage * >( this->GetFixedImage() );
-  typename Superclass::MovingImagePointer movingPtr = 
+  typename Superclass::MovingImagePointer movingPtr =
       const_cast< TMovingImage * >( this->GetMovingImage() );
   typename TDeformationField::Pointer outputPtr = this->GetOutput();
-      
+
   if ( !fixedPtr || !movingPtr || !outputPtr )
   {
     return;
   }
-      
+
       // get a copy of the input requested region (should equal the output
       // requested region)
   typename TDeformationField::RegionType requestedRegion;
   requestedRegion = outputPtr->GetRequestedRegion();
-      
+
       // pad the input requested region by the operator radius
   requestedRegion.PadByRadius( this->GetNCCRadius() );
-      
+
       // crop the input requested region at the input's largest possible region
   if ( requestedRegion.Crop(fixedPtr->GetLargestPossibleRegion()))
   {
@@ -196,27 +196,27 @@ NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
     {
         // Couldn't crop the region (requested region is outside the largest
     // possible region).  Throw an exception.
-    
+
     // store what we tried to request (prior to trying to crop)
       movingPtr->SetRequestedRegion( requestedRegion );
-    
+
     // build an exception
       itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
       e.SetLocation(ITK_LOCATION);
       e.SetDescription("Requested region is (at least partially) outside the largest possible region of the moving image.");
       e.SetDataObject(movingPtr);
       throw e;
-        
+
     }
   }
   else
   {
     // Couldn't crop the region (requested region is outside the largest
     // possible region).  Throw an exception.
-    
+
     // store what we tried to request (prior to trying to crop)
     fixedPtr->SetRequestedRegion( requestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     e.SetLocation(ITK_LOCATION);
@@ -243,18 +243,18 @@ NCCRegistrationFilter<TFixedImage,TMovingImage,TDeformationField>
   */
   this->Superclass::ApplyUpdate(dt);
 
-  NCCRegistrationFunctionType *drfp = 
+  NCCRegistrationFunctionType *drfp =
     dynamic_cast<NCCRegistrationFunctionType *>
       (this->GetDifferenceFunction().GetPointer());
- 
+
   if( !drfp )
    {
-   itkExceptionMacro( << 
+   itkExceptionMacro( <<
      "Could not cast difference function to NCCRegistrationFunction" );
    }
 
 //  this->SetRMSChange( drfp->GetRMSChange() );
-   
+
 }
 
 
diff --git a/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.h b/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.h
index 1b14b3ff6b..1b4018d620 100644
--- a/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -36,13 +36,13 @@ class ITK_EXPORT NNearestPointsLinearInterpolateDeformationFieldGenerator
   typedef PointSetToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(NNearestPointsLinearInterpolateDeformationFieldGenerator,PointSetToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PointSetType PointSetType;
   typedef typename Superclass::PointSetPointerType PointSetPointerType;
diff --git a/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.txx b/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.txx
index 417a821c21..755e0f5908 100644
--- a/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbNNearestPointsLinearInterpolateDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ NNearestPointsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeformation
 
   typedef itk::ImageRegionIteratorWithIndex<DeformationFieldType> IteratorType;
   IteratorType it(outputPtr,outputPtr->GetRequestedRegion());
-  
+
   for(it.GoToBegin();!it.IsAtEnd();++it)
     {
       IndexType index = it.GetIndex();
@@ -50,7 +50,7 @@ NNearestPointsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeformation
       xdeformation = 0;
       ydeformation = 0;
       normalization = 0;
-      
+
       for(typename IndexVectorType::iterator indexIt=indexVector.begin();indexIt!=indexVector.end();++indexIt)
 	{
 	  PointType point;
@@ -63,7 +63,7 @@ NNearestPointsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeformation
 	    }
 	  xdeformation +=  this->GetPointSet()->GetPointData()->GetElement((*indexIt))[1]/distance;
 	  ydeformation +=  this->GetPointSet()->GetPointData()->GetElement((*indexIt))[2]/distance;
-	  normalization+=1/distance;	      
+	  normalization+=1/distance;
 	}
 
       if(normalization>0)
diff --git a/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.h b/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.h
index 8918660cab..169ba3259d 100644
--- a/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@ namespace otb
 {
 /** \class NNearestTransformsLinearInterpolateDeformationFieldGenerator
  *  \brief This class generate the deformation field by performing a linear interpolation of the deformations from the transforms induced by the n nearest points.
- * \ingroup 
+ * \ingroup
  * \ingroup
  */
 template <class TPointSet, class TDeformationField>
@@ -37,13 +37,13 @@ class ITK_EXPORT NNearestTransformsLinearInterpolateDeformationFieldGenerator
   typedef PointSetWithTransformToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(NNearestTransformsLinearInterpolateDeformationFieldGenerator,PointSetWithTransformsToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PointSetType PointSetType;
   typedef typename Superclass::PointSetPointerType PointSetPointerType;
diff --git a/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.txx b/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.txx
index bb87df0b8f..2d22f3905b 100644
--- a/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbNNearestTransformsLinearInterpolateDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ NNearestTransformsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeforma
 
   typedef itk::ImageRegionIteratorWithIndex<DeformationFieldType> IteratorType;
   IteratorType it(outputPtr,outputPtr->GetRequestedRegion());
-  
+
   for(it.GoToBegin();!it.IsAtEnd();++it)
     {
       IndexType index = it.GetIndex();
@@ -50,7 +50,7 @@ NNearestTransformsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeforma
       xdeformation = 0;
       ydeformation = 0;
       normalization = 0;
-      
+
       for(typename IndexVectorType::iterator indexIt=indexVector.begin();indexIt!=indexVector.end();++indexIt)
 	{
 	  PointType point;
@@ -61,7 +61,7 @@ NNearestTransformsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeforma
 	    {
 	      distance = EPSILON;
 	    }
-	  
+
 	   ParametersType params(this->GetTransform()->GetNumberOfParameters());
 	   for(unsigned int  i = 0; i<this->GetTransform()->GetNumberOfParameters();++i)
 	    {
@@ -69,12 +69,12 @@ NNearestTransformsLinearInterpolateDeformationFieldGenerator<TPointSet, TDeforma
 	    }
 	  this->GetTransform()->SetParameters(params);
 	  PointType sourcePoint,targetPoint;
-	  
+
 	  outputPtr->TransformIndexToPhysicalPoint(it.GetIndex(),sourcePoint);
 	  targetPoint = this->GetTransform()->TransformPoint(sourcePoint);
 	  xdeformation += (targetPoint[0]-sourcePoint[0])/distance;
 	  ydeformation += (targetPoint[1]-sourcePoint[1]) /distance;
-	  normalization+=1/distance;	      
+	  normalization+=1/distance;
 	}
 
       if(normalization>0)
diff --git a/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.h b/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.h
index 809c33da5e..cea13d5aee 100644
--- a/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ namespace otb
 /** \class NearestPointDeformationFieldGenerator
  *  \brief This class implements the simplest way to deformation field generation using a point set.
  *  In each pixel location, the deformation is considered to be the deformation of the nearest seed point in the point set.
- * 
+ *
  * \ingroup DisparityMap
  */
 template <class TPointSet, class TDeformationField>
@@ -38,13 +38,13 @@ class ITK_EXPORT NearestPointDeformationFieldGenerator
   typedef PointSetToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(NearestPointDeformationFieldGenerator,PointSetToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PointSetType PointSetType;
   typedef typename Superclass::PointSetPointerType PointSetPointerType;
diff --git a/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.txx b/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.txx
index 1fe7735266..e03b5237f8 100644
--- a/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbNearestPointDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -38,7 +38,7 @@ NearestPointDeformationFieldGenerator<TPointSet, TDeformationField>
 
   typedef itk::ImageRegionIteratorWithIndex<DeformationFieldType> IteratorType;
   IteratorType it(outputPtr,outputPtr->GetRequestedRegion());
-  
+
   for(it.GoToBegin();!it.IsAtEnd();++it)
     {
        IndexVectorType indexVector = this->GenerateNearestValidPointsPointSet(it.GetIndex(),1);
diff --git a/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.h b/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.h
index e9f7702dd2..0cfaea4d9c 100644
--- a/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ namespace otb
 /** \class NearestTransformDeformationFieldGenerator
  *  \brief This class implements deformation field generation by taking into account the local transform of the
  *  nearest point in pointset.
- * 
+ *
  * \ingroup DisparityMap
  */
 template <class TPointSet, class TDeformationField>
@@ -38,13 +38,13 @@ class ITK_EXPORT NearestTransformDeformationFieldGenerator
   typedef PointSetWithTransformToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(NearestTransformDeformationFieldGenerator,PointSetWithTransformToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PointSetType PointSetType;
   typedef typename Superclass::PointSetPointerType PointSetPointerType;
diff --git a/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.txx b/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.txx
index bbb4427d81..90e5853958 100644
--- a/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbNearestTransformDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -38,7 +38,7 @@ NearestTransformDeformationFieldGenerator<TPointSet, TDeformationField>
 
   typedef itk::ImageRegionIteratorWithIndex<DeformationFieldType> IteratorType;
   IteratorType it(outputPtr,outputPtr->GetRequestedRegion());
-  
+
   for(it.GoToBegin();!it.IsAtEnd();++it)
     {
        IndexVectorType indexVector = this->GenerateNearestValidPointsPointSet(it.GetIndex(),1);
@@ -52,7 +52,7 @@ NearestTransformDeformationFieldGenerator<TPointSet, TDeformationField>
 	    }
 	  this->GetTransform()->SetParameters(params);
 	  PointType sourcePoint,targetPoint;
-	  
+
 	  outputPtr->TransformIndexToPhysicalPoint(it.GetIndex(),sourcePoint);
 	  targetPoint = this->GetTransform()->TransformPoint(sourcePoint);
  	  pixel[0] = static_cast<ValueType>(targetPoint[0]-sourcePoint[0]);
diff --git a/Code/DisparityMap/otbPointSetBasedResamplingFilter.h b/Code/DisparityMap/otbPointSetBasedResamplingFilter.h
index 36b0b70094..0110f46e93 100644
--- a/Code/DisparityMap/otbPointSetBasedResamplingFilter.h
+++ b/Code/DisparityMap/otbPointSetBasedResamplingFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class PointSetBasedResamplingFilter
- *  \brief 
+ *  \brief
  *
  * \ingroup DisparityMap
  */
@@ -40,13 +40,13 @@ class ITK_EXPORT PointSetBasedResamplingFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PointSetBasedResamplingFilter,ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
@@ -73,7 +73,7 @@ class ITK_EXPORT PointSetBasedResamplingFilter
   typedef itk::DataObjectDecorator<TransformType> TransformOutputType;
   typedef typename TransformOutputType::Pointer TransformOutputPointerType;
   typedef typename TransformOutputType::ConstPointer TransformOutputConstPointerType;
- 
+
   /**
    * Set the pointset containing the disparity.
    * \param pointset The pointset containing the disparity.
@@ -93,15 +93,15 @@ class ITK_EXPORT PointSetBasedResamplingFilter
    itkGetConstReferenceMacro(OutputSpacing,SpacingType);
    itkSetMacro(OutputOrigin,PointType);
    itkGetConstReferenceMacro(OutputOrigin,PointType);
-   
+
    /** Set/Get the Transfrom. */
    itkSetObjectMacro(Transform,TransformType);
    itkGetObjectMacro(Transform,TransformType);
-   
+
    /** Set/Get the Interpolator. */
    itkSetObjectMacro(Interpolator,InterpolatorType);
    itkGetObjectMacro(Interpolator,InterpolatorType);
-   
+
 protected:
   /** Constructor */
   PointSetBasedResamplingFilter();
@@ -109,13 +109,13 @@ protected:
   virtual ~PointSetBasedResamplingFilter() {};
  /**PrintSelf method */
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   /** Main computation method */
   virtual void GenerateData(void);
 
  /** Generate output information */
   virtual void GenerateOutputInformation(void);
-  /** 
+  /**
    * \return The parameters of the transform associated with the nearest suitable point in pointset.
    */
   ParametersType GetNearestPointTransformParameters(IndexType &index);
diff --git a/Code/DisparityMap/otbPointSetBasedResamplingFilter.txx b/Code/DisparityMap/otbPointSetBasedResamplingFilter.txx
index efa2232c5a..c81b41f71d 100644
--- a/Code/DisparityMap/otbPointSetBasedResamplingFilter.txx
+++ b/Code/DisparityMap/otbPointSetBasedResamplingFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -88,10 +88,10 @@ PointSetBasedResamplingFilter<TInputImage, TPointSet, TOutputImage>
   InputImageConstPointerType inputPtr = this->GetInput();
   outputPtr->FillBuffer(0);
   m_Interpolator->SetInputImage(inputPtr);
-  
+
   typedef itk::ImageRegionIteratorWithIndex<OutputImageType> IteratorType;
   IteratorType outputIt(outputPtr,outputPtr->GetRequestedRegion());
-  
+
   for(outputIt.GoToBegin();!outputIt.IsAtEnd();++outputIt)
     {
       PointType outputPoint,inputPoint;
@@ -115,7 +115,7 @@ PointSetBasedResamplingFilter<TInputImage, TPointSet, TOutputImage>
 	}
     }
 }
-/** 
+/**
  * \return The parameters of the transform associated with the nearest suitable point in pointset.
  */
 template <class TInputImage, class TPointSet, class TOutputImage>
@@ -152,7 +152,7 @@ PointSetBasedResamplingFilter<TInputImage, TPointSet, TOutputImage>
 	    }
 	  inputPoint[0] = it.Value()[0];
 	  inputPoint[1] = it.Value()[1];
-	  
+
 	  m_Transform->SetParameters(tmpParameters);
 	  outputPoint = m_Transform->TransformPoint(inputPoint);
 	  // compute the distance to current point
@@ -167,7 +167,7 @@ PointSetBasedResamplingFilter<TInputImage, TPointSet, TOutputImage>
     }
   return parameters;
 }
-    
+
 /**
  * PrintSelf Method
  */
diff --git a/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.h b/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.h
index 67a880dcde..75d49ce452 100644
--- a/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ namespace Functor
 	DistanceComparisonFunctor(){};
 	~DistanceComparisonFunctor(){};
 	typedef std::vector<double> DistanceVectorType;
-	
+
 	void SetDistanceVector(DistanceVectorType &vec)
 	  {
 	    m_DistanceVector = vec;
@@ -69,13 +69,13 @@ class ITK_EXPORT PointSetToDeformationFieldGenerator
   typedef itk::ImageSource<TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>             Pointer;
   typedef itk::SmartPointer<const Self>       ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PointSetToDeformationFieldGenerator, ImageSource);
-  
+
   /** Template parameters typedefs */
   typedef TPointSet PointSetType;
   typedef typename PointSetType::Pointer PointSetPointerType;
@@ -102,7 +102,7 @@ class ITK_EXPORT PointSetToDeformationFieldGenerator
    * \return The pointset containing the disparity.
    */
    const TPointSet * GetPointSet(void);
-  
+
 
    itkSetMacro(MetricThreshold,double);
    itkGetMacro(MetricThreshold,double);
@@ -114,7 +114,7 @@ class ITK_EXPORT PointSetToDeformationFieldGenerator
    itkGetConstReferenceMacro(OutputSpacing,SpacingType);
    itkSetMacro(OutputOrigin,PointType);
    itkGetConstReferenceMacro(OutputOrigin,PointType);
- 
+
 protected:
   /** Constructor */
   PointSetToDeformationFieldGenerator();
@@ -128,7 +128,7 @@ protected:
    * Generate the n nearest valid point in point set, where a valid point has a sufficient metric value.
    *  \param index The index of the pixel to compute.
    *  \param n The number of nearest point to seek.
-   *  \return A vector containing the index of the nearest point from nearest to most far. 
+   *  \return A vector containing the index of the nearest point from nearest to most far.
    */
   IndexVectorType GenerateNearestValidPointsPointSet(IndexType index, unsigned int n = 1);
 
@@ -138,7 +138,7 @@ protected:
 private:
   PointSetToDeformationFieldGenerator(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   /**
    * The threshold of metric value.
    */
diff --git a/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx b/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx
index 4326118381..2749b813a7 100644
--- a/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbPointSetToDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -82,7 +82,7 @@ PointSetToDeformationFieldGenerator<TPointSet, TDeformationField>
  * Generate the n nearest point in point set
  *  \param index The index of the pixel to compute.
  *  \param n The number of nearest point to seek.
- *  \return A vector containing the index of the nearest point from nearest to most far. 
+ *  \return A vector containing the index of the nearest point from nearest to most far.
  */
 template <class TPointSet, class TDeformationField>
 typename PointSetToDeformationFieldGenerator<TPointSet, TDeformationField>
@@ -96,7 +96,7 @@ PointSetToDeformationFieldGenerator<TPointSet, TDeformationField>
   IndexVectorType sortVector;
   unsigned int i =  0;
   unsigned int j = 0;
-  
+
   typedef typename PointSetType::PointsContainer::ConstIterator PointSetIteratorType;
   typedef typename PointSetType::PointsContainer PointsContainerType;
   PointSetIteratorType it = this->GetPointSet()->GetPoints()->Begin();
@@ -115,11 +115,11 @@ PointSetToDeformationFieldGenerator<TPointSet, TDeformationField>
 	}
       ++j;
     }
-  
+
   ComparisonFunctorType comp;
-  comp.SetDistanceVector(distanceVector); 
+  comp.SetDistanceVector(distanceVector);
   sort(sortVector.begin(),sortVector.end(),comp);
-  
+
   // building output vector
   unsigned int nbElements = (n<indexVector.size() ? n : indexVector.size());
   IndexVectorType output;
@@ -131,7 +131,7 @@ PointSetToDeformationFieldGenerator<TPointSet, TDeformationField>
 }
 
 template <class TPointSet, class TDeformationField>
-double 
+double
 PointSetToDeformationFieldGenerator<TPointSet, TDeformationField>
 ::EuclideanDistance(IndexType index, PointType p)
 {
diff --git a/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.h b/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.h
index fa2b39a321..26d2034b8a 100644
--- a/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.h
+++ b/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
  *  The output of the filters deriving from this base class can be passed to the itk::WarpImageFilter for image resampling.
  *  \sa DisparityMapEstimationMethod
  *   \sa itk::WarpImageFilter
- *  \ingroup 
+ *  \ingroup
  */
 template <class TPointSet, class TDeformationField>
 class ITK_EXPORT PointSetWithTransformToDeformationFieldGenerator
@@ -40,13 +40,13 @@ class ITK_EXPORT PointSetWithTransformToDeformationFieldGenerator
   typedef PointSetToDeformationFieldGenerator<TPointSet,TDeformationField> Superclass;
   typedef itk::SmartPointer<Self>             Pointer;
   typedef itk::SmartPointer<const Self>       ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PointSetWithTransformToDeformationFieldGenerator,PointSetToDeformationFieldGenerator);
-  
+
   /** Template parameters typedefs */
   typedef TPointSet PointSetType;
   typedef typename PointSetType::Pointer PointSetPointerType;
@@ -71,7 +71,7 @@ class ITK_EXPORT PointSetWithTransformToDeformationFieldGenerator
   /** Set/Get the Transfrom. */
   itkSetObjectMacro(Transform,TransformType);
   itkGetObjectMacro(Transform,TransformType);
-  
+
 protected:
   /** Constructor */
   PointSetWithTransformToDeformationFieldGenerator();
@@ -88,7 +88,7 @@ private:
    * The transform used for local registration.
    */
   TransformPointerType m_Transform;
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.txx b/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.txx
index beaee29e6a..8cbf8e624b 100644
--- a/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.txx
+++ b/Code/DisparityMap/otbPointSetWithTransformToDeformationFieldGenerator.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/DisparityMap/otbStreamingWarpImageFilter.h b/Code/DisparityMap/otbStreamingWarpImageFilter.h
index 9e5f4c2b7f..d9a9c53f67 100644
--- a/Code/DisparityMap/otbStreamingWarpImageFilter.h
+++ b/Code/DisparityMap/otbStreamingWarpImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,21 +30,21 @@ namespace otb
  * Instead, the user should assess the maximum deformation in the deformation field and set it via the SetMaximumDeformation() method.
  *
  * The filter will then compute an appropriate security margin according to the image spacing, the maximum deformation and the interpolator
- * radius in otb::StreamingTraits. 
- * 
+ * radius in otb::StreamingTraits.
+ *
  * This security margin is used to stream the input image, making this filter an entirely streamable one.
  *
  * If the maximum deformation is wrong, this filter is likely to request data outside of the input image buffered region. In this case, pixels
  * outside the region will be set to Zero according to itk::NumericTraits.
  *
  * \sa itk::WarpImageFilter
- * 
+ *
  * \ingroup Streamed
  * \ingroup Threaded
  */
 
 template <class TInputImage, class TOutputImage, class TDeformationField>
-class ITK_EXPORT StreamingWarpImageFilter 
+class ITK_EXPORT StreamingWarpImageFilter
   :  public itk::WarpImageFilter< TInputImage, TOutputImage, TDeformationField >
 {
 public:
@@ -59,7 +59,7 @@ public:
 
    /** Run-time type information (and related methods). */
   itkTypeMacro(StreamingWarpImageFilter, itk::WarpImageFilter);
-  
+
   /** template parameters typedef */
   typedef TInputImage                              InputImageType;
   typedef typename  InputImageType::Pointer        InputImagePointerType;
@@ -72,7 +72,7 @@ public:
   /** Accessors */
   itkSetMacro(MaximumDeformation,DeformationValueType);
   itkGetConstReferenceMacro(MaximumDeformation,DeformationValueType);
-  
+
 protected:
   /** Constructor */
   StreamingWarpImageFilter();
@@ -80,16 +80,16 @@ protected:
   virtual ~StreamingWarpImageFilter() {};
   /** PrintSelf */
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  /** 
+  /**
    * This filters requires only a part of the input and of the deformation field to
    * produce its output. As such, we need to overload the GenerateInputRequestedRegion() method.
    */
   virtual void GenerateInputRequestedRegion() ;
-	
+
 private:
   StreamingWarpImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-	
+
   // Assesment of the maximum deformation for streaming
   DeformationValueType m_MaximumDeformation;
 };
@@ -100,5 +100,5 @@ private:
 #include "otbStreamingWarpImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/DisparityMap/otbStreamingWarpImageFilter.txx b/Code/DisparityMap/otbStreamingWarpImageFilter.txx
index fc825a5efa..0b4cd45409 100644
--- a/Code/DisparityMap/otbStreamingWarpImageFilter.txx
+++ b/Code/DisparityMap/otbStreamingWarpImageFilter.txx
@@ -13,8 +13,8 @@
   for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 #include "otbStreamingWarpImageFilter.h"
 #include "otbStreamingTraits.h"
 
-namespace otb 
+namespace otb
 {
 
 template<class TInputImage, class TOutputImage, class TDeformationField>
@@ -53,7 +53,7 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField>
     {
       return;
     }
-  
+
   // Compute the security margin radius
   typename InputImageType::SizeType radius;
   typename InputImageType::SpacingType spacing = inputPtr->GetSpacing();
@@ -68,7 +68,7 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField>
     }
 
   otbMsgDevMacro(<<"WarpImageFilter: MaximumDeformation: "<<m_MaximumDeformation<<", interpolator radius: "<<interpolatorRadius<<", total radius:  "<<radius);
-  
+
   // get a copy of the input requested region (should equal the output
   // requested region)
   typename DeformationFieldType::RegionType inputRequestedRegion;
@@ -90,7 +90,7 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField>
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     e.SetLocation(ITK_LOCATION);
@@ -101,7 +101,7 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField>
 }
 
 template<class TInputImage, class TOutputImage, class TDeformationField>
-void 
+void
 StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbAddCarvingPathFilter.h b/Code/FeatureExtraction/otbAddCarvingPathFilter.h
index 993e949118..fcb619afc1 100644
--- a/Code/FeatureExtraction/otbAddCarvingPathFilter.h
+++ b/Code/FeatureExtraction/otbAddCarvingPathFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,31 +26,31 @@ namespace otb
 {
 /** \class AddCarvingPathFilter
  * \brief This class add pixels given in one path
- * 
- * This filter add pixels found by the otb::ImageToCarvingPathFilter 
+ *
+ * This filter add pixels found by the otb::ImageToCarvingPathFilter
  * thus increasing the image size.
-  * the image (if Direction is set to 0) or from left to right 
+  * the image (if Direction is set to 0) or from left to right
   * (if direction is set to 1). Pixel value is computed as the average
  * between the neighborhood pixels.
-  * 
+  *
   * This is one component necessary to apply the seam carving algorithm
   * published by Shai Avidan, Ariel Shamir,
   * Seam Carving for Content-Aware Image Resizing,
-  * ACM Transactions on Graphics, Volume 26, Number 3,  
+  * ACM Transactions on Graphics, Volume 26, Number 3,
   * SIGGRAPH 2007
-  * 
+  *
   * \par INPUTS
-   * The first input is an image, usually, the same one provided to the 
+   * The first input is an image, usually, the same one provided to the
  * otb::ImageToCarvingPathFilter
-   * The second input is a path, typically the output of otb::ImageToCarvingPathFilter. 
-  * 
+   * The second input is a path, typically the output of otb::ImageToCarvingPathFilter.
+  *
   * \par OUTPUTS
   * The output is an image with a bigger size than the input image. There is one more
  * column if direction is 0 and one more line if direction is 1.
-  * 
+  *
   * \sa ImageToCarvingPathFilter
-  * 
-  * 
+  *
+  *
   * \ingroup PathFilters
   * \ingroup ImageFilters
   */
@@ -68,7 +68,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(AddCarvingPathFilter, itk::ImageAndPathToImageFilter);
 
@@ -76,8 +76,8 @@ public:
   typedef          TInputImage                    InputImageType;
   typedef typename InputImageType::Pointer        InputImagePointer;
   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
-  typedef typename InputImageType::RegionType     InputImageRegionType; 
-  typedef typename InputImageType::PixelType      InputImagePixelType; 
+  typedef typename InputImageType::RegionType     InputImageRegionType;
+  typedef typename InputImageType::PixelType      InputImagePixelType;
   typedef          TInputPath                     InputPathType;
   typedef typename InputPathType::Pointer         InputPathPointer;
   typedef typename InputPathType::ConstPointer    InputPathConstPointer;
@@ -88,39 +88,39 @@ public:
   typedef          TOutputImage                   OutputImageType;
   typedef typename OutputImageType::Pointer       OutputImagePointer;
   typedef typename OutputImageType::ConstPointer  OutputImageConstPointer;
-  
-  typedef typename OutputImageType::RegionType    OutputImageRegionType; 
-  typedef typename OutputImageType::PixelType     OutputImagePixelType; 
-  typedef typename OutputImageType::ValueType     OutputImageValueType; 
-  
+
+  typedef typename OutputImageType::RegionType    OutputImageRegionType;
+  typedef typename OutputImageType::PixelType     OutputImagePixelType;
+  typedef typename OutputImageType::ValueType     OutputImageValueType;
+
 //   typedef typename itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
 //   typedef typename itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
   typedef typename itk::ImageSliceConstIteratorWithIndex<InputImageType> InputIteratorType;
   typedef typename itk::ImageSliceIteratorWithIndex<OutputImageType> OutputIteratorType;
-  
+
   /** Set/Get the path input of this process object.
     Note: these methods are adding to get the proper name */
   void SetInputPath( const TInputPath * path);
-  
+
   const TInputPath * GetInputPath(void);
 
   itkSetMacro(Value, OutputImagePixelType);
   itkGetConstReferenceMacro(Value, OutputImagePixelType);
-  
+
   /** Set and Get direction value */
   itkSetMacro(Direction ,unsigned int);
   itkGetConstMacro(Direction ,unsigned int);
-  
+
   virtual void GenerateOutputInformation();
   virtual void GenerateInputRequestedRegion();
-  
+
 protected:
   AddCarvingPathFilter();
   virtual ~AddCarvingPathFilter() {};
 
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
   virtual void GenerateData();
- 
+
 private:
   AddCarvingPathFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -136,4 +136,4 @@ private:
 #endif
 
 #endif
- 
+
diff --git a/Code/FeatureExtraction/otbAddCarvingPathFilter.txx b/Code/FeatureExtraction/otbAddCarvingPathFilter.txx
index c3910c49c4..3ec07255a4 100644
--- a/Code/FeatureExtraction/otbAddCarvingPathFilter.txx
+++ b/Code/FeatureExtraction/otbAddCarvingPathFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -56,24 +56,24 @@ template <class TInputImage, class TInputPath,class TOutputImage>
 void
 AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
 ::GenerateData(void)
-{  
-  
+{
+
   const InputImageType * inputImage = this->GetImageInput();
   const InputPathType * inputPath = this->GetPathInput();
   OutputImageType * outputImage = this->GetOutput();
-  
+
   outputImage->SetBufferedRegion( outputImage->GetRequestedRegion() );
   outputImage->Allocate();
-  
-  
-  InputIteratorType inputIterator(inputImage, 
+
+
+  InputIteratorType inputIterator(inputImage,
                                   inputImage->GetLargestPossibleRegion());
-  OutputIteratorType outputIterator(outputImage, 
+  OutputIteratorType outputIterator(outputImage,
                                   outputImage->GetLargestPossibleRegion());
-  
+
   unsigned int dir0;
   unsigned int dir1;
-  
+
   if (m_Direction == 0)
   {
     dir0=0;
@@ -84,24 +84,24 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
     dir0=1;
     dir1=0;
   }
-  
+
   inputIterator.SetFirstDirection( dir0 );
   inputIterator.SetSecondDirection( dir1 );
   inputIterator.GoToBegin();
   outputIterator.SetFirstDirection( dir0 );
   outputIterator.SetSecondDirection( dir1 );
   outputIterator.GoToBegin();
-  
+
   int line=-1;
   typename InputImageType::IndexType index;
   typename InputPathType::VertexListType::ConstPointer vertexList = inputPath->GetVertexList();
   typename InputPathType::VertexListType::ConstIterator pathIterator;
   typename InputImageType::IndexType indexToAdd;
   typedef typename InputImageType::IndexType::IndexValueType IndexValueType;
-  
+
   typename InputImageType::SizeType inputSize;
   inputSize = inputImage->GetLargestPossibleRegion().GetSize();
-  
+
   //go to the end of the path
   pathIterator = vertexList->Begin();
   while(pathIterator != vertexList->End())
@@ -109,7 +109,7 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
     ++pathIterator;
   }
   --pathIterator;
-  
+
   while (!outputIterator.IsAtEnd())
   {
     while (!outputIterator.IsAtEndOfSlice())
@@ -118,7 +118,7 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
       while(!outputIterator.IsAtEndOfLine())
       {
         index = outputIterator.GetIndex();
-        
+
         if(index[dir1] != line)
         {
           line = index[dir1];
@@ -133,8 +133,8 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
           {
             itkExceptionMacro(<< "Error : " << index[dir1] << " , " << indexToAdd[dir1]);
           }
-        } 
-        
+        }
+
         if ( (flag==true) || ((index[dir0] != indexToAdd[dir0]) && (index[dir0] < static_cast<IndexValueType>(inputSize[dir0]))))
         {
           outputIterator.Set(inputIterator.Get());
@@ -151,9 +151,9 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
           outputIterator.Set(newValue);
         }
         ++outputIterator;
-        
+
       }
-      
+
       if((outputIterator.GetIndex())[dir0] != (inputIterator.GetIndex())[dir0]+1)
       {
         itkExceptionMacro(<< "Error 2: "<< (outputIterator.GetIndex())[dir0] <<  " , " << (inputIterator.GetIndex())[dir0]);
@@ -164,8 +164,8 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
     inputIterator.NextSlice();
     outputIterator.NextSlice();
   }
-  
-  
+
+
 }
 
 
@@ -184,7 +184,7 @@ AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
 
 
 template <class TInputImage, class TInputPath,class TOutputImage>
-    void 
+    void
         AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
   ::GenerateOutputInformation()
 {
@@ -194,10 +194,10 @@ template <class TInputImage, class TInputPath,class TOutputImage>
   // get pointers to the input and output
   typename Superclass::InputImageConstPointer inputPtr = this->GetInput();
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   unsigned int dir0;
   unsigned int dir1;
-  
+
   if (m_Direction == 0)
   {
     dir0=0;
@@ -208,7 +208,7 @@ template <class TInputImage, class TInputPath,class TOutputImage>
     dir0=1;
     dir1=0;
   }
-  
+
   // we need to compute the output spacing, the output image size, and the
   // output image start index
   const typename TInputImage::SpacingType&
@@ -221,7 +221,7 @@ template <class TInputImage, class TInputPath,class TOutputImage>
   typename TOutputImage::SpacingType      outputSpacing;
   typename TOutputImage::SizeType         outputSize;
   typename TOutputImage::IndexType        outputStartIndex;
-  
+
   for (unsigned int i = 0; i < TOutputImage::ImageDimension; i++)
   {
     outputSpacing[i] = inputSpacing[i];
@@ -230,7 +230,7 @@ template <class TInputImage, class TInputPath,class TOutputImage>
   }
   // we remove one column of the image
   outputSize[dir0] = inputSize[dir0] + 1;
-  
+
 
   outputPtr->SetSpacing( outputSpacing );
 
@@ -242,25 +242,25 @@ template <class TInputImage, class TInputPath,class TOutputImage>
 }
 
 template <class TInputImage, class TInputPath,class TOutputImage>
-    void 
+    void
         AddCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
   ::GenerateInputRequestedRegion()
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
   // get pointers to the input and output
-  InputImagePointer  inputPtr = 
+  InputImagePointer  inputPtr =
   const_cast< InputImageType * >( this->GetInput() );
   if ( !inputPtr )
   {
     itkExceptionMacro( << "Input has not been set." );
   }
-  
+
   inputPtr->SetRequestedRegion( inputPtr->GetLargestPossibleRegion() );
-  
+
 }
-  
+
 } // end namespace otb
 
 #endif
- 
+
diff --git a/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h b/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h
index cdd3148393..5309487fe8 100644
--- a/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h
+++ b/Code/FeatureExtraction/otbAssociativeSymmetricalSumImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,23 +22,23 @@
 
 namespace otb
 {
-  
+
 /** \class AssociativeSymmetricalSumImageFilter
  * \brief Implements an assymetric fusion of line detector image filter.
  *
  * This class implements a fusion of the output images of
  * otb::LineRatioDetector and otb::LineCorrelationDetector
  *
- * The associative symmetrical sum \f$ \sigma(x,y) \f$ is used to merge information from the 
+ * The associative symmetrical sum \f$ \sigma(x,y) \f$ is used to merge information from the
  * two detectors:
  	\f[ \sigma(x,y)=\frac{xy}{1-x-y+2xy} \f] with \f$ x,y \in [0,1] \f$.
- * 
- * 
+ *
+ *
  */
 
 
-namespace Functor 
-{  
+namespace Functor
+{
   /** \class AssociativeSymmetricalSum
    * \brief Functor used with the AssociativeSymmetricalSumImageFilter.
    */
@@ -48,13 +48,13 @@ class ITK_EXPORT AssociativeSymmetricalSum
 public:
   AssociativeSymmetricalSum() {};
   ~AssociativeSymmetricalSum() {};
- 
-  inline TOutput operator()( const TInput1 X, 
+
+  inline TOutput operator()( const TInput1 X,
                              const TInput2 Y)
   {
-    
+
     TOutput SumXY = 0.;
-      
+
     SumXY += static_cast<TOutput>((X*Y)/(1.-X-Y+(2*X*Y)));
 
     return ( SumXY );
@@ -65,27 +65,27 @@ public:
 template <class TInputImage1, class TInputImage2, class TOutputImage>
 class ITK_EXPORT AssociativeSymmetricalSumImageFilter :
     public
-itk::BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
-                         Functor::AssociativeSymmetricalSum< 
-  typename TInputImage1::PixelType, 
+itk::BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
+                         Functor::AssociativeSymmetricalSum<
+  typename TInputImage1::PixelType,
   typename TInputImage2::PixelType,
   typename TOutputImage::PixelType>   >
 {
 public:
   /** Standard class typedefs. */
   typedef AssociativeSymmetricalSumImageFilter  Self;
-  typedef itk::BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage, 
-                                   Functor::AssociativeSymmetricalSum< 
-    typename TInputImage1::PixelType, 
+  typedef itk::BinaryFunctorImageFilter<TInputImage1,TInputImage2,TOutputImage,
+                                   Functor::AssociativeSymmetricalSum<
     typename TInputImage1::PixelType,
-    typename TOutputImage::PixelType>   
+    typename TInputImage1::PixelType,
+    typename TOutputImage::PixelType>
   > Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
 protected:
   AssociativeSymmetricalSumImageFilter() {}
   virtual ~AssociativeSymmetricalSumImageFilter() {}
diff --git a/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.h b/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.h
index abf4131bac..3fe29c73b1 100644
--- a/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.h
+++ b/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,16 +33,16 @@ namespace otb
  *
  * This class implements a composite filter that combines three filters:
  * two filters of line detector ( a line detector by ratio and a line
- * detector by croos-correlation) and a filter that produces a fusion of  
+ * detector by croos-correlation) and a filter that produces a fusion of
  * those two line detector filters.
  *
  */
 
-template <class TInputImage, 
-	  class TOutputImage, 
+template <class TInputImage,
+	  class TOutputImage,
           class TOutputImageDirection = TOutputImage,
 	  class TInterpolator = itk::LinearInterpolateImageFunction<TInputImage> >
-class ITK_EXPORT AssymmetricFusionOfLineDetectorImageFilter : 
+class ITK_EXPORT AssymmetricFusionOfLineDetectorImageFilter :
     public LineDetectorImageFilterBase< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >
 {
 public:
@@ -50,7 +50,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -62,12 +62,12 @@ public:
   itkNewMacro(Self);
 
   itkTypeMacro(AssymmetricFusionOfLineDetectorImageFilter, LineDetectorImageFilterBase);
-  
+
   typedef typename Superclass::InputImageType 			InputImageType;
   typedef typename Superclass::OutputImageType			OutputImageType;
   typedef typename Superclass::OutputImageDirectionType 	OutputImageDirectionType;
   typedef typename Superclass::InterpolatorType                 InterpolatorType;
-  
+
   typedef OutputImageType InputImageType1;
   typedef OutputImageType InputImageType2;
 
@@ -75,25 +75,25 @@ public:
   typedef typename InputImageType::SizeType SizeType;
 
   typedef typename OutputImageType::PixelType OutputPixelType;
- 
+
 
 protected:
   AssymmetricFusionOfLineDetectorImageFilter();
   virtual ~AssymmetricFusionOfLineDetectorImageFilter() {};
-  
+
   typedef otb::LineRatioDetectorImageFilter< InputImageType, OutputImageType, OutputImageDirectionType, InterpolatorType > 	LineRatioType;
   typedef otb::LineCorrelationDetectorImageFilter< InputImageType, OutputImageType, OutputImageDirectionType, InterpolatorType > LineCorrelationType;
   typedef otb::AssociativeSymmetricalSumImageFilter< InputImageType1, InputImageType2, OutputImageType > AssSymSumType;
 
   virtual void GenerateData();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
   AssymmetricFusionOfLineDetectorImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-  
+
   typename LineRatioType::Pointer	m_LineRatio;
   typename LineCorrelationType::Pointer	m_LineCorrelation;
   typename AssSymSumType::Pointer	m_AssSymSum;
@@ -104,5 +104,5 @@ private:
 #include "otbAssymmetricFusionOfLineDetectorImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.txx b/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.txx
index dacfd27183..c686c18ff7 100644
--- a/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbAssymmetricFusionOfLineDetectorImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ AssymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputIma
   this->m_Radius.Fill(1);
   this->m_LengthLine = 1;
   this->m_WidthLine = 0;
-  
+
   m_LineRatio         = LineRatioType::New();
   m_LineCorrelation   = LineCorrelationType::New();
   m_AssSymSum         = AssSymSumType::New();
@@ -51,12 +51,12 @@ AssymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputIma
 
   m_LineCorrelation->SetInput( this->GetInput() );
   m_LineCorrelation->SetLengthLine( this->m_LengthLine );
-  m_LineCorrelation->SetWidthLine( this->m_WidthLine );  
+  m_LineCorrelation->SetWidthLine( this->m_WidthLine );
 
   m_AssSymSum->SetInput1( m_LineRatio->GetOutput() );
   m_AssSymSum->SetInput2( m_LineCorrelation->GetOutput() );
-  
-  m_AssSymSum->GraftOutput(this->GetOutput() ); 
+
+  m_AssSymSum->GraftOutput(this->GetOutput() );
   m_AssSymSum->Update();
   this->GraftOutput(m_AssSymSum->GetOutput() );
 }
@@ -66,7 +66,7 @@ AssymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputIma
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
-void 
+void
 AssymmetricFusionOfLineDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbBreakAngularPathListFilter.h b/Code/FeatureExtraction/otbBreakAngularPathListFilter.h
index 7b78ae6858..c7ce394dce 100644
--- a/Code/FeatureExtraction/otbBreakAngularPathListFilter.h
+++ b/Code/FeatureExtraction/otbBreakAngularPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -39,21 +39,21 @@ class ITK_EXPORT BreakAngularPathListFilter
   typedef PathListToPathListFilter<TPath>       Superclass;
   typedef itk::SmartPointer<Self>               Pointer;
   typedef itk::SmartPointer<const Self>         ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(BreakAngularPathListFilter, PathListToPathListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PathType         PathType;
   typedef typename Superclass::PathListType     PathListType;
   typedef typename Superclass::PathPointerType  PathPointerType;
   typedef typename PathListType::Pointer        PathListPointerType;
-  
-  typedef double MaxAngleType;  
-  
+
+  typedef double MaxAngleType;
+
   /** Set/Get the max angle */
   itkSetMacro(MaxAngle,MaxAngleType);
   itkGetConstMacro(MaxAngle,MaxAngleType);
@@ -77,7 +77,7 @@ private:
 
   /** Max angle value */
   MaxAngleType m_MaxAngle;
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/FeatureExtraction/otbBreakAngularPathListFilter.txx b/Code/FeatureExtraction/otbBreakAngularPathListFilter.txx
index 907544059f..517980d402 100644
--- a/Code/FeatureExtraction/otbBreakAngularPathListFilter.txx
+++ b/Code/FeatureExtraction/otbBreakAngularPathListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -40,16 +40,16 @@ BreakAngularPathListFilter<TPath>
 {
         typename PathType::VertexListType::ConstPointer  vertexList = inputPath->GetVertexList();
         typename PathType::VertexListType::ConstIterator pathIt = vertexList->Begin();
-        
+
         typename PathType::VertexType pixel1, pixel2, pixel3;
-        
-        // Initialisation 
-        PathPointerType newPath = PathType::New();  
+
+        // Initialisation
+        PathPointerType newPath = PathType::New();
         newPath->Initialize();
-        
+
         double alpha1(0.), alpha2(0.);
-        
-        while ( pathIt != vertexList->End() ) 
+
+        while ( pathIt != vertexList->End() )
         {
                 // Add Pixel 1
                 newPath->AddVertex(pathIt.Value());
@@ -62,7 +62,7 @@ BreakAngularPathListFilter<TPath>
                         if (pathIt != vertexList->End())
                         {
                                 pixel3=pathIt.Value();
-                               
+
                                 alpha1 = vcl_atan2((pixel1[1]-pixel2[1]),(pixel1[0]-pixel2[0]));
                                 alpha2 = vcl_atan2((pixel2[1]-pixel3[1]),(pixel2[0]-pixel3[0]));
 								alpha1 = (alpha1 >= 0)?alpha1:(alpha1+2.*M_PI);
@@ -75,7 +75,7 @@ BreakAngularPathListFilter<TPath>
                                         outputPathList->PushBack(newPath);
                                         // Reinit
                                         newPath = PathType::New();
-                                        
+
                                 }
                                 --pathIt; // Return previous pixel
                         }
@@ -101,8 +101,8 @@ BreakAngularPathListFilter<TPath>
 
         typename PathListType::ConstIterator listIt = inputPathList->Begin();
         outputPathList->Clear();
-        
-        PathListPointerType newTempPathList = PathListType::New(); 
+
+        PathListPointerType newTempPathList = PathListType::New();
         while( listIt != inputPathList->End())
         {
                 (void)BreakAngularPath(m_MaxAngle, listIt.Get(), outputPathList);
diff --git a/Code/FeatureExtraction/otbCompacityPathFunction.h b/Code/FeatureExtraction/otbCompacityPathFunction.h
index 10a793905e..afdb041368 100644
--- a/Code/FeatureExtraction/otbCompacityPathFunction.h
+++ b/Code/FeatureExtraction/otbCompacityPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,11 +32,11 @@ namespace otb
  *
  * The path must contain at least 3 points.
  * The result value is comprise between 0.0 and 1.0
- * 
+ *
  * \ingroup PathFunctions
  */
 
-template < class TInputPath,    
+template < class TInputPath,
            class TOutput      = double>
 class ITK_EXPORT CompacityPathFunction :
   public PathFunction< TInputPath, TOutput >
@@ -47,7 +47,7 @@ public:
   typedef PathFunction<TInputPath, TOutput>             Superclass;
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(CompacityPathFunction, PathFunction);
 
@@ -63,8 +63,8 @@ public:
   typedef TOutput                                       OutputType;
 
   typedef double                                        RealType;
-   
-  			
+
+
   /** Evaluate the function at non-integer positions */
   virtual OutputType Evaluate( const PathType& path) const;
   virtual OutputType Evaluate( ) const;
diff --git a/Code/FeatureExtraction/otbCompacityPathFunction.txx b/Code/FeatureExtraction/otbCompacityPathFunction.txx
index e85e5774f9..cdde6d5994 100644
--- a/Code/FeatureExtraction/otbCompacityPathFunction.txx
+++ b/Code/FeatureExtraction/otbCompacityPathFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,7 +43,7 @@ CompacityPathFunction<TInputPath,TOutput>
 ::Evaluate(const PathType& path) const
 {
   typedef double                      RealType;
-  
+
   VertexListPointer                   vertexList;
   VertexType                          cindex;
   VertexType                          IndexOut;
@@ -52,7 +52,7 @@ CompacityPathFunction<TInputPath,TOutput>
   RealType  	     		      Perimeter=0.0;
   RealType                            Compacity;
   RealType			      x1,x2,y1,y2;
-  
+
   vertexList = path.GetVertexList();
   nbPath = vertexList->Size();
 
@@ -63,7 +63,7 @@ CompacityPathFunction<TInputPath,TOutput>
        cindex = vertexList->GetElement(i);
        x1 = cindex[0];
        y1 = cindex[1];
-       
+
        if( i == (nbPath-1) )
        {
           cindex = vertexList->GetElement(0);
@@ -74,25 +74,25 @@ CompacityPathFunction<TInputPath,TOutput>
        }
        x2 = cindex[0];
        y2 = cindex[1];
-       
+
        RealType Norm;
-       
+
        Norm  = vcl_sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) );
-       
+
        Perimeter += Norm;
-	 
+
        RealType P = x2 * (y2-y1);
        RealType Q = y2 * (x2-x1);
-	 
+
        Surface += ( P - Q );
        } // FOR loop
-     } // IF loop  
+     } // IF loop
      else
      {
-        itkExceptionMacro(<<"CompacityPathFunction::Evaluate() FAILED -- path must contains at least 3 points"); 
+        itkExceptionMacro(<<"CompacityPathFunction::Evaluate() FAILED -- path must contains at least 3 points");
      }
   Surface /= 2.0;
-  
+
   Compacity = Surface / (Perimeter * Perimeter);
   Compacity *= ( 4.* acos(-1.0) );
 
@@ -113,7 +113,7 @@ CompacityPathFunction<TInputPath,TOutput>
     }
 
   OutputType Result =  Evaluate( *(this->GetInputPath()) );
-  
+
   return Result;
 }
 
diff --git a/Code/FeatureExtraction/otbComplexMomentImageFunction.h b/Code/FeatureExtraction/otbComplexMomentImageFunction.h
index b8fbb1ea3b..775e64dcd2 100644
--- a/Code/FeatureExtraction/otbComplexMomentImageFunction.h
+++ b/Code/FeatureExtraction/otbComplexMomentImageFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
  * \class ComplexMomentImageFunction
  * \brief Calculate the complex moment value in the full image.
  *
- * Calculate the complex moment value over an image. 
+ * Calculate the complex moment value over an image.
  * The implemented equation is:
  *
  *  \f[  c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot
@@ -42,10 +42,10 @@ namespace otb
  *
  * This class is templated over the input image type and the
  * coordinate representation type (e.g. float or double).
- * 
+ *
  * \ingroup ImageFunctions
  */
-template < class TInput, 
+template < class TInput,
            class TOutput = std::complex<double>,
            class TPrecision = double,
 	   class TCoordRep = float >
@@ -58,7 +58,7 @@ public:
   typedef GeometricMomentImageFunction<TInput, TOutput, TPrecision, TCoordRep>    Superclass;
   typedef itk::SmartPointer<Self>                                    Pointer;
   typedef itk::SmartPointer<const Self>                              ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ComplexMomentImageFunction, GeometricMomentImageFunction);
 
@@ -70,33 +70,33 @@ public:
   typedef typename Superclass::IndexType            IndexType;
   typedef typename Superclass::ContinuousIndexType  ContinuousIndexType;
   typedef typename Superclass::PointType            PointType;
- 
+
   typedef typename Superclass::OutputType           ComplexType;
 
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType        PrecisionType;
-  			 
+
   /** ComplexType for calculation precision */
   typedef std::complex<PrecisionType>               ComplexPrecisionType;
-  			 
+
   /** Evalulate the function at specified index */
   virtual ComplexType EvaluateAtIndex( const IndexType& index ) const;
 
   /** Evaluate the function at non-integer positions */
   virtual ComplexType Evaluate( const PointType& point ) const
-    { 
+    {
       IndexType index;
       this->ConvertPointToNearestIndex( point, index );
-      return this->EvaluateAtIndex( index ); 
+      return this->EvaluateAtIndex( index );
     }
-  virtual ComplexType EvaluateAtContinuousIndex( 
+  virtual ComplexType EvaluateAtContinuousIndex(
     const ContinuousIndexType& cindex ) const
-    { 
+    {
       IndexType index;
       this->ConvertContinuousIndexToNearestIndex( cindex, index );
-      return this->EvaluateAtIndex( index ) ; 
+      return this->EvaluateAtIndex( index ) ;
     }
-      
+
   itkSetMacro(P, unsigned int);
   itkGetConstReferenceMacro(P, unsigned int);
   itkSetMacro(Q, unsigned int);
@@ -107,14 +107,14 @@ protected:
   ComplexMomentImageFunction();
   ~ComplexMomentImageFunction(){};
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
 private:
   ComplexMomentImageFunction( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
 
   unsigned int m_P;
   unsigned int m_Q;
-  
+
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbComplexMomentImageFunction.txx b/Code/FeatureExtraction/otbComplexMomentImageFunction.txx
index d9703f726d..9068960568 100644
--- a/Code/FeatureExtraction/otbComplexMomentImageFunction.txx
+++ b/Code/FeatureExtraction/otbComplexMomentImageFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -57,7 +57,7 @@ template < class TInput, class TOutput, class TPrecision, class TCoordRep>
 typename ComplexMomentImageFunction<TInput,TOutput,TPrecision,TCoordRep>::ComplexType
 ComplexMomentImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 ::EvaluateAtIndex(const IndexType& index) const
-{  
+{
   typename TInput::SizeType           ImageSize;
   ComplexPrecisionType                Sum;
   ComplexPrecisionType                ValP;
@@ -75,17 +75,17 @@ ComplexMomentImageFunction<TInput,TOutput,TPrecision,TCoordRep>
    if(this->GetNeighborhoodRadius()<0)
      {
      ImageSize = this->GetInputImage()->GetBufferedRegion().GetSize();
-     
+
      indexPos[0] = ImageSize[0] / 2 ;
      indexPos[1] = ImageSize[1] / 2;
-     
+
      kernelSize[0] = indexPos[0];
-     kernelSize[1] = indexPos[1];          
+     kernelSize[1] = indexPos[1];
      }
      else
      {
        kernelSize.Fill( this->GetNeighborhoodRadius() );
-     }  
+     }
 
    itk::ConstNeighborhoodIterator<TInput>
     it(kernelSize, this->GetInputImage(), this->GetInputImage()->GetBufferedRegion());
@@ -93,7 +93,7 @@ ComplexMomentImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 
   // Set the iterator at the desired location
   it.SetLocation(indexPos);
-  Sum = ComplexPrecisionType(0.0,0.0); 
+  Sum = ComplexPrecisionType(0.0,0.0);
 
   const unsigned int size = it.Size();
   for (unsigned int i = 0; i < size; ++i)
@@ -105,15 +105,15 @@ ComplexMomentImageFunction<TInput,TOutput,TPrecision,TCoordRep>
     while(p>0)
      {
       ValP *= ComplexPrecisionType(IndexValue[0], IndexValue[1]);
-      --p; 
+      --p;
      }
     unsigned int q  = m_Q;
     while(q>0)
      {
       ValQ *= ComplexPrecisionType(IndexValue[0], -IndexValue[1]);
-      --q; 
+      --q;
      }
-          
+
     Sum += ( ValP * ValQ * ComplexPrecisionType(static_cast<PrecisionType>(it.GetPixel(i)),0.0) );
 
   }
diff --git a/Code/FeatureExtraction/otbComplexMomentPathFunction.h b/Code/FeatureExtraction/otbComplexMomentPathFunction.h
index ad350c8609..2ffa2d4931 100644
--- a/Code/FeatureExtraction/otbComplexMomentPathFunction.h
+++ b/Code/FeatureExtraction/otbComplexMomentPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,16 +40,16 @@ namespace otb
  *
  * This class is templated over :
  *   - the input image type
- *   - the path type   
+ *   - the path type
  *   - and the coordinate representation type (e.g. float or double).
- * 
+ *
  * \ingroup ImageFunctions
  */
-template < class TInputPath, 
+template < class TInputPath,
            class TOutput = std::complex<double>,
            class TPrecision = double>
 class ITK_EXPORT ComplexMomentPathFunction :
-    public GeometricMomentPathFunction< TInputPath, 
+    public GeometricMomentPathFunction< TInputPath,
 					TOutput,
                                         TPrecision >
 {
@@ -59,7 +59,7 @@ public:
   typedef GeometricMomentPathFunction<TInputPath, TOutput, TPrecision>  Superclass;
   typedef itk::SmartPointer<Self>                                    Pointer;
   typedef itk::SmartPointer<const Self>                              ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ComplexMomentPathFunction, GeometricMomentPathFunction);
 
@@ -69,7 +69,7 @@ public:
 
   /** InputPathType typedef support. */
   typedef typename Superclass::PathType                 PathType;
-  typedef typename Superclass::PathConstPointer         PathConstPointer;  
+  typedef typename Superclass::PathConstPointer         PathConstPointer;
   typedef typename PathType::ContinuousIndexType        VertexType;
   typedef itk::VectorContainer< unsigned,VertexType >   VertexListType;
   typedef typename VertexListType::ConstPointer         VertexListPointer;
@@ -80,17 +80,17 @@ public:
   typedef typename Superclass::OutputType               OutputType;
 
   typedef double                                        RealType;
- 
+
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType            PrecisionType;
-  			 
+
   /** ComplexType for calculation precision */
   typedef std::complex<PrecisionType>                   ComplexPrecisionType;
-  			 
+
   /** Evalulate the function */
   virtual OutputType Evaluate(const PathType& path) const;
   virtual OutputType Evaluate() const;
-  
+
   itkSetMacro(P, unsigned int);
   itkGetConstReferenceMacro(P, unsigned int);
   itkSetMacro(Q, unsigned int);
@@ -107,11 +107,11 @@ private:
   ComplexMomentPathFunction( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
   ComplexType EvaluateComplexMomentAtIndex(VertexType index) const;
- 
+
   unsigned int    m_P;
   unsigned int    m_Q;
   RealType        m_Step;
-  
+
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbComplexMomentPathFunction.txx b/Code/FeatureExtraction/otbComplexMomentPathFunction.txx
index 2066858678..341cf47bcd 100644
--- a/Code/FeatureExtraction/otbComplexMomentPathFunction.txx
+++ b/Code/FeatureExtraction/otbComplexMomentPathFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -55,7 +55,7 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
 
 
 template < class TInputPath, class TOutput, class TPrecision>
-typename ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>::ComplexType 
+typename ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>::ComplexType
 ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
 ::EvaluateComplexMomentAtIndex(VertexType index) const
 {
@@ -70,16 +70,16 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
     while(p>0)
      {
       ValP *= ComplexPrecisionType(index[0], index[1]);
-      --p; 
+      --p;
      }
     unsigned int q  = m_Q;
     while(q>0)
      {
       ValQ *= ComplexPrecisionType(index[0], -index[1]);
-      --q; 
+      --q;
      }
 
-    Result = ValP * ValQ * ComplexPrecisionType( static_cast<PrecisionType>(PixelValue), 0.0); 
+    Result = ValP * ValQ * ComplexPrecisionType( static_cast<PrecisionType>(PixelValue), 0.0);
     return ( static_cast<ComplexType>(Result) );
 }
 
@@ -98,10 +98,10 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
   ComplexType  	     		      Value;
 
   Value = static_cast<ComplexType>(0.0);
-  
+
   vertexList = path.GetVertexList();
   nbPath = vertexList->Size();
-   
+
   if(nbPath >1)
      {
      for(int i =0 ; i<nbPath-1 ;i++)
@@ -112,10 +112,10 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
        cindex = vertexList->GetElement(i+1);
        PrecisionType x2 = cindex[0];
        PrecisionType y2 = cindex[1];
-       
+
        PrecisionType Theta;
        PrecisionType Norm;
-       
+
        Theta = vcl_atan2(y2-y1,x2-x1);
        Norm  = vcl_sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1) );
 
@@ -123,7 +123,7 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
          {
 	 IndexOut[0] = x1 + k * vcl_cos(Theta);
 	 IndexOut[1] = y1 + k * vcl_sin(Theta);
-	 
+
 	 Value += EvaluateComplexMomentAtIndex(IndexOut );
 	 }
        } // FOR loop
@@ -145,7 +145,7 @@ ComplexMomentPathFunction<TInputPath,TOutput,TPrecision>
     }
 
   OutputType Result =  Evaluate( *(this->GetInputPath()) );
-  
+
   return Result;
 }
 
diff --git a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h
index ede4a11e03..d072e82b7c 100644
--- a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h
+++ b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ namespace otb
 /** \class ExtractSegmentsImageFilter
  *
  * This class implements a composite filter that generate an image of segments
- * primitives. It combines four filters : 
+ * primitives. It combines four filters :
  *   - otb::PixelSuppressionByDirectionImageFilter
  *   - otb::LocalHoughFilter
  *   - otb::FillGapsFilter
@@ -41,9 +41,9 @@ namespace otb
  *
  */
 
-template <class TInputImage, 
+template <class TInputImage,
 	  class TOutputImage>
-class ITK_EXPORT ExtractSegmentsImageFilter : 
+class ITK_EXPORT ExtractSegmentsImageFilter :
 public itk::ImageToImageFilter< TInputImage, TOutputImage >
 {
 public:
@@ -51,15 +51,15 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
-  
+
   typedef TInputImage PSOutputImageType;
-  
+
   typedef ExtractSegmentsImageFilter 				    Self;
   typedef itk::ImageToImageFilter< InputImageType, OutputImageType> Superclass;
   typedef itk::SmartPointer<Self> 				    Pointer;
@@ -68,36 +68,36 @@ public:
   itkNewMacro(Self);
 
   itkTypeMacro(ExtractSegmentsImageFilter, itk::ImageToImageFilter);
-  
+
   typedef typename InputImageType::PixelType  InputPixelType;
   typedef typename InputImageType::SizeType SizeType;
 
   typedef typename OutputImageType::PixelType OutputPixelType;
-  
-  
+
+
   /** Definition of the list of lines. */
   typedef LineSpatialObjectList	 LinesListType;
- 
+
 
   /** Set/Get the radius of the region of the pixel suppression by direction image filter. */
   void SetPixelSuppressionRadius( SizeType Radius );
   const SizeType GetPixelSuppressionRadius( void );
-  
+
   /** Set/Get Angular Accuracy on the direction of the central pixel for
       the pixel suppression by direction image filter. */
   void SetPixelSuppressionAngularBeam( float AngularBeam );
-  const float GetPixelSuppressionAngularBeam( void );  
+  const float GetPixelSuppressionAngularBeam( void );
+
+
 
-  
-  
   /** Set/Get the radius used to define the region of local hough filter. */
   void SetLocalHoughRadius( SizeType Radius );
   const SizeType GetLocalHoughRadius( void );
-  
+
   /** Set/Get the number of lines we are looking for in the local hough filter. */
   void SetLocalHoughNumberOfLines( unsigned int Radius );
   const unsigned int GetLocalHoughNumberOfLines( void );
-  
+
   /** Set/Get the radius of the disc to remove from the accumulator
    *  for each line found */
   void SetLocalHoughDiscRadius( float DiscRadius );
@@ -112,18 +112,18 @@ public:
   /** Set/Get the radius between two segments in the fill gaps filter. */
   void SetFillGapsRadius( float Radius );
   const float GetFillGapsRadius( void );
-  
+
   /** Set/Get Angular Beam between two segments in the fill gaps filter. */
   void SetFillGapsAngularBeam( float AngularBeam );
-  const float GetFillGapsAngularBeam( void );  
-  
-  
+  const float GetFillGapsAngularBeam( void );
+
+
 
   /** Set/Get the image input of this filter.  */
   void SetInputImage( const InputImageType *image);
-  const InputImageType * GetInputImage(void);  
+  const InputImageType * GetInputImage(void);
 
-  /** Set/Get the image direction of this filter.  */  
+  /** Set/Get the image direction of this filter.  */
   void SetInputImageDirection( const InputImageType *image);
   const InputImageType * GetInputImageDirection(void);
 
@@ -132,21 +132,21 @@ public:
 protected:
   ExtractSegmentsImageFilter();
   virtual ~ExtractSegmentsImageFilter() {};
-  
+
   typedef PixelSuppressionByDirectionImageFilter< InputImageType, PSOutputImageType > 	PixelSuppressionType;
   typedef LocalHoughFilter< InputImageType >						LocalHoughType;
   typedef FillGapsFilter								FillGapsType;
   typedef DrawLineSpatialObjectListFilter< InputImageType, OutputImageType > 		DrawLineListType;
 
   virtual void GenerateData();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
   ExtractSegmentsImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-  
+
   typename PixelSuppressionType::Pointer	m_PixelSuppression;
   typename LocalHoughType::Pointer		m_LocalHough;
   typename FillGapsType::Pointer		m_FillGaps;
@@ -158,5 +158,5 @@ private:
 #include "otbExtractSegmentsImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx
index afc5eb99db..f13a73915b 100644
--- a/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx
+++ b/Code/FeatureExtraction/otbExtractSegmentsImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,8 +32,8 @@ ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::ExtractSegmentsImageFilter()
 {
   this->SetNumberOfRequiredInputs(2);
-  this->SetNumberOfRequiredOutputs(1); 
-   
+  this->SetNumberOfRequiredOutputs(1);
+
   m_PixelSuppression     = PixelSuppressionType::New();
   m_LocalHough   	 = LocalHoughType::New();
   m_FillGaps   	 	 = FillGapsType::New();
@@ -47,18 +47,18 @@ template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetInputImage( const InputImageType *image)
 {
-   this->SetInput(0,image);	    	
+   this->SetInput(0,image);
 }
 
 template <class TInputImage, class TOutputImage>
-const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::InputImageType * 
+const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::InputImageType *
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetInputImage(void)  
+::GetInputImage(void)
 {
   return static_cast<const InputImageType * >
     (this->GetInput(0) );
 }
-     
+
 /**
  * Set/Get image direction input
  */
@@ -66,49 +66,49 @@ template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetInputImageDirection( const InputImageType *image)
 {
-   this->SetInput(1,image);	    	
+   this->SetInput(1,image);
 }
 
 template <class TInputImage, class TOutputImage>
-const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::InputImageType * 
+const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::InputImageType *
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
-::GetInputImageDirection(void)  
+::GetInputImageDirection(void)
 {
   return static_cast<const InputImageType * >
     (this->GetInput(1) );
 }
-  
+
 /**
  * Set/Get PixelSuppressionyDirectionImageFilter parameters
  */
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetPixelSuppressionRadius(SizeType Radius)
-{ 
-   m_PixelSuppression->SetRadius(Radius); 
-}  
+{
+   m_PixelSuppression->SetRadius(Radius);
+}
 
 template <class TInputImage, class TOutputImage>
-const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::SizeType 
+const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::SizeType
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetPixelSuppressionRadius(void)
 {
-  return (m_PixelSuppression->GetRadius()); 	
+  return (m_PixelSuppression->GetRadius());
 }
 
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetPixelSuppressionAngularBeam(float AngularBeam)
-{ 
-   m_PixelSuppression->SetAngularBeam(AngularBeam); 
-}  
+{
+   m_PixelSuppression->SetAngularBeam(AngularBeam);
+}
 
 template <class TInputImage, class TOutputImage>
 const float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetPixelSuppressionAngularBeam(void)
 {
-  return (m_PixelSuppression->GetAngularBeam()); 	
+  return (m_PixelSuppression->GetAngularBeam());
 }
 
 /**
@@ -117,62 +117,62 @@ ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetLocalHoughRadius(SizeType Radius)
-{ 
-   m_LocalHough->SetRadius(Radius); 
-}  
+{
+   m_LocalHough->SetRadius(Radius);
+}
 
 template <class TInputImage, class TOutputImage>
-const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::SizeType 
+const typename ExtractSegmentsImageFilter<TInputImage, TOutputImage>::SizeType
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetLocalHoughRadius(void)
 {
-  return (m_LocalHough->GetRadius()); 	
-} 
+  return (m_LocalHough->GetRadius());
+}
 
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetLocalHoughNumberOfLines(unsigned int NumberOfLines)
-{ 
-   m_LocalHough->SetNumberOfLines(NumberOfLines); 
-}  
+{
+   m_LocalHough->SetNumberOfLines(NumberOfLines);
+}
 
 template <class TInputImage, class TOutputImage>
-const unsigned int 
+const unsigned int
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetLocalHoughNumberOfLines(void)
 {
-  return (m_LocalHough->GetNumberOfLines()); 	
-}  
+  return (m_LocalHough->GetNumberOfLines());
+}
 
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetLocalHoughDiscRadius(float DiscRadius)
-{ 
-   m_LocalHough->SetDiscRadius(DiscRadius); 
-}  
+{
+   m_LocalHough->SetDiscRadius(DiscRadius);
+}
 
 template <class TInputImage, class TOutputImage>
-const float 
+const float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetLocalHoughDiscRadius(void)
 {
-  return (m_LocalHough->GetDiscRadius()); 	
-}  
+  return (m_LocalHough->GetDiscRadius());
+}
 
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetLocalHoughVariance(float Variance)
-{ 
-   m_LocalHough->SetVariance(Variance); 
-}  
+{
+   m_LocalHough->SetVariance(Variance);
+}
 
 template <class TInputImage, class TOutputImage>
-const float 
+const float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetLocalHoughVariance(void)
 {
-  return (m_LocalHough->GetVariance()); 	
-}  
+  return (m_LocalHough->GetVariance());
+}
 
 /**
  * Set/Get FillGapsFilter parameters
@@ -180,31 +180,31 @@ ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetFillGapsRadius(float Radius)
-{ 
-   m_FillGaps->SetRadius(Radius); 
-}  
+{
+   m_FillGaps->SetRadius(Radius);
+}
 
 template <class TInputImage, class TOutputImage>
 const float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetFillGapsRadius(void)
 {
-  return (m_FillGaps->GetRadius()); 	
+  return (m_FillGaps->GetRadius());
 }
 
 template <class TInputImage, class TOutputImage>
 void ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::SetFillGapsAngularBeam(float AngularBeam)
-{ 
-   m_FillGaps->SetAngularBeam(AngularBeam); 
-}  
+{
+   m_FillGaps->SetAngularBeam(AngularBeam);
+}
 
 template <class TInputImage, class TOutputImage>
 const float
 ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 ::GetFillGapsAngularBeam(void)
 {
-  return (m_FillGaps->GetAngularBeam()); 	
+  return (m_FillGaps->GetAngularBeam());
 }
 
 
@@ -215,18 +215,18 @@ ExtractSegmentsImageFilter<TInputImage, TOutputImage>
 {
   m_PixelSuppression->SetInputImage( this->GetInputImage() );
   m_PixelSuppression->SetInputImageDirection( this->GetInputImageDirection() );
-  
+
   m_LocalHough->SetInput( m_PixelSuppression->GetOutput() );
-  
+
   m_FillGaps->SetInput ( m_LocalHough->GetOutput() );
 
   m_DrawLineList->SetInput( this->GetInputImage() );
   m_DrawLineList->SetInputLineSpatialObjectList( m_FillGaps->GetOutput() );
-  
-  m_DrawLineList->GraftOutput( this->GetOutput() ); 
+
+  m_DrawLineList->GraftOutput( this->GetOutput() );
   m_DrawLineList->Update();
   this->GraftOutput(m_DrawLineList->GetOutput() );
-  
+
 }
 
 
@@ -234,14 +234,14 @@ ExtractSegmentsImageFilter<TInputImage, TOutputImage>
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutput>
-void 
+void
 ExtractSegmentsImageFilter<TInputImage, TOutput>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
 /*  os << indent << "Length: " << m_LengthLine << std::endl;
   os << indent << "Width: " << m_WidthLine << std::endl;*/
-  
+
 }
 
 
diff --git a/Code/FeatureExtraction/otbFillGapsFilter.cxx b/Code/FeatureExtraction/otbFillGapsFilter.cxx
index aa98d442ba..2830aac6b8 100644
--- a/Code/FeatureExtraction/otbFillGapsFilter.cxx
+++ b/Code/FeatureExtraction/otbFillGapsFilter.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ FillGapsFilter::FillGapsFilter()
         this->ProcessObjectType::SetNumberOfRequiredOutputs(1);
 
         LineSpatialObjectListPointer output = LineSpatialObjectListType::New();
-	
+
         this->ProcessObjectType::SetNthOutput(0, output );
 
 	m_Radius      =  4.0;
@@ -43,26 +43,26 @@ void
 FillGapsFilter
 ::SetInput(const LineSpatialObjectListType * input)
 {
-  this->ProcessObjectType::SetNthInput(0, 
+  this->ProcessObjectType::SetNthInput(0,
                                    const_cast< LineSpatialObjectListType * >( input ) );
 }
 
 
-const FillGapsFilter::LineSpatialObjectListType * 
+const FillGapsFilter::LineSpatialObjectListType *
 FillGapsFilter
 ::GetInput(void)
 {
     return static_cast<const LineSpatialObjectListType *>
-    (this->ProcessObjectType::GetInput(0) ); 
+    (this->ProcessObjectType::GetInput(0) );
 }
 
 
-FillGapsFilter::LineSpatialObjectListType * 
+FillGapsFilter::LineSpatialObjectListType *
 FillGapsFilter
 ::GetOutput(void)
 {
     return static_cast<LineSpatialObjectListType *>
-    (this->ProcessObjectType::GetOutput(0) ); 
+    (this->ProcessObjectType::GetOutput(0) );
 }
 
 
@@ -71,7 +71,7 @@ FillGapsFilter
  *
  */
 
-void 
+void
 FillGapsFilter
 ::GenerateData()
 {
@@ -79,7 +79,7 @@ FillGapsFilter
 
    const LineSpatialObjectList * inputLine = this->GetInput();
    LineSpatialObjectList * outputLine = this->GetOutput();
-   
+
   // Get the list of points which consists of two points to represent a
   // straight line
 
@@ -93,28 +93,28 @@ FillGapsFilter
   double xTemp,yTemp;
   double R13,R14,R23,R24;
   double CosTheta;
-  
- 
+
+
   PointListType::const_iterator   itPoints;
-    
+
   CosTheta = vcl_cos(m_AngularBeam);
   --itLineListAEnd;
-  
+
   while(itLineListA != itLineListAEnd )
     {
     itLineListB = itLineListA;
     ++itLineListB;
-   
+
      PointListType & pointsList = (*itLineListA)->GetPoints();
     itPoints = pointsList.begin();
-    
+
     x1 = (*itPoints).GetPosition()[0];
     y1 = (*itPoints).GetPosition()[1];
 
     itPoints++;
     x2 = (*itPoints).GetPosition()[0];
-    y2 = (*itPoints).GetPosition()[1]; 
-    
+    y2 = (*itPoints).GetPosition()[1];
+
     PointType      point;
     PointListType  pointList;
 
@@ -122,36 +122,36 @@ FillGapsFilter
     pointList.push_back(point);
     point.SetPosition(x2,y2);
     pointList.push_back(point);
-	   
+
     LineSpatialObjectType::Pointer line = LineSpatialObjectType::New();
     line->SetId(0);
     line->SetPoints( pointList );
     line->ComputeBoundingBox();
     outputLine->push_back(line);
-    
+
     while(itLineListB != itLineListBEnd)
       {
 
       pointsList = (*itLineListB)->GetPoints();
       itPoints = pointsList.begin();
-    
+
       x3 = (*itPoints).GetPosition()[0];
       y3 = (*itPoints).GetPosition()[1];
 
       itPoints++;
       x4 = (*itPoints).GetPosition()[0];
-      y4 = (*itPoints).GetPosition()[1]; 
-      
+      y4 = (*itPoints).GetPosition()[1];
+
       // Calculate the radius for each point of each line
-      
+
       R13 = vcl_sqrt( (x1-x3)*(x1-x3) + (y1-y3)*(y1-y3) );
       R14 = vcl_sqrt( (x1-x4)*(x1-x4) + (y1-y4)*(y1-y4) );
       R23 = vcl_sqrt( (x2-x3)*(x2-x3) + (y2-y3)*(y2-y3) );
       R24 = vcl_sqrt( (x2-x4)*(x2-x4) + (y2-y4)*(y2-y4) );
-      
+
       double Rmin = m_Radius;
-      
-      // Test the lower Radius 
+
+      // Test the lower Radius
       if(R13 < Rmin) Rmin = R13;
       if(R14 < Rmin) Rmin = R14;
       if(R23 < Rmin) Rmin = R23;
@@ -160,40 +160,40 @@ FillGapsFilter
 
       if(Rmin < m_Radius)
         {
-	// Sort Points such as the radius of P2 and P3 is the smallest one. 
+	// Sort Points such as the radius of P2 and P3 is the smallest one.
 	if(Rmin == R24 )
 	  {
 	   xTemp = x3   ; yTemp = y3 ;
-	   x3    = x4   ; y3    = y4; 
+	   x3    = x4   ; y3    = y4;
   	   x4    = xTemp; y4    = yTemp;
 	  }
 	if(Rmin == R13 )
 	  {
 	   xTemp = x1   ; yTemp = y1 ;
-	   x1    = x2   ; y1    = y2; 
+	   x1    = x2   ; y1    = y2;
    	   x2    = xTemp; y2    = yTemp;
 	  }
 	if(Rmin == R14 )
 	  {
 	   xTemp = x3   ; yTemp = y3 ;
-	   x3    = x4   ; y3    = y4; 
+	   x3    = x4   ; y3    = y4;
 	   x4    = xTemp; y4    = yTemp;
 	   xTemp = x1   ; yTemp = y1 ;
-	   x1    = x2   ; y1    = y2; 
+	   x1    = x2   ; y1    = y2;
 	   x2    = xTemp; y2    = yTemp;
 	  }
-	  
-	//Estimate the norm each line 
+
+	//Estimate the norm each line
 /*	double Norm12,Norm23,Norm34;
-	Norm12 = vcl_sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) ); 	
+	Norm12 = vcl_sqrt( (x1-x2)*(x1-x2) + (y1-y2)*(y1-y2) );
 	Norm23 = vcl_sqrt( (x2-x3)*(x2-x3) + (y2-y3)*(y2-y3) );
 	Norm34 = vcl_sqrt( (x3-x4)*(x3-x4) + (y3-y4)*(y3-y4) );
 	*/
 	double Angle12_23,Angle12_34,Angle23_34;
-	//Estimate the angle between lines 12-23 and lines 12-34 
+	//Estimate the angle between lines 12-23 and lines 12-34
 	/*Angle12_23 = (x2-x1)*(x3-x2) + (y2-y1)*(y3-y2);
 	Angle12_23 = Angle12_23 / Norm12 / Norm23;
-	
+
 	Angle12_34 = (x2-x1)*(x4-x3) + (y2-y1)*(y4-y3);
 	Angle12_34 = Angle12_34 / Norm12 / Norm34;*/
 
@@ -201,7 +201,7 @@ FillGapsFilter
 	Angle12_34 = vcl_cos(vcl_atan2((y2-y1), (x2-x1))-vcl_atan2((y4-y3), (x4-x3)));
 	Angle23_34 = vcl_cos(vcl_atan2((y3-y2), (x3-x2))-vcl_atan2((y4-y3), (x4-x3)));
 
-	
+
 	if( (Angle12_23 > CosTheta) && (Angle12_34 > CosTheta) && (Angle23_34 > CosTheta) )
 	  {
 
@@ -214,24 +214,24 @@ FillGapsFilter
            pointList.push_back(point);
            point.SetPosition(x3,y3);
            pointList.push_back(point);
-	   
+
            LineSpatialObjectType::Pointer line = LineSpatialObjectType::New();
            line->SetId(0);
            line->SetPoints( pointList );
            line->ComputeBoundingBox();
            outputLine->push_back(line);
-	  
+
 	   pointList.clear();
-	   
-	  }	 	
+
+	  }
 	} // if(Rmin < m_Radius)
-      
-      ++itLineListB; 
+
+      ++itLineListB;
       } // while(itLineListB != itLineListBEnd)
-    ++itLineListA; 
+    ++itLineListA;
     }
-    
-  // Insert the last element  
+
+  // Insert the last element
 
   PointType      point;
   PointListType  pointList;
@@ -240,13 +240,13 @@ FillGapsFilter
   pointList.push_back(point);
   point.SetPosition(x4,y4);
   pointList.push_back(point);
-	   
+
   LineSpatialObjectType::Pointer line = LineSpatialObjectType::New();
   line->SetId(0);
   line->SetPoints( pointList );
   line->ComputeBoundingBox();
   outputLine->push_back(line);
-  
+
   pointList.clear();
 
 }
@@ -256,7 +256,7 @@ FillGapsFilter
  *
  */
 
-void 
+void
 FillGapsFilter
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbFillGapsFilter.h b/Code/FeatureExtraction/otbFillGapsFilter.h
index 052060cce5..832929abe7 100644
--- a/Code/FeatureExtraction/otbFillGapsFilter.h
+++ b/Code/FeatureExtraction/otbFillGapsFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,9 +38,9 @@ public:
   typedef itk::ProcessObject                            Superclass;
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(FillGapsFilter,itk::ProcessObject);
@@ -51,7 +51,7 @@ public:
   typedef LineSpatialObjectListType::LineType                   LineSpatialObjectType;
   typedef LineSpatialObjectType::PointListType                  PointListType;
   typedef LineSpatialObjectType::LinePointType                  PointType;
-  
+
   typedef itk::ProcessObject                                    ProcessObjectType;
 
   void SetInput(const LineSpatialObjectListType * input);
@@ -60,28 +60,28 @@ public:
   LineSpatialObjectListType * GetOutput();
 
   itkSetMacro(AngularBeam, double);
-  itkGetConstReferenceMacro(AngularBeam, double);  
+  itkGetConstReferenceMacro(AngularBeam, double);
   itkSetMacro(Radius, double);
-  itkGetConstReferenceMacro(Radius, double);  
+  itkGetConstReferenceMacro(Radius, double);
+
 
- 
 protected:
   FillGapsFilter();
 
   virtual ~FillGapsFilter(){};
 
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   virtual void GenerateData();
 
-  
+
 private:
   FillGapsFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
   double m_AngularBeam;
   double m_Radius;
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbFlusserImageFunction.h b/Code/FeatureExtraction/otbFlusserImageFunction.h
index 2e8bb4119b..d6f86d4433 100644
--- a/Code/FeatureExtraction/otbFlusserImageFunction.h
+++ b/Code/FeatureExtraction/otbFlusserImageFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,7 +43,7 @@ namespace otb
  * - \f$ \psi_{9} = Im (c_{31} c_{12}^{2} )\f$
  * - \f$ \psi_{10} = Re (c_{40} c_{12}^{4} )\f$
  * - \f$ \psi_{11} = Im (c_{40} c_{12}^{4} )\f$
- *  
+ *
  * With :
  *
  *  \f[  c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot
@@ -55,11 +55,11 @@ namespace otb
  *
  * This class is templated over the input image type and the
  * coordinate representation type (e.g. float or double).
- * 
+ *
  * \ingroup ImageFunctions
  */
 
-template < class TInput, 
+template < class TInput,
            class TOutput    = double,
            class TPrecision = double,
 	   class TCoordRep  = float >
@@ -72,7 +72,7 @@ public:
   typedef RealMomentImageFunction< TInput, TOutput, TPrecision, TCoordRep >      Superclass;
   typedef itk::SmartPointer<Self>                                   Pointer;
   typedef itk::SmartPointer<const Self>                             ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(FlusserImageFunction, RealMomentImageFunction);
 
@@ -91,33 +91,33 @@ public:
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType        PrecisionType;
 
-   
+
   /** Dimension of the underlying image. */
   itkStaticConstMacro(ImageDimension, unsigned int,
                       InputType::ImageDimension);
-  			 
+
 
   /** Evalulate the function at specified index */
   virtual RealType EvaluateAtIndex( const IndexType& index ) const;
 
   /** Evaluate the function at non-integer positions */
   virtual RealType Evaluate( const PointType& point ) const
-    { 
+    {
       IndexType index;
       this->ConvertPointToNearestIndex( point, index );
-      return this->EvaluateAtIndex( index ); 
+      return this->EvaluateAtIndex( index );
     }
-  virtual RealType EvaluateAtContinuousIndex( 
+  virtual RealType EvaluateAtContinuousIndex(
     const ContinuousIndexType& cindex ) const
-    { 
+    {
       IndexType index;
       this->ConvertContinuousIndexToNearestIndex( cindex, index );
-      return this->EvaluateAtIndex( index ) ; 
+      return this->EvaluateAtIndex( index ) ;
     }
-  
+
 
   /** Get/Set the radius of the neighborhood over which the
-      statistics are evaluated */  
+      statistics are evaluated */
   itkSetClampMacro(MomentNumber,short,1,11);
   itkGetConstReferenceMacro( MomentNumber, short );
 
@@ -130,7 +130,7 @@ private:
   FlusserImageFunction( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
 
-  short m_MomentNumber;  
+  short m_MomentNumber;
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbFlusserImageFunction.txx b/Code/FeatureExtraction/otbFlusserImageFunction.txx
index 7a6a4cb1b5..5d138210aa 100644
--- a/Code/FeatureExtraction/otbFlusserImageFunction.txx
+++ b/Code/FeatureExtraction/otbFlusserImageFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ template < class TInput, class TOutput, class TPrecision, class TCoordRep>
 FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 ::FlusserImageFunction()
 {
-  m_MomentNumber =-1; 
+  m_MomentNumber =-1;
 }
 
 /**
@@ -55,7 +55,7 @@ typename FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>::RealType
 FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 ::EvaluateAtIndex(const IndexType& index) const
 {
-  
+
   RealType                            FlusserValue;
   ComplexType                         FlusserValueComplex;
 
@@ -66,7 +66,7 @@ FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
     {
     return ( itk::NumericTraits<RealType>::max() );
     }
-  
+
   if ( !this->IsInsideBuffer( index ) )
     {
     return ( itk::NumericTraits<RealType>::max() );
@@ -74,13 +74,13 @@ FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 
   assert(m_MomentNumber > 0);
   assert(m_MomentNumber < 12);
-	
+
    function->SetInputImage( this->GetInputImage() );
    function->SetNeighborhoodRadius(this->GetNeighborhoodRadius() );
 
   switch(m_MomentNumber)
     {
-    case 1 : 
+    case 1 :
         {
 	ComplexType C11;
 	function->SetP(1);
@@ -139,8 +139,8 @@ FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	C12 = function->EvaluateAtIndex( index );
 
 	FlusserValueComplex = C30 * vcl_pow(C12,3) ;
-	FlusserValue = FlusserValueComplex.real();       
-	}	
+	FlusserValue = FlusserValueComplex.real();
+	}
 	break;
     case 6:
         {
@@ -153,10 +153,10 @@ FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	C12 = function->EvaluateAtIndex( index );
 
 	FlusserValueComplex = C30 * vcl_pow(C12,3) ;
-	FlusserValue = FlusserValueComplex.imag();       
-	}	
+	FlusserValue = FlusserValueComplex.imag();
+	}
 	break;
-    case 7 : 
+    case 7 :
         {
 	ComplexType C22;
 	function->SetP(2);
@@ -217,9 +217,9 @@ FlusserImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	FlusserValue = FlusserValueComplex.imag();
 	}
 	break;
-	
+
     default:
-	itkWarningMacro("Hu's invariant parameters are between 1 and 7");	
+	itkWarningMacro("Hu's invariant parameters are between 1 and 7");
     }
 
 
diff --git a/Code/FeatureExtraction/otbFlusserPathFunction.h b/Code/FeatureExtraction/otbFlusserPathFunction.h
index 4919a1f736..55b9f1dfec 100644
--- a/Code/FeatureExtraction/otbFlusserPathFunction.h
+++ b/Code/FeatureExtraction/otbFlusserPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ namespace otb
  * - \f$ \psi_{9} = Im (c_{31} c_{12}^{2} )\f$
  * - \f$ \psi_{10} = Re (c_{40} c_{12}^{4} )\f$
  * - \f$ \psi_{11} = Im (c_{40} c_{12}^{4} )\f$
- *  
+ *
  * With :
  *
  *  \f[  c_{p,q}=\int \int (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot
@@ -52,11 +52,11 @@ namespace otb
  *
  * This class is templated over the input image type and the
  * coordinate representation type (e.g. float or double).
- * 
+ *
  * \ingroup PathFunctions
  */
 
-template < class TInputPath,    
+template < class TInputPath,
            class TOutput      = double,
        	   class TPrecision   = double>
 class ITK_EXPORT FlusserPathFunction :
@@ -68,7 +68,7 @@ public:
   typedef RealMomentPathFunction<TInputPath, TOutput, TPrecision>   Superclass;
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(FlusserPathFunction, RealMomentPathFunction);
 
@@ -77,13 +77,13 @@ public:
 
   /** InputPathType typedef support. */
   typedef typename Superclass::PathType                 PathType;
-  typedef typename Superclass::PathConstPointer         PathConstPointer;  
+  typedef typename Superclass::PathConstPointer         PathConstPointer;
   typedef typename PathType::ContinuousIndexType        VertexType;
   typedef itk::VectorContainer< unsigned,VertexType >   VertexListType;
   typedef typename VertexListType::ConstPointer         VertexListPointer;
 
   typedef typename Superclass::RealType                 RealType;
- 
+
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType            PrecisionType;
 
@@ -91,7 +91,7 @@ public:
   virtual RealType Evaluate( const PathType& path) const;
   virtual RealType Evaluate( ) const;
   /** Get/Set the radius of the neighborhood over which the
-      statistics are evaluated */  
+      statistics are evaluated */
   itkSetMacro(MomentNumber,short);
   itkGetConstReferenceMacro( MomentNumber, short );
 
@@ -104,7 +104,7 @@ private:
   FlusserPathFunction( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
 
-  short m_MomentNumber;  
+  short m_MomentNumber;
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbFlusserPathFunction.txx b/Code/FeatureExtraction/otbFlusserPathFunction.txx
index d2d3cc8fb4..79e0fd928f 100644
--- a/Code/FeatureExtraction/otbFlusserPathFunction.txx
+++ b/Code/FeatureExtraction/otbFlusserPathFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ template < class TInputPath, class TOutput, class TPrecision>
 FlusserPathFunction<TInputPath, TOutput, TPrecision >
 ::FlusserPathFunction()
 {
-  m_MomentNumber =-1; 
+  m_MomentNumber =-1;
 }
 
 /**
@@ -61,13 +61,13 @@ FlusserPathFunction<TInputPath, TOutput, TPrecision >
   ComplexType                         FlusserValueComplex;
 
   typename FunctionType::Pointer function =FunctionType::New();
- 
+
   function->SetStep( this->GetStep() );
   function->SetInputPath( this->GetInputPath() );
-  
+
   switch(m_MomentNumber)
     {
-    case 1 : 
+    case 1 :
         {
 	ComplexType C11;
 	function->SetP(1);
@@ -126,8 +126,8 @@ FlusserPathFunction<TInputPath, TOutput, TPrecision >
 	C12 = function->Evaluate( );
 
 	FlusserValueComplex = C30 * vcl_pow(C12,3) ;
-	FlusserValue = FlusserValueComplex.real();       
-	}	
+	FlusserValue = FlusserValueComplex.real();
+	}
 	break;
     case 6:
         {
@@ -140,10 +140,10 @@ FlusserPathFunction<TInputPath, TOutput, TPrecision >
 	C12 = function->Evaluate( );
 
 	FlusserValueComplex = C30 * vcl_pow(C12,3) ;
-	FlusserValue = FlusserValueComplex.imag();       
-	}	
+	FlusserValue = FlusserValueComplex.imag();
+	}
 	break;
-    case 7 : 
+    case 7 :
         {
 	ComplexType C22;
 	function->SetP(2);
@@ -204,9 +204,9 @@ FlusserPathFunction<TInputPath, TOutput, TPrecision >
 	FlusserValue = FlusserValueComplex.imag();
 	}
 	break;
-	
+
     default:
-	itkWarningMacro("Flusser's invariant parameters are between 1 and 11");	
+	itkWarningMacro("Flusser's invariant parameters are between 1 and 11");
     }
 
 
@@ -226,7 +226,7 @@ FlusserPathFunction<TInputPath, TOutput, TPrecision >
     }
 
   RealType Result =  Evaluate( *(this->GetInputPath()) );
-  
+
   return Result;
 
 }
diff --git a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h
index 32dcc8783f..3f76386589 100644
--- a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h
+++ b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,21 +34,21 @@ namespace otb
  * \class ForwardFourierMellinTransformImageFilter
  * \brief Calculate the Fourier-Mellin transform over an image.
  *
- * This class implements a composite filter. It combines two filters :  
+ * This class implements a composite filter. It combines two filters :
  *   - otb::LogPolarResampleImageFilter : converting the input image in a
  log-polar system coordinate
  *   - itk::VnlFFTRealToComplexConjugateImageFilter : applying the Forward
  Fourier transform of the log-polar image.
- * 
+ *
  * \note the Fourier transform image is coded from 0.0 to 1.0
  *
  * \ingroup ImageFunctions
  */
 
-template < class TPixel, 
+template < class TPixel,
            class TInterpol,
 	   unsigned int  Dimension = 2 >
-	   
+
 class ITK_EXPORT ForwardFourierMellinTransformImageFilter :
     public itk::ImageToImageFilter<Image< TPixel , Dimension >,
                                    itk::Image< std::complex<TPixel> , Dimension > >
@@ -58,17 +58,17 @@ class ITK_EXPORT ForwardFourierMellinTransformImageFilter :
   //typedef TPixel						     PixelType;
   typedef Image< TPixel , Dimension >                           InputImageType;
   /*   typedef otb::Image< std::complex< TPixel > , Dimension >           OutputImageType; */
-  
+
   typedef typename itk::VnlFFTRealToComplexConjugateImageFilter<TPixel,Dimension> FourierImageFilterType;
   typedef typename FourierImageFilterType::OutputImageType OutputImageType;
-  
-  
+
+
   /** Standard class typedefs. */
   typedef ForwardFourierMellinTransformImageFilter                    Self;
   typedef itk::ImageToImageFilter< InputImageType, OutputImageType>   Superclass;
   typedef itk::SmartPointer<Self>                                     Pointer;
   typedef itk::SmartPointer<const Self>                               ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(	ForwardFourierMellinTransformImageFilter, itk::ImageToImageFilter);
 
@@ -81,8 +81,8 @@ class ITK_EXPORT ForwardFourierMellinTransformImageFilter :
   typedef typename InputImageType::Pointer              ImagePointer;
   typedef typename InputImageType::ConstPointer         ImageConstPointer;
 
-  
-  
+
+
   /** InputImageType typedef support. */
   typedef typename OutputImageType::PixelType            OutputPixelType;
   typedef typename OutputImageType::IndexType            OutputIndexType;
@@ -91,7 +91,7 @@ class ITK_EXPORT ForwardFourierMellinTransformImageFilter :
   typedef typename OutputImageType::ConstPointer         OutputImageConstPointer;
   typedef typename OutputImageType::RegionType 	  	 OutputImageRegionType;
 
- 
+
   typedef typename OutputImageType::PixelType            ComplexType;
 
   /** Typedefs to describe and access Interpolator */
@@ -118,11 +118,11 @@ class ITK_EXPORT ForwardFourierMellinTransformImageFilter :
 
   /** Set/Get the Sigma value for the Log-polar resampler  */
    itkSetMacro(Sigma,double);
-   itkGetMacro(Sigma,double);  
+   itkGetMacro(Sigma,double);
 
   /** Set/Get the Default pixel value for the Log-polar resampler  */
   itkSetMacro(DefaultPixelValue, PixelType);
-  itkGetMacro(DefaultPixelValue, PixelType); 
+  itkGetMacro(DefaultPixelValue, PixelType);
 
   virtual void GenerateOutputInformation(void);
 
@@ -139,7 +139,7 @@ protected:
   void GenerateData();
 
 
-  
+
 private:
   ForwardFourierMellinTransformImageFilter( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
@@ -152,22 +152,22 @@ private:
 
   /** Output pixel default value */
   PixelType m_DefaultPixelValue;
-  
+
   /** Interpolator */
   InterpolatorPointerType m_Interpolator;
-  
+
   /** Transform */
   LogPolarTransformPointerType m_Transform;
-  
+
   /** Resampler */
   ResampleFilterPointerType m_ResampleFilter;
-  
+
   /** FFT Filter */
   FourierImageFilterPointer m_FFTFilter;
-  
+
   /** Iterator */
   IteratorType m_Iterator;
- 
+
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx
index fb2ed8a154..9c2dfd3a05 100644
--- a/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx
+++ b/Code/FeatureExtraction/otbForwardFourierMellinTransformImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,9 +27,9 @@ namespace otb
   ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension >
   ::ForwardFourierMellinTransformImageFilter()
   {
-   
+
     m_Sigma = 1.0;
-    m_OutputSize.Fill(512); 
+    m_OutputSize.Fill(512);
     m_FFTFilter = FourierImageFilterType::New();
     m_Interpolator = InterpolatorType::New();
     m_Transform = LogPolarTransformType::New();
@@ -45,7 +45,7 @@ namespace otb
  ::GenerateOutputInformation(void)
  {
    Superclass::GenerateOutputInformation();
-   
+
    OutputImagePointer outputPtr = this->GetOutput();
 
    if(!outputPtr)
@@ -64,7 +64,7 @@ namespace otb
   void
   ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension >
   ::GenerateData()
-  {   
+  {
     typename LogPolarTransformType::ParametersType params(4);
     // Center the transform
     params[0]=0.5*static_cast<double>(this->GetInput()->GetLargestPossibleRegion().GetSize()[0]);
@@ -73,7 +73,7 @@ namespace otb
     params[3]=vcl_log(vcl_sqrt(vcl_pow(static_cast<double>(this->GetInput()->GetLargestPossibleRegion().GetSize()[0]),2)
 		       +vcl_pow(static_cast<double>(this->GetInput()->GetLargestPossibleRegion().GetSize()[1]),2.))/2)/m_OutputSize[1];
   m_Transform->SetParameters(params);
-  
+
   // log polar resampling
   m_ResampleFilter->SetInput(this->GetInput());
   m_ResampleFilter->SetDefaultPixelValue(m_DefaultPixelValue);
@@ -98,7 +98,7 @@ namespace otb
     valueTemp *= vcl_exp(m_Sigma * Rho);
     valueTemp *=params[3];
     PixelType value = static_cast<PixelType>(valueTemp);
-	    
+
     if( value < minOutputValue )
       {
 	pixval = minOutputValue;
@@ -107,23 +107,23 @@ namespace otb
       {
 	pixval = maxOutputValue;
       }
-    else 
+    else
       {
 	pixval = static_cast<PixelType>(value);
       }
-    m_Iterator.Set(pixval);      
+    m_Iterator.Set(pixval);
   }
   m_FFTFilter->SetInput(tempImage );
-  
+
   m_FFTFilter->GraftOutput( this->GetOutput() );
   m_FFTFilter->Update();
-  this->GraftOutput( m_FFTFilter->GetOutput() );  
+  this->GraftOutput( m_FFTFilter->GetOutput() );
 }
 /**
  * Standard "PrintSelf" method
  */
 template < class TPixel,class  TInterpol,unsigned int   Dimension >
-void 
+void
 ForwardFourierMellinTransformImageFilter<TPixel, TInterpol, Dimension >
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
index 5be16d056e..59f238623a 100644
--- a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
+++ b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -41,19 +41,19 @@ namespace otb
 /**
  * \class GenericRoadExtractionFilter
  * \brief This class performs the extraction of roads from an image.
- * 
+ *
  * This composite filter implements a fast and robust road extraction
- * for high resolution satellite images. The line 
+ * for high resolution satellite images. The line
  * detection is done using a Gaussian gradient with a scalar product to find
- * the road directions. Finally, extracted roads are vectorized and 
- * processed to improve the results removing some occultations and false 
+ * the road directions. Finally, extracted roads are vectorized and
+ * processed to improve the results removing some occultations and false
  * detections.
- * 
- * The full method is detailled in E. Christophe and J. Inglada, "Robust Road 
- * Extraction for High Resolution Satellite Images," in IEEE International 
+ *
+ * The full method is detailled in E. Christophe and J. Inglada, "Robust Road
+ * Extraction for High Resolution Satellite Images," in IEEE International
  * Conference on Image Processing, ICIP’07, 2007.
  *
- * This filter is fast, as the detection typically takes 3 seconds for a 
+ * This filter is fast, as the detection typically takes 3 seconds for a
  * 1000 \f$ \times \f$ 1000 images with four spectral bands. Results can be
  * used as an initialization for more complex algorithms.
  *
@@ -75,7 +75,7 @@ template <class TInputImage, class TOutputPath>
   : public ImageToPathListFilter<TInputImage,TOutputPath>
   {
     public :
-    /** Standard typedefs */ 
+    /** Standard typedefs */
     typedef GenericRoadExtractionFilter                                Self;
     typedef ImageToPathListFilter<TInputImage,TOutputPath>      Superclass;
     typedef itk::SmartPointer<Self>                             Pointer;
@@ -90,12 +90,12 @@ template <class TInputImage, class TOutputPath>
     typedef typename Superclass::OutputPathListType                     OutputPathListType;
     typedef typename InputImageType::PixelType 				InputPixelType;
     typedef double                                                      InternalPixelType;
-    
+
     typedef otb::VectorImage<InternalPixelType,InputImageType::ImageDimension>  VectorImageType;
     typedef otb::Image<InternalPixelType,InputImageType::ImageDimension>        ModulusType;
     typedef otb::Image<InternalPixelType,InputImageType::ImageDimension>        DirectionType;
-    
-    typedef itk::CovariantVector<InternalPixelType,InputImageType::ImageDimension> 
+
+    typedef itk::CovariantVector<InternalPixelType,InputImageType::ImageDimension>
                                                                         VectorPixelType;
     typedef otb::Image<VectorPixelType,InputImageType::ImageDimension>  CovariantVectorImageType;
 
@@ -138,17 +138,17 @@ template <class TInputImage, class TOutputPath>
     typedef RemoveTortuousPathListFilter<OutputPathType>        RemoveTortuousPathListFilterType;
     typedef LinkPathListFilter<OutputPathType>                  LinkPathListFilterType;
     typedef LikelihoodPathListFilter<OutputPathType, ModulusType>	LikelihoodPathListFilterType;
-    
+
     /** Template parameters typedefs for internals filters */
     typedef typename GradientFilterType::RealType SigmaType;
     typedef typename VectorizationPathListFilterType::InputPixelType AmplitudeThresholdType;
 //     typedef typename SimplifyPathListFilterType::ToleranceType ToleranceType;
     typedef double ToleranceType;
     typedef typename BreakAngularPathListFilterType::MaxAngleType MaxAngleType;
-//     typedef typename RemoveTortuousPathListFilterType::MeanDistanceThresholdType MeanDistanceThresholdType; 
+//     typedef typename RemoveTortuousPathListFilterType::MeanDistanceThresholdType MeanDistanceThresholdType;
     typedef double MeanDistanceThresholdType;
     typedef typename LinkPathListFilterType::RealType LinkRealType;
-     
+
 
   /** Get/Set the alpha value */
   itkGetConstReferenceMacro(Alpha,double);
@@ -171,15 +171,15 @@ template <class TInputImage, class TOutputPath>
   itkSetMacro(FirstMeanDistanceThreshold,MeanDistanceThresholdType);
   itkGetMacro(SecondMeanDistanceThreshold,MeanDistanceThresholdType);
   itkSetMacro(SecondMeanDistanceThreshold,MeanDistanceThresholdType);
- 
+
   /** Get/Set the angular threshold (use by LinkPathFilter)*/
   itkSetMacro(AngularThreshold,LinkRealType);
   itkGetMacro(AngularThreshold,LinkRealType);
   /** Get/Set the distance threshold (use by LinkPathFilter)*/
   itkSetMacro(DistanceThreshold,LinkRealType);
   itkGetMacro(DistanceThreshold,LinkRealType);
-  
-  
+
+
   protected:
     /** Constructor */
     GenericRoadExtractionFilter();
@@ -195,7 +195,7 @@ template <class TInputImage, class TOutputPath>
     void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   private :
-    
+
     GenericRoadExtractionFilter(const Self&); // purposely not implemented
     void operator=(const Self&); // purposely not implemented
 
@@ -230,11 +230,11 @@ template <class TInputImage, class TOutputPath>
 
   /** The distance threshold (use by LinkPathListFilter) */
   double m_DistanceThreshold;
-  
+
   /** Alpha. Use to calculate the sigma value used by the GradientRecursiveGaussianImageFilter */
   double m_Alpha;
 
-  /** Resolution of the image. Use to calculate the sigma value used by the GradientRecursiveGaussianImageFilter 
+  /** Resolution of the image. Use to calculate the sigma value used by the GradientRecursiveGaussianImageFilter
   and the m_DistanceThreshold value used by the LinkPathListFilter
   This value is set bye the image's spacing.*/
   double m_Resolution;
diff --git a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx
index 2d275378f5..8a8b9afe5c 100644
--- a/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx
+++ b/Code/FeatureExtraction/otbGenericRoadExtractionFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ GenericRoadExtractionFilter<TInputImage, TOutputPath>
         m_SecondRemoveTortuousPathListFilter = RemoveTortuousPathListFilterType::New();
         m_LinkPathListFilter = LinkPathListFilterType::New();
         m_LikelihoodPathListFilter = LikelihoodPathListFilterType::New();
-        
+
         /** Amplitude threshold to start following a path (use by the VectorizationPathListFilter)*/
         m_AmplitudeThreshold = static_cast<AmplitudeThresholdType>(0.00005 );
         /** Tolerance for segment consistency (tolerance in terms of distance) (use by the SimplifyPathFilter)*/
@@ -66,7 +66,7 @@ GenericRoadExtractionFilter<TInputImage, TOutputPath>
         /** Alpha value */
         /** Use to calculate the sigma value use by the GradientRecursiveGaussianImageFilter */
         m_Alpha = 1.0;
-        
+
         /** Resolution of the image */
         m_Resolution = 1.;
 }
@@ -106,19 +106,19 @@ GenericRoadExtractionFilter<TInputImage, TOutputPath>
   //// Algorithm for road extraction ////
   ///////////////////////////////////////
 
-  // 
+  //
 
   m_SquareRootImageFilter->SetInput(inputImage);
-  
+
   m_GradientFilter->SetInput(m_SquareRootImageFilter->GetOutput());
   /** Sigma calculated with the alpha and image resolution parameters */
   m_GradientFilter->SetSigma(static_cast<SigmaType>(m_Alpha * (1.2/m_Resolution + 1.) ));
-  
+
   m_NeighborhoodScalarProductFilter->SetInput(m_GradientFilter->GetOutput());
-  
+
   m_RemoveIsolatedByDirectionFilter->SetInput(m_NeighborhoodScalarProductFilter->GetOutput());
   m_RemoveIsolatedByDirectionFilter->SetInputDirection(m_NeighborhoodScalarProductFilter->GetOutputDirection());
-  
+
   m_RemoveWrongDirectionFilter->SetInput(m_RemoveIsolatedByDirectionFilter->GetOutput());
   m_RemoveWrongDirectionFilter->SetInputDirection(m_NeighborhoodScalarProductFilter->GetOutputDirection());
 
@@ -128,13 +128,13 @@ GenericRoadExtractionFilter<TInputImage, TOutputPath>
   m_VectorizationPathListFilter->SetInput(m_NonMaxRemovalByDirectionFilter->GetOutput());
   m_VectorizationPathListFilter->SetInputDirection(m_NeighborhoodScalarProductFilter->GetOutputDirection());
   m_VectorizationPathListFilter->SetAmplitudeThreshold(m_AmplitudeThreshold);
-  
+
   m_FirstSimplifyPathListFilter->SetInput(m_VectorizationPathListFilter->GetOutput());
   m_FirstSimplifyPathListFilter->GetFunctor().SetTolerance(m_Tolerance);
-  
+
   m_BreakAngularPathListFilter->SetInput(m_FirstSimplifyPathListFilter->GetOutput());
   m_BreakAngularPathListFilter->SetMaxAngle(m_MaxAngle);
-  
+
   m_FirstRemoveTortuousPathListFilter->SetInput(m_BreakAngularPathListFilter->GetOutput());
   m_FirstRemoveTortuousPathListFilter->GetFunctor().SetThreshold(m_FirstMeanDistanceThreshold);
 
@@ -144,19 +144,19 @@ GenericRoadExtractionFilter<TInputImage, TOutputPath>
 
   m_SecondSimplifyPathListFilter->SetInput(m_LinkPathListFilter->GetOutput());
   m_SecondSimplifyPathListFilter->GetFunctor().SetTolerance(m_Tolerance);
- 
+
   m_SecondRemoveTortuousPathListFilter->SetInput(m_SecondSimplifyPathListFilter->GetOutput());
   m_SecondRemoveTortuousPathListFilter->GetFunctor().SetThreshold(m_SecondMeanDistanceThreshold);
-  
+
   m_LikelihoodPathListFilter->SetInput(m_SecondRemoveTortuousPathListFilter->GetOutput());
   m_LikelihoodPathListFilter->SetInputImage(m_NonMaxRemovalByDirectionFilter->GetOutput());
-  
+
   // Graft output seems to be broken for PolylineParametricPath
   // So we use update, and copy the path to the output path list.
   // m_LikelihoodPathListFilter->GraftOutput(this->GetOutput());
   m_LikelihoodPathListFilter->Update();
   // outputPathList =  m_LikelihoodPathListFilter->GetOutput();
-    for(typename LikelihoodPathListFilterType::PathListType::ConstIterator it 
+    for(typename LikelihoodPathListFilterType::PathListType::ConstIterator it
 	  = m_LikelihoodPathListFilter->GetOutput()->Begin();
       it!=m_LikelihoodPathListFilter->GetOutput()->End();
       ++it)
diff --git a/Code/FeatureExtraction/otbGeometricMomentImageFunction.h b/Code/FeatureExtraction/otbGeometricMomentImageFunction.h
index 40e8e1ec0c..542f8e8b3c 100644
--- a/Code/FeatureExtraction/otbGeometricMomentImageFunction.h
+++ b/Code/FeatureExtraction/otbGeometricMomentImageFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
  * \ingroup ImageFunctions
  */
 
-template < class TInput, 
+template < class TInput,
            class TOutput = float,
 	   class TPrecision = double,
            class TCoordRep = float >
@@ -44,7 +44,7 @@ public:
   typedef itk::ImageFunction< TInput, TOutput,TCoordRep >         Superclass;
   typedef itk::SmartPointer<Self>                                 Pointer;
   typedef itk::SmartPointer<const Self>                           ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(GeometricMomentImageFunction, itk::ImageFunction);
 
@@ -54,7 +54,7 @@ public:
   typedef typename Superclass::IndexType            IndexType;
   typedef typename Superclass::ContinuousIndexType  ContinuousIndexType;
   typedef typename Superclass::PointType            PointType;
- 
+
   typedef TOutput                                   OutputType;
   /** Type for calculation precision */
   typedef TPrecision                                PrecisionType;
@@ -65,18 +65,18 @@ public:
   itkGetConstReferenceMacro( NeighborhoodRadius, int );
 
 protected:
-  GeometricMomentImageFunction() 
+  GeometricMomentImageFunction()
   	{
 	m_NeighborhoodRadius = -1;
 	};
-	
+
   ~GeometricMomentImageFunction(){};
-  void PrintSelf(std::ostream& os, itk::Indent indent) const 
+  void PrintSelf(std::ostream& os, itk::Indent indent) const
      {
       Superclass::PrintSelf( os, indent );
-      os << indent << " m_NeighborhoodRadius: "  << m_NeighborhoodRadius << std::endl;     
+      os << indent << " m_NeighborhoodRadius: "  << m_NeighborhoodRadius << std::endl;
      }
-     
+
 private:
   GeometricMomentImageFunction( const Self& ); //purposely not implemented
   void operator=( const Self& );               //purposely not implemented
diff --git a/Code/FeatureExtraction/otbGeometricMomentPathFunction.h b/Code/FeatureExtraction/otbGeometricMomentPathFunction.h
index c0aa7eb760..a7b4fa5d19 100644
--- a/Code/FeatureExtraction/otbGeometricMomentPathFunction.h
+++ b/Code/FeatureExtraction/otbGeometricMomentPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
  * \ingroup PathFunctions
  */
 
-template < class TInputPath,    
+template < class TInputPath,
            class TOutput,
        	   class TPrecision = double>
 class ITK_EXPORT GeometricMomentPathFunction :
@@ -43,7 +43,7 @@ public:
   typedef PathFunction< TInputPath, TOutput>         Superclass;
   typedef itk::SmartPointer<Self>                    Pointer;
   typedef itk::SmartPointer<const Self>              ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(GeometricMomentPathFunction, PathFunction);
 
@@ -51,7 +51,7 @@ public:
   /** InputPathType typedef support. */
   typedef typename Superclass::InputPathType         PathType;
   typedef typename Superclass::InputPathConstPointer PathConstPointer;
- 
+
   /** OutputPathType typedef support. */
   typedef typename Superclass::OutputType            OutputType;
 
@@ -62,11 +62,11 @@ public:
 protected:
   GeometricMomentPathFunction() {};
   ~GeometricMomentPathFunction(){};
-  void PrintSelf(std::ostream& os, itk::Indent indent) const 
+  void PrintSelf(std::ostream& os, itk::Indent indent) const
      {
       Superclass::PrintSelf( os, indent );
      }
-     
+
 private:
   GeometricMomentPathFunction( const Self& ); //purposely not implemented
   void operator=( const Self& );               //purposely not implemented
diff --git a/Code/FeatureExtraction/otbHarrisImageFilter.h b/Code/FeatureExtraction/otbHarrisImageFilter.h
index 0877f78d85..9acfcd4193 100644
--- a/Code/FeatureExtraction/otbHarrisImageFilter.h
+++ b/Code/FeatureExtraction/otbHarrisImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -56,7 +56,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -71,7 +71,7 @@ public:
   itkNewMacro(Self);
 
   itkTypeMacro(HarrisImageFilter, ImageToImageFilter);
-  
+
   typedef typename InputImageType::PixelType  InputPixelType;
   typedef typename InputImageType::SizeType SizeType;
 
@@ -79,15 +79,15 @@ public:
 
 //  typedef typename InputImageType::SizeType SizeType;
 
-  typedef itk::Image< itk::SymmetricSecondRankTensor< 
+  typedef itk::Image< itk::SymmetricSecondRankTensor<
                       typename itk::NumericTraits< InputPixelType>::RealType,
                                       ::itk::GetImageDimension<InputImageType>::ImageDimension >,
                       ::itk::GetImageDimension<InputImageType>::ImageDimension >  TensorType;
-		      
+
   typedef itk::HessianRecursiveGaussianImageFilter<InputImageType,TensorType >  HessianFilterType;
-  
+
   typedef itk::RecursiveGaussianImageFilter<TensorType,
-                                            TensorType>                     GaussianFilterType;  
+                                            TensorType>                     GaussianFilterType;
   typedef otb::HessianToScalarImageFilter<TensorType,OutputImageType >      HessianToScalarFilterType;
   typedef otb::MultiplyByScalarImageFilter<OutputImageType,OutputImageType> MultiplyScalarFilterType;
 
@@ -104,7 +104,7 @@ protected:
   virtual ~HarrisImageFilter() {};
 
   virtual void GenerateData();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -114,11 +114,11 @@ private:
   double m_SigmaD;
   double m_SigmaI;
   double m_Alpha;
-  
+
   typename HessianFilterType::Pointer           m_HessianFilter;
   typename GaussianFilterType::Pointer          m_GaussianFilter;
   typename HessianToScalarFilterType::Pointer   m_HessianToScalarFilter;
-  typename MultiplyScalarFilterType::Pointer    m_MultiplyScalarFilter; 
+  typename MultiplyScalarFilterType::Pointer    m_MultiplyScalarFilter;
 };
 } // end namespace otb
 
@@ -126,5 +126,5 @@ private:
 #include "otbHarrisImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbHarrisImageFilter.txx b/Code/FeatureExtraction/otbHarrisImageFilter.txx
index 40b812cb42..277b582e8b 100644
--- a/Code/FeatureExtraction/otbHarrisImageFilter.txx
+++ b/Code/FeatureExtraction/otbHarrisImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,9 +34,9 @@ HarrisImageFilter<TInputImage, TOutputImage>
   m_SigmaD = 1.0;
   m_SigmaI = 1.0;
   m_Alpha  = 1.0;
-  
+
   m_HessianFilter         = HessianFilterType::New();
-  m_GaussianFilter        = GaussianFilterType::New();  
+  m_GaussianFilter        = GaussianFilterType::New();
   m_HessianToScalarFilter = HessianToScalarFilterType::New();
   m_MultiplyScalarFilter  = MultiplyScalarFilterType::New();
 }
@@ -54,14 +54,14 @@ HarrisImageFilter<TInputImage, TOutputImage>
   m_GaussianFilter->SetSigma( this->m_SigmaI );
   m_GaussianFilter->SetOrder( GaussianFilterType::ZeroOrder );
   m_GaussianFilter->SetNormalizeAcrossScale(false);
-  
+
   m_HessianToScalarFilter->SetInput( m_GaussianFilter->GetOutput() );
   m_HessianToScalarFilter->SetAlpha( this->m_Alpha );
 
   m_MultiplyScalarFilter->SetInput( m_HessianToScalarFilter->GetOutput() );
   m_MultiplyScalarFilter->SetCoef( (m_SigmaD*m_SigmaD) );
-  
-  m_MultiplyScalarFilter->GraftOutput(this->GetOutput() ); 
+
+  m_MultiplyScalarFilter->GraftOutput(this->GetOutput() );
   m_MultiplyScalarFilter->Update();
   this->GraftOutput(m_MultiplyScalarFilter->GetOutput() );
 }
@@ -71,7 +71,7 @@ HarrisImageFilter<TInputImage, TOutputImage>
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutput>
-void 
+void
 HarrisImageFilter<TInputImage, TOutput>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.h b/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.h
index 1457c781d0..d40a773a31 100644
--- a/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.h
+++ b/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,9 +29,9 @@ namespace otb
  *
  */
 
-template <class TInputImage, 
+template <class TInputImage,
           class TOutputPointSet = itk::PointSet<ITK_TYPENAME TInputImage::PixelType,2> >
-class ITK_EXPORT HarrisImageToPointSetFilter :  
+class ITK_EXPORT HarrisImageToPointSetFilter :
            public ImageToPointSetFilter< TInputImage,TOutputPointSet >
 {
 public:
@@ -51,14 +51,14 @@ public:
   itkNewMacro(Self);
 
   itkTypeMacro(HarrisImageToPointSetFilter, ImageToPointSetFilter);
-  
+
   typedef typename InputImageType::PixelType  InputPixelType;
   typedef typename InputImageType::SizeType   SizeType;
 
   typedef typename otb::HarrisImageFilter<InputImageType,InputImageType>         HarrisImageFilterType;
   typedef typename otb::ThresholdImageToPointSetFilter<InputImageType,
-  			 			  OutputPointSetType>       ThresholdImageToPointSetType; 
-  
+  			 			  OutputPointSetType>       ThresholdImageToPointSetType;
+
   typedef typename OutputPointSetType::PixelType OutputPixelType;
 
   itkSetMacro(SigmaD,double);
@@ -77,7 +77,7 @@ protected:
   virtual ~HarrisImageToPointSetFilter() {};
 
   virtual void GenerateData();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -89,7 +89,7 @@ private:
   double         m_SigmaD;
   double         m_SigmaI;
   double         m_Alpha;
-  
+
   typename HarrisImageFilterType::Pointer           m_HarrisFilter;
   typename ThresholdImageToPointSetType::Pointer    m_ThresholdFilter;
 
@@ -100,5 +100,5 @@ private:
 #include "otbHarrisImageToPointSetFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.txx b/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.txx
index ac54314247..7001a8ca44 100644
--- a/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.txx
+++ b/Code/FeatureExtraction/otbHarrisImageToPointSetFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,10 +34,10 @@ HarrisImageToPointSetFilter<TInputImage, TOutputPointSet>
   m_SigmaD = 1.0;
   m_SigmaI = 1.0;
   m_Alpha  = 1.0;
-  
-  m_LowerThreshold = itk::NumericTraits<InputPixelType>::NonpositiveMin();  
+
+  m_LowerThreshold = itk::NumericTraits<InputPixelType>::NonpositiveMin();
   m_UpperThreshold = itk::NumericTraits<InputPixelType>::max();
-  
+
   m_HarrisFilter     = HarrisImageFilterType::New();
   m_ThresholdFilter  = ThresholdImageToPointSetType::New();
 }
@@ -47,8 +47,8 @@ void
 HarrisImageToPointSetFilter<TInputImage, TOutputPointSet>
 ::GenerateData()
 {
-   
-  typename OutputPointSetType::Pointer pointList = this->GetOutput(); 
+
+  typename OutputPointSetType::Pointer pointList = this->GetOutput();
 
   m_HarrisFilter->SetInput( 0, this->GetInput(0) );
   m_HarrisFilter->SetSigmaD( m_SigmaD );
@@ -56,12 +56,12 @@ HarrisImageToPointSetFilter<TInputImage, TOutputPointSet>
   m_HarrisFilter->SetAlpha(  m_Alpha  );
 
   m_ThresholdFilter->SetInput(0,m_HarrisFilter->GetOutput() );
-  m_ThresholdFilter->SetLowerThreshold(m_LowerThreshold); 
-  m_ThresholdFilter->SetUpperThreshold(m_UpperThreshold); 
+  m_ThresholdFilter->SetLowerThreshold(m_LowerThreshold);
+  m_ThresholdFilter->SetUpperThreshold(m_UpperThreshold);
 
-  m_ThresholdFilter->SetOutput(pointList ); 
+  m_ThresholdFilter->SetOutput(pointList );
   m_ThresholdFilter->Update();
- 
+
 }
 
 
@@ -69,7 +69,7 @@ HarrisImageToPointSetFilter<TInputImage, TOutputPointSet>
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputPointSet>
-void 
+void
 HarrisImageToPointSetFilter<TInputImage, TOutputPointSet>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbHessianToScalarImageFilter.h b/Code/FeatureExtraction/otbHessianToScalarImageFilter.h
index 3f2075c4a6..2c55c0b4c8 100644
--- a/Code/FeatureExtraction/otbHessianToScalarImageFilter.h
+++ b/Code/FeatureExtraction/otbHessianToScalarImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,13 +22,13 @@
 
 namespace otb
 {
-  
+
 /** \class HessianToScalarImageFilter
- * 
+ *
  */
 
-namespace Functor {  
-  
+namespace Functor {
+
 template< class TInput, class TOutput >
 class HessianToScalar
 {
@@ -37,16 +37,16 @@ public:
   ~HessianToScalar() {};
   inline TOutput operator()( const TInput & Hessian )
   {
-    
+
     TOutput det;
     TOutput trace;
     TOutput result;
-    
+
     det   = static_cast<TOutput>( Hessian(0,0) * Hessian(1,1) - Hessian(0,1) * Hessian(1,0) );
     trace = static_cast<TOutput>( Hessian(0,0) + Hessian(1,1) );
-    
+
     result = det - ( static_cast<TOutput>(m_Alpha) * trace * trace );
-    
+
     return result;
   }
 
@@ -56,12 +56,12 @@ public:
   }
   double GetAlpha(void)const
   {
-  	return (  m_Alpha ); 
+  	return (  m_Alpha );
   }
 
 private:
-  double  m_Alpha;  
-}; 
+  double  m_Alpha;
+};
 }
 
 template <class TInputImage, class TOutputImage>
@@ -69,7 +69,7 @@ class ITK_EXPORT HessianToScalarImageFilter :
     public itk::UnaryFunctorImageFilter<
             TInputImage,TOutputImage,
             Functor::HessianToScalar<
-                   ITK_TYPENAME TInputImage::PixelType, 
+                   ITK_TYPENAME TInputImage::PixelType,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
 public:
@@ -77,25 +77,25 @@ public:
   typedef HessianToScalarImageFilter                                      Self;
   typedef typename itk::UnaryFunctorImageFilter<
                              TInputImage,
-		             TOutputImage, 
-                             Functor::HessianToScalar< 
-				       ITK_TYPENAME TInputImage::PixelType, 
+		             TOutputImage,
+                             Functor::HessianToScalar<
+				       ITK_TYPENAME TInputImage::PixelType,
 		                       ITK_TYPENAME TOutputImage::PixelType> > Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   void SetAlpha(double Alpha)
   {
 	this->GetFunctor().SetAlpha( Alpha );
         this->Modified();
-  }  
+  }
   double GetAlpha(void)const
   {
 	return( this->GetFunctor().GetAlpha() );
-  }  
+  }
 protected:
   HessianToScalarImageFilter() {}
   virtual ~HessianToScalarImageFilter() {}
@@ -104,7 +104,7 @@ private:
   HessianToScalarImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbHuImageFunction.h b/Code/FeatureExtraction/otbHuImageFunction.h
index b5f41eb44c..b7622c794b 100644
--- a/Code/FeatureExtraction/otbHuImageFunction.h
+++ b/Code/FeatureExtraction/otbHuImageFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,7 +36,7 @@ namespace otb
  * - \f$ \phi_{5} = Re (c_{30} c_{12}^{3}) \f$
  * - \f$ \phi_{6} = Re (c_{20} c_{12}^{2}) \f$
  * - \f$ \phi_{7} = Im (c_{30} c_{12}^{3}) \f$
- *  
+ *
  * With :
  *
  *  \f[  c_{p,q}=\int_{-\infty}^{\infty} \int_{-\infty}^{\infty} (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot
@@ -48,12 +48,12 @@ namespace otb
  *
  * This class is templated over the input image type and the
  * coordinate representation type (e.g. float or double).
- * 
+ *
  * \ingroup ImageFunctions
  */
 //  public itk::ImageFunction< TInput, TOutput,TCoordRep >
 
-template < class TInput, 
+template < class TInput,
            class TOutput    = double,
            class TPrecision = double,
 	   class TCoordRep  = float >
@@ -66,7 +66,7 @@ public:
   typedef RealMomentImageFunction< TInput, TOutput, TPrecision, TCoordRep >      Superclass;
   typedef itk::SmartPointer<Self>                                   Pointer;
   typedef itk::SmartPointer<const Self>                             ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(HuImageFunction, RealMomentImageFunction);
 
@@ -84,33 +84,33 @@ public:
 
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType        PrecisionType;
-   
+
   /** Dimension of the underlying image. */
   itkStaticConstMacro(ImageDimension, unsigned int,
                       InputType::ImageDimension);
-  			 
+
 
   /** Evalulate the function at specified index */
   virtual RealType EvaluateAtIndex( const IndexType& index ) const;
 
    /** Evaluate the function at non-integer positions */
   virtual RealType Evaluate( const PointType& point ) const
-    { 
+    {
       IndexType index;
       this->ConvertPointToNearestIndex( point, index );
-      return this->EvaluateAtIndex( index ); 
+      return this->EvaluateAtIndex( index );
     }
-  virtual RealType EvaluateAtContinuousIndex( 
+  virtual RealType EvaluateAtContinuousIndex(
     const ContinuousIndexType& cindex ) const
-    { 
+    {
       IndexType index;
       this->ConvertContinuousIndexToNearestIndex( cindex, index );
-      return this->EvaluateAtIndex( index ) ; 
+      return this->EvaluateAtIndex( index ) ;
     }
- 
+
 
   /** Get/Set the radius of the neighborhood over which the
-      statistics are evaluated */  
+      statistics are evaluated */
   itkSetClampMacro(MomentNumber,short,1,7);
   itkGetConstReferenceMacro( MomentNumber, short );
 
@@ -123,7 +123,7 @@ private:
   HuImageFunction( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
 
-  short m_MomentNumber;  
+  short m_MomentNumber;
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbHuImageFunction.txx b/Code/FeatureExtraction/otbHuImageFunction.txx
index 941ff86682..32ce0cbba5 100644
--- a/Code/FeatureExtraction/otbHuImageFunction.txx
+++ b/Code/FeatureExtraction/otbHuImageFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ template < class TInput, class TOutput, class TPrecision, class TCoordRep>
 HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 ::HuImageFunction()
 {
-  m_MomentNumber =-1; 
+  m_MomentNumber =-1;
 }
 
 /**
@@ -82,7 +82,7 @@ HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 
   switch(m_MomentNumber)
     {
-    case 1 : 
+    case 1 :
         {
 	ComplexType C11;
 	function->SetP(1);
@@ -95,7 +95,7 @@ HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
         {
 	ComplexType C20,C02;
 	function->SetP(2);
-	function->SetQ(0);	
+	function->SetQ(0);
 	C20 = function->EvaluateAtIndex( index );
 	function->SetP(0);
 	function->SetQ(2);
@@ -129,7 +129,7 @@ HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	C12 = function->EvaluateAtIndex( index );
 
 	HuValue = vcl_abs( C21 * C12 );
-	}	
+	}
 	break;
 
     case 5:
@@ -143,8 +143,8 @@ HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	C12 = function->EvaluateAtIndex( index );
 
 	HuValueComplex = C30 * vcl_pow(C12,3) ;
-	HuValue = HuValueComplex.real();       
-	}	
+	HuValue = HuValueComplex.real();
+	}
 	break;
 
     case 6:
@@ -158,8 +158,8 @@ HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	C12 = function->EvaluateAtIndex( index );
 
 	HuValueComplex = C20 * vcl_pow( C12 ,2 );
-	HuValue = HuValueComplex.real();         
-	}	
+	HuValue = HuValueComplex.real();
+	}
 	break;
 
     case 7:
@@ -173,12 +173,12 @@ HuImageFunction<TInput,TOutput,TPrecision,TCoordRep>
 	C12 = function->EvaluateAtIndex( index );
 
 	HuValueComplex = C30 * vcl_pow( C12 , 3);
-	HuValue = HuValueComplex.imag();         
-	}	
+	HuValue = HuValueComplex.imag();
+	}
 	break;
-	
+
     default:
-	itkWarningMacro("Hu's invariant parameters are between 1 and 7");	
+	itkWarningMacro("Hu's invariant parameters are between 1 and 7");
     }
 
 
diff --git a/Code/FeatureExtraction/otbHuPathFunction.h b/Code/FeatureExtraction/otbHuPathFunction.h
index 736d969f06..be01c3749c 100644
--- a/Code/FeatureExtraction/otbHuPathFunction.h
+++ b/Code/FeatureExtraction/otbHuPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,7 +36,7 @@ namespace otb
  * - \f$ \phi_{5} = Re (c_{30} c_{12}^{3}) \f$
  * - \f$ \phi_{6} = Re (c_{20} c_{12}^{2}) \f$
  * - \f$ \phi_{7} = Im (c_{30} c_{12}^{3}) \f$
- *  
+ *
  * With :
  *
  *  \f[  c_{p,q}=\int \int (x+iy)^{p} \cdot (x-iy)^{q} \cdot f(x,y) \cdot
@@ -48,11 +48,11 @@ namespace otb
  *
  * This class is templated over the input image type and the
  * path type (e.g. PolyLineParametricPath<2> ).
- * 
+ *
  * \ingroup FunctionFunctions
  */
 
-template < class TInputPath,    
+template < class TInputPath,
            class TOutput    = double,
            class TPrecision = double>
 class ITK_EXPORT HuPathFunction :
@@ -64,7 +64,7 @@ public:
   typedef RealMomentPathFunction<TInputPath, TOutput, TPrecision>   Superclass;
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(HuPathFunction, RealMomentPathFunction);
 
@@ -73,14 +73,14 @@ public:
 
   /** InputPathType typedef support. */
   typedef typename Superclass::PathType                 PathType;
-  typedef typename Superclass::PathConstPointer         PathConstPointer;  
+  typedef typename Superclass::PathConstPointer         PathConstPointer;
   typedef typename PathType::ContinuousIndexType        VertexType;
   typedef itk::VectorContainer< unsigned,VertexType >   VertexListType;
   typedef typename VertexListType::ConstPointer         VertexListPointer;
 
   /** OutputType typedef support. */
-  typedef typename Superclass::RealType                 RealType;  			 
- 
+  typedef typename Superclass::RealType                 RealType;
+
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType            PrecisionType;
 
@@ -88,7 +88,7 @@ public:
   virtual RealType Evaluate( const PathType& path) const;
   virtual RealType Evaluate( ) const;
   /** Get/Set the radius of the neighborhood over which the
-      statistics are evaluated */  
+      statistics are evaluated */
   itkSetMacro(MomentNumber,short);
   itkGetConstReferenceMacro( MomentNumber, short );
 
@@ -101,7 +101,7 @@ private:
   HuPathFunction( const Self& ); //purposely not implemented
   void operator=( const Self& ); //purposely not implemented
 
-  short m_MomentNumber;  
+  short m_MomentNumber;
 };
 
 } // namespace otb
diff --git a/Code/FeatureExtraction/otbHuPathFunction.txx b/Code/FeatureExtraction/otbHuPathFunction.txx
index e2eeebfdc0..d672b1b268 100644
--- a/Code/FeatureExtraction/otbHuPathFunction.txx
+++ b/Code/FeatureExtraction/otbHuPathFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ template < class TInputPath, class TOutput, class TPrecision>
 HuPathFunction< TInputPath, TOutput, TPrecision  >
 ::HuPathFunction()
 {
-  m_MomentNumber =-1; 
+  m_MomentNumber =-1;
 }
 
 /**
@@ -57,18 +57,18 @@ HuPathFunction<TInputPath, TOutput, TPrecision  >
 {
   typedef ComplexMomentPathFunction<PathType>   FunctionType;
   typedef typename FunctionType::ComplexType    ComplexType;
-  
+
   RealType                         HuValue;
   ComplexType                      HuValueComplex;
 
   typename FunctionType::Pointer function =FunctionType::New();
- 
+
   function->SetStep( this->GetStep() );
   function->SetInputPath( this->GetInputPath() );
 
   switch(m_MomentNumber)
     {
-    case 1 : 
+    case 1 :
         {
 	ComplexType C11;
 	function->SetP(1);
@@ -115,7 +115,7 @@ HuPathFunction<TInputPath, TOutput, TPrecision  >
 	C12 = function->Evaluate( );
 
 	HuValue = vcl_abs( C21 * C12 );
-	}	
+	}
 	break;
 
     case 5:
@@ -129,8 +129,8 @@ HuPathFunction<TInputPath, TOutput, TPrecision  >
 	C12 = function->Evaluate( );
 
 	HuValueComplex = C30 * vcl_pow(C12,3) ;
-	HuValue = HuValueComplex.real();       
-	}	
+	HuValue = HuValueComplex.real();
+	}
 	break;
 
     case 6:
@@ -144,8 +144,8 @@ HuPathFunction<TInputPath, TOutput, TPrecision  >
 	C12 = function->Evaluate( );
 
 	HuValueComplex = C20 * vcl_pow( C12 ,2 );
-	HuValue = HuValueComplex.real();         
-	}	
+	HuValue = HuValueComplex.real();
+	}
 	break;
 
     case 7:
@@ -159,12 +159,12 @@ HuPathFunction<TInputPath, TOutput, TPrecision  >
 	C12 = function->Evaluate( );
 
 	HuValueComplex = C30 * vcl_pow( C12 , 3);
-	HuValue = HuValueComplex.imag();         
-	}	
+	HuValue = HuValueComplex.imag();
+	}
 	break;
-	
+
     default:
-	itkWarningMacro("Hu's invariant parameters are between 1 and 7");	
+	itkWarningMacro("Hu's invariant parameters are between 1 and 7");
     }
 
   return (static_cast<RealType>(HuValue) );
@@ -183,7 +183,7 @@ HuPathFunction<TInputPath, TOutput, TPrecision >
     }
 
   RealType Result =  Evaluate( *(this->GetInputPath()) );
-  
+
   return Result;
 
 }
diff --git a/Code/FeatureExtraction/otbImageFittingPolygonListFilter.h b/Code/FeatureExtraction/otbImageFittingPolygonListFilter.h
index bff0584dbd..cd78512ce2 100644
--- a/Code/FeatureExtraction/otbImageFittingPolygonListFilter.h
+++ b/Code/FeatureExtraction/otbImageFittingPolygonListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ namespace otb
 {
 /** \class ImageFittingPolygonListFilter
  *  \brief Slightly deform polygon to reach higher enery from the image
- * 
+ *
  * <br>Limitations:</br> This filter is currently working with integer position
  * for the polygon vertices. It should be optimized for continuous positions.
  *
@@ -41,13 +41,13 @@ class ITK_EXPORT ImageFittingPolygonListFilter
   typedef PathListToPathListFilter<TPath>       Superclass;
   typedef itk::SmartPointer<Self>               Pointer;
   typedef itk::SmartPointer<const Self>         ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageFittingPolygonListFilter, PathListToPathListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PathType         PathType;
   typedef typename Superclass::PathListType     PathListType;
@@ -62,29 +62,29 @@ class ITK_EXPORT ImageFittingPolygonListFilter
   typedef TImage ImageType;
   typedef typename ImageType::Pointer ImagePointerType;
   typedef typename ImageType::ConstPointer ImageConstPointerType;
-  
+
   typedef itk::LineConstIterator<ImageType> LineConstIteratorType;
-  
+
   /**
    * Set the input Likelihood image.
    * \param image The Likelihood image.
    */
   void SetInputImage(const ImageType * image);
-  
+
   /**
    * Get the input Likelihood image.
    * \return The input Likelihood image.
    */
   const ImageType * GetInputImage(void);
-  
+
   /** Set/Get the search radius. */
   itkSetMacro(Radius,unsigned int);
   itkGetMacro(Radius,unsigned int);
-  
+
   /** Set/Get the number of iteration. */
   itkSetMacro(NumberOfIterations,unsigned int);
   itkGetMacro(NumberOfIterations,unsigned int);
-  
+
 protected:
   /** Constructor */
   ImageFittingPolygonListFilter();
@@ -96,15 +96,15 @@ protected:
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   virtual double computeValue(ImageConstPointerType image, VertexType middlePoint, VertexType previousPoint, VertexType nextPoint) const;
-  
+
   unsigned int m_Radius;
   unsigned int m_NumberOfIterations;
-  
+
 private:
   ImageFittingPolygonListFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/FeatureExtraction/otbImageFittingPolygonListFilter.txx b/Code/FeatureExtraction/otbImageFittingPolygonListFilter.txx
index 5b0e5d0e41..5f5309013b 100644
--- a/Code/FeatureExtraction/otbImageFittingPolygonListFilter.txx
+++ b/Code/FeatureExtraction/otbImageFittingPolygonListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -62,7 +62,7 @@ ImageFittingPolygonListFilter<TPath, TImage>
 
 //FIXME
 //There is an issue here with integer and continous indexes
-//maybe we should use the itk::LineConstIterator 
+//maybe we should use the itk::LineConstIterator
 template <class TPath, class TImage>
 void
 ImageFittingPolygonListFilter<TPath, TImage>
@@ -75,7 +75,7 @@ ImageFittingPolygonListFilter<TPath, TImage>
 
 
   typename ImageType::RegionType regionLargest=inputImagePtr->GetLargestPossibleRegion();
-      
+
   typedef itk::ImageRegionConstIteratorWithIndex<ImageType> NeighborhoodIteratorType;
 
   typename ImageType::SizeType size;
@@ -84,12 +84,12 @@ ImageFittingPolygonListFilter<TPath, TImage>
   typename ImageType::RegionType region;
   region.SetSize(size);
   typename ImageType::IndexType start;
-  
+
   //go through all the polygons in the list
   for(IteratorType it = inputPtr->Begin(); it != inputPtr->End(); ++it)
   {
     PathPointerType polygon = it.Get();
-    
+
     if(polygon->GetVertexList()->Size()>2)
     {
       for (int iteration=0;iteration < m_NumberOfIterations;++iteration)
@@ -111,7 +111,7 @@ ImageFittingPolygonListFilter<TPath, TImage>
          * to factorize
          * */
         {
-          
+
         start[0] = static_cast<long int>(currentPoint[0]-m_Radius);
         start[1] = static_cast<long int>(currentPoint[1]-m_Radius);
         region.SetIndex(start);
@@ -173,17 +173,17 @@ ImageFittingPolygonListFilter<TPath, TImage>
       newPolygon->AddVertex(maxPoint);
       }
       /** End 'to factorize' */
-      
+
       previousPoint = currentPoint;
       currentPoint= firstPoint;
       vertexIt = newPolygon->GetVertexList()->Begin();
       nextPoint=vertexIt.Value();
-      
+
        /** try all the possible neighbor for the current point
        * to factorize
        * */
       {
-      
+
       start[0] = static_cast<long int>(currentPoint[0]-m_Radius);
       start[1] = static_cast<long int>(currentPoint[1]-m_Radius);
       region.SetIndex(start);
@@ -208,15 +208,15 @@ ImageFittingPolygonListFilter<TPath, TImage>
       newPolygon->AddVertex(maxPoint);
       }
       /** End 'to factorize' */
-      
+
       polygon = newPolygon;//prepare the next iteration
       }
     }
-    
+
     outputPtr->PushBack(polygon);
 
   }//going through the polygon list
-        
+
 
 }
 
diff --git a/Code/FeatureExtraction/otbImageToCarvingPathFilter.h b/Code/FeatureExtraction/otbImageToCarvingPathFilter.h
index 02ada6c5e4..55a42f5791 100644
--- a/Code/FeatureExtraction/otbImageToCarvingPathFilter.h
+++ b/Code/FeatureExtraction/otbImageToCarvingPathFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,25 +25,25 @@ namespace otb {
 /**
  * \class ImageToCarvingPathFilter
  * \brief This filter find the minimum energy path of an image.
- * 
- * This filter find the minimum energy path from top to bottom of 
- * the image (if Direction is set to 0) or from left to right 
+ *
+ * This filter find the minimum energy path from top to bottom of
+ * the image (if Direction is set to 0) or from left to right
  * (if direction is set to 1).
- * 
+ *
  * This is one component necessary to apply the seam carving algorithm
  * published by Shai Avidan, Ariel Shamir,
  * Seam Carving for Content-Aware Image Resizing,
- * ACM Transactions on Graphics, Volume 26, Number 3,  
+ * ACM Transactions on Graphics, Volume 26, Number 3,
  * SIGGRAPH 2007
- * 
+ *
  * \par INPUTS
- * The input is an image, typically the output of a gradient filter. 
- * 
+ * The input is an image, typically the output of a gradient filter.
+ *
  * \par OUTPUTS
  * The output is
- * a polyline parametric path comprising one and only one pixel per line 
+ * a polyline parametric path comprising one and only one pixel per line
  * (resp. column) if direction is 0 (resp. 1).
- * 
+ *
  * \sa RemoveCarvingPathFilter
  *
  * \ingroup PathFilters
@@ -72,22 +72,22 @@ public:
   typedef typename Superclass::InputImagePointerType InputImagePointerType;
   typedef typename Superclass::OutputPathType        OutputPathType;
   typedef typename Superclass::OutputPathPointerType OutputPathPointerType;
-  
+
   typedef typename InputImageType::PixelType		 PixelType;
-  
 
-  
+
+
   /** Set and Get foreground value */
   itkSetMacro(ForegroundValue,PixelType);
   itkGetConstMacro(ForegroundValue,PixelType);
-  
+
   /** Set and Get direction value */
   itkSetMacro(Direction ,unsigned int);
   itkGetConstMacro(Direction ,unsigned int);
-  
+
   /** Get EnergyPerPix value */
   itkGetConstMacro(EnergyPerPix ,double);
-  
+
 protected:
   ImageToCarvingPathFilter();
   virtual ~ImageToCarvingPathFilter(){};
@@ -98,8 +98,8 @@ protected:
 private:
   ImageToCarvingPathFilter(const Self&); // purposely not implemented
   void operator=(const Self&); // purposely not implemented
-  
-  PixelType m_ForegroundValue; 
+
+  PixelType m_ForegroundValue;
   unsigned int m_Direction;
   double m_EnergyPerPix;
 };
diff --git a/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx b/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx
index f0f185b590..94904faced 100644
--- a/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx
+++ b/Code/FeatureExtraction/otbImageToCarvingPathFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,49 +47,49 @@ void
 ImageToCarvingPathFilter<TInputImage, TOutputPath>
 ::GenerateData(void)
 {
-  
+
   const InputImageType * inputImage = this->GetInput();
   OutputPathType * outputPath       = this->GetOutput();
- 
+
   typedef itk::ImageSliceConstIteratorWithIndex
       <InputImageType> IteratorType;
   typedef itk::NeighborhoodIterator< InputImageType >
       NeighborhoodIteratorType;
-  
-  IteratorType it(inputImage, 
-           inputImage->GetLargestPossibleRegion()); 
+
+  IteratorType it(inputImage,
+           inputImage->GetLargestPossibleRegion());
   it.GoToBegin();
- 
+
   PixelType maxValue = itk::NumericTraits< PixelType >::max();
-  
+
   typename InputImageType::Pointer energyImage = InputImageType::New();
   energyImage->SetRegions(inputImage-> GetLargestPossibleRegion());
   energyImage->Allocate();
-  
+
   typename NeighborhoodIteratorType::RadiusType radius;
   radius.Fill(1);
   NeighborhoodIteratorType neighIt(radius, energyImage,
                                    energyImage-> GetLargestPossibleRegion() );
   neighIt.GoToBegin();
-  
+
   unsigned int dir0;
   unsigned int dir1;
-  
+
   typename IteratorType::OffsetType UP0;
   typename IteratorType::OffsetType UP1;
   typename IteratorType::OffsetType UP2;
   typename IteratorType::OffsetType NEXT;
-  
-  
-    const typename IteratorType::OffsetType LEFT   ={{-1,0}}; 
-    const typename IteratorType::OffsetType RIGHT  ={{1,0}}; 
-    const typename IteratorType::OffsetType UP     ={{0,-1}}; 
-    const typename IteratorType::OffsetType DOWN   ={{0,1}}; 
-    const typename IteratorType::OffsetType LEFTUP   ={{-1,-1}}; 
-//    const typename IteratorType::OffsetType RIGHTDOWN ={{1,1}}; 
-    const typename IteratorType::OffsetType RIGHTUP  ={{1,-1}}; 
-    const typename IteratorType::OffsetType LEFTDOWN ={{-1,1}}; 
-//    const typename IteratorType::OffsetType CENTER ={{0,0}}; 
+
+
+    const typename IteratorType::OffsetType LEFT   ={{-1,0}};
+    const typename IteratorType::OffsetType RIGHT  ={{1,0}};
+    const typename IteratorType::OffsetType UP     ={{0,-1}};
+    const typename IteratorType::OffsetType DOWN   ={{0,1}};
+    const typename IteratorType::OffsetType LEFTUP   ={{-1,-1}};
+//    const typename IteratorType::OffsetType RIGHTDOWN ={{1,1}};
+    const typename IteratorType::OffsetType RIGHTUP  ={{1,-1}};
+    const typename IteratorType::OffsetType LEFTDOWN ={{-1,1}};
+//    const typename IteratorType::OffsetType CENTER ={{0,0}};
 
   if (m_Direction == 0)
   {
@@ -109,7 +109,7 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
     UP2 = LEFTDOWN;
     NEXT = RIGHT;
   }
-  
+
   /** Compute the energy image top-down or left-right
    * with cumulative energy (dynamic programming first step) */
   it.SetFirstDirection( dir0 );
@@ -123,11 +123,11 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
       {
         neighIt.SetLocation(it.GetIndex());//TODO bad for performances... find a better option
         // this is really about 20% of total processing time !!!
-  
+
         PixelType min = maxValue;
         bool isInside = false;
         bool flag = false;
-        if (neighIt.GetPixel(UP0, isInside) < min) 
+        if (neighIt.GetPixel(UP0, isInside) < min)
         {
           if (isInside)
           {
@@ -135,7 +135,7 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
             flag = true;
           }
         }
-        if (neighIt.GetPixel(UP1, isInside) < min) 
+        if (neighIt.GetPixel(UP1, isInside) < min)
         {
           if (isInside)
           {
@@ -143,7 +143,7 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
             flag = true;
           }
         }
-        if (neighIt.GetPixel(UP2, isInside) < min) 
+        if (neighIt.GetPixel(UP2, isInside) < min)
         {
           if (isInside)
           {
@@ -151,34 +151,34 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
             flag = true;
           }
         }
-        
+
         if (!flag) //no previous value
         {
           min = 0;
         }
-        
+
         PixelType newValue = it.Get() + min;
         neighIt.SetCenterPixel(newValue);
-        
+
         ++it;
-        
+
       }
       it.NextLine();
     }
     it.NextSlice();
   }
-  
-  
 
-  
+
+
+
     /** Follow the minima bottom-up or right-left
      * (dynamic programming second step) */
-  
+
   //find the starting point to follow on the last line
   typedef itk::ImageLinearConstIteratorWithIndex< InputImageType >
       LinearIteratorType;
-    
-  LinearIteratorType LinIt(energyImage, 
+
+  LinearIteratorType LinIt(energyImage,
                   energyImage->GetLargestPossibleRegion());
   LinIt.SetDirection(dir0);
   LinIt.GoToReverseBegin();
@@ -197,7 +197,7 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
   }
   outputPath->AddVertex(indexToAdd);
   m_EnergyPerPix = ((double) min)/ (inputImage->GetLargestPossibleRegion().GetSize())[dir1];
-  
+
   //follow the min
   neighIt.SetLocation(indexToAdd);
   bool flag=true;
@@ -207,8 +207,8 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
     PixelType min = maxValue;
     IndexType indexToAdd;
     bool isInside = false;
-    
-    if (neighIt.GetPixel(UP0, isInside) < min) 
+
+    if (neighIt.GetPixel(UP0, isInside) < min)
     {
       if (isInside)
       {
@@ -217,8 +217,8 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
         flag = true;
       }
     }
-    
-    if (neighIt.GetPixel(UP1, isInside) < min) 
+
+    if (neighIt.GetPixel(UP1, isInside) < min)
     {
       if (isInside)
       {
@@ -227,8 +227,8 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
         flag = true;
       }
     }
-    
-    if (neighIt.GetPixel(UP2, isInside) < min) 
+
+    if (neighIt.GetPixel(UP2, isInside) < min)
     {
       if (isInside)
       {
@@ -237,15 +237,15 @@ ImageToCarvingPathFilter<TInputImage, TOutputPath>
         flag = true;
       }
     }
-    
+
     if (flag)
     {
       outputPath->AddVertex(indexToAdd);
       neighIt.SetLocation(indexToAdd);
     }
-     
+
   }
-  
+
 }
 
 template <class TInputImage, class TOutputPath>
diff --git a/Code/FeatureExtraction/otbImageToEdgePathFilter.h b/Code/FeatureExtraction/otbImageToEdgePathFilter.h
index 75432fc35d..c7810836bc 100644
--- a/Code/FeatureExtraction/otbImageToEdgePathFilter.h
+++ b/Code/FeatureExtraction/otbImageToEdgePathFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,20 +32,20 @@ namespace otb {
  * objects. The padding constant is chosen as regard to the ForegroundValue (label of
  * the object) to avoid confusion on foreground and background values.
  *
- * The edge computation is divided into two steps. 
+ * The edge computation is divided into two steps.
  *
  * First, a linear search is perfomed to detect a first pixel belonging to the edge of
  * the object.
- * 
+ *
  * From that pixel and until the algorithm comes back to this position, the neighborhood
- * is iteratively and clock-wise searched to detect the next pixel in the edge. 
- * 
+ * is iteratively and clock-wise searched to detect the next pixel in the edge.
+ *
  * In case of linear object (in fact open edge), the algorithm will walk the object twice in
  * opposite directions, thus producing an edge with a null surface and twice the length of the
  * object as perimeter.
- * 
+ *
  * This leads to consistant result for geometric descriptors (for instance compacity).
- * \sa ImageToPathFilter 
+ * \sa ImageToPathFilter
  */
 
 
@@ -77,7 +77,7 @@ public:
   /** Set and Get foreground value */
   itkSetMacro(ForegroundValue,PixelType);
   itkGetConstMacro(ForegroundValue,PixelType);
-  
+
 protected:
   ImageToEdgePathFilter();
   virtual ~ImageToEdgePathFilter(){};
@@ -88,8 +88,8 @@ protected:
 private:
   ImageToEdgePathFilter(const Self&); // purposely not implemented
   void operator=(const Self&); // purposely not implemented
-  
-  PixelType m_ForegroundValue; 
+
+  PixelType m_ForegroundValue;
 };
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbImageToEdgePathFilter.txx b/Code/FeatureExtraction/otbImageToEdgePathFilter.txx
index 5cbe34bf7b..bd5d290c2c 100644
--- a/Code/FeatureExtraction/otbImageToEdgePathFilter.txx
+++ b/Code/FeatureExtraction/otbImageToEdgePathFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,18 +43,18 @@ void
 ImageToEdgePathFilter<TInputImage, TOutputPath>
 ::GenerateData(void)
 {
-  
+
   const InputImageType * inputImage = this->GetInput();
   OutputPathType * outputPath       = this->GetOutput();
- 
+
   otbMsgDebugMacro(<<"Foreground value : "<<m_ForegroundValue);
-  
+
   PixelType initPadConstant(0);
   if( initPadConstant == m_ForegroundValue )
   {
   	initPadConstant = 1;
   }
-  
+
   typedef itk::ConstantPadImageFilter<InputImageType,InputImageType> PadFilterType;
   typedef itk::ConstShapedNeighborhoodIterator<InputImageType> IteratorType;
   typedef itk::ImageRegionConstIteratorWithIndex<InputImageType> LinearIteratorType;
@@ -72,7 +72,7 @@ ImageToEdgePathFilter<TInputImage, TOutputPath>
   linIter.GoToBegin();
   bool flag = true;
   while(flag && !linIter.IsAtEnd())
-    {     
+    {
     if(linIter.Get() == m_ForegroundValue )
       {
       flag=false;
@@ -84,7 +84,7 @@ ImageToEdgePathFilter<TInputImage, TOutputPath>
     }
   typename InputImageType::IndexType start = linIter.GetIndex();
  //  outputPath->AddVertex(start);
-  
+
   // Neighborhood definition
   typename IteratorType::RadiusType radius;
   radius.Fill(1);
@@ -160,7 +160,7 @@ ImageToEdgePathFilter<TInputImage, TOutputPath>
 	}
       else
 	{
-	//  Else goes on 
+	//  Else goes on
 	LastWasPositive=(it.GetPixel(rotation[move%8]) == m_ForegroundValue);
 	move++;
 	}
@@ -202,7 +202,7 @@ ImageToEdgePathFilter<TInputImage, TOutputPath>
 	  }
 	}
       }
-      // else 
+      // else
       else
       {
       // search ended, no pixel can be added to the edge path.
diff --git a/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.h b/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.h
index 71175712d8..fb6d1e1e4f 100644
--- a/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.h
+++ b/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.h
@@ -12,8 +12,8 @@ See OTBCopyright.txt for details.
 Copyright (c) CS Systemes d'information. All rights reserved.
 See CSCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,17 +32,17 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  namespace Functor 
+  namespace Functor
     {
       /** \class HessianDeterminant
        * \brief This functor computes the determinant of  symmetric 2*2 matrix .
-       * 
+       *
        * A Hessian matrix is symmetric, we compute only the 3 first parameters
        * The First  component is  : Dxx
        * The Second component is  : Dyy
        * The Third  component is  : Dxy
        */
-      template <class TInput, class TOutput> 
+      template <class TInput, class TOutput>
 	class HessianDeterminant
 	{
 	public:
@@ -50,21 +50,21 @@ namespace otb
 	  ~HessianDeterminant(){};
 
 	  /*
-	   * 
+	   *
 	   * \param input : A symetric Hessian Matrix
-	   * \return  Determinant of the Hessian Matrix 
+	   * \return  Determinant of the Hessian Matrix
 	   */
 	  inline TOutput operator()(const TInput& input)
 	    {
 	      return static_cast<TOutput>(input[0]*input[1] - input[2]*input[2]);
-	        
+
 	    }
-	  
+
 	  bool operator !=(const HessianDeterminant) const
 	    {
 	      return false;
 	    }
-	  
+
 	  bool operator==(const HessianDeterminant & other) const
 	    {
 	      return !(*this != other);
@@ -74,46 +74,46 @@ namespace otb
   /** \class ImageToHessianDeterminantImageFilter
    *  \brief This class compute the Hessian determinant of each pixel of an input image
    *
-   *  For an input image, the Hessian matrix of each pixel is computed an then the determinant 
-   *  of each pixel's matrix is computed. 
-   * 
+   *  For an input image, the Hessian matrix of each pixel is computed an then the determinant
+   *  of each pixel's matrix is computed.
+   *
    *  \sa itk::HessianRecursiveGaussianImageFilter
    */
   template <class TInputImage, class TOutputImage, class TPrecision = double>
     class ITK_EXPORT ImageToHessianDeterminantImageFilter
     : public itk::ImageToImageFilter< TInputImage, TOutputImage >
     {
-      
-      public: 
-         
+
+      public:
+
       /** Standard class typedefs. */
       typedef ImageToHessianDeterminantImageFilter               Self;
       typedef itk::ImageToImageFilter<TInputImage, TOutputImage> Superclass;
       typedef itk::SmartPointer<Self>                            Pointer;
       typedef itk::SmartPointer<const Self>                      ConstPointer;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
-      
+
       /** Set/Get the number of iterations */
       itkSetMacro(Sigma,double);
       itkGetMacro(Sigma,double);
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro(ImageToHessianDeterminantImageFilter,ImageToImageFilter);
-      
+
       /* Initialisation of Input & Output Images*/
       typedef TInputImage                         InputImageType;
       typedef typename InputImageType::Pointer    InputImagePointerType;
       typedef TOutputImage                        OutputImageType;
       typedef typename OutputImageType::Pointer   OutputImagePointerType;
       typedef typename OutputImageType::PixelType OutputPixelType;
-      
+
 
       typedef itk::FixedArray<TPrecision,3>     VectorType;
       typedef otb::Image<VectorType,2>          VectorImageType;
       typedef typename VectorImageType::Pointer VectorImagePointerType;
-      
+
       /** Internal filters typedefs */
       typedef itk::HessianRecursiveGaussianImageFilter
       <InputImageType,VectorImageType>                          ImageToHessianImageFilterType;
@@ -121,8 +121,8 @@ namespace otb
       typedef Functor::HessianDeterminant<VectorType,OutputPixelType> DeterminantFunctorType;
       typedef itk::UnaryFunctorImageFilter<VectorImageType,OutputImageType,DeterminantFunctorType> DeterminantFilterType;
       typedef typename DeterminantFilterType::Pointer DeterminantFilterPointerType;
-      
-      
+
+
       protected:
       /**
        * Constructor.
@@ -140,14 +140,14 @@ namespace otb
        * Main computation method.
        */
       virtual void  GenerateData();
-      
+
       private:
-       
+
       /** Hessian filter */
       ImageToHessianImageFilterPointerType m_HessianFilter;
       /** Hessian Determinant Computation filter */
       DeterminantFilterPointerType         m_DeterminantFilter;
-       
+
       /** Width of the Gaussian used in the HessianRecursiveGaussianImageFilter */
       double m_Sigma;
     };
diff --git a/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.txx b/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.txx
index feabc707fa..79b1ce3bdb 100644
--- a/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.txx
+++ b/Code/FeatureExtraction/otbImageToHessianDeterminantImageFilter.txx
@@ -12,8 +12,8 @@ See OTBCopyright.txt for details.
 Copyright (c) CS Systemes d'information. All rights reserved.
 See CSCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,14 +32,14 @@ namespace otb
     // Filter intialisation
     m_HessianFilter = ImageToHessianImageFilterType::New();
     m_DeterminantFilter = DeterminantFilterType::New();
-    
+
     // pipeline wiring
     m_DeterminantFilter->SetInput(m_HessianFilter->GetOutput());
-    
+
     // default parameter value
     m_Sigma = 1.0;
   }
-  
+
    template <class TInputImage, class TOutputImage, class TPrecision>
     ImageToHessianDeterminantImageFilter<TInputImage,TOutputImage,TPrecision>
   ::~ImageToHessianDeterminantImageFilter()
diff --git a/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.h b/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.h
index 2c27b9c1d4..91b6d70137 100644
--- a/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.h
+++ b/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,13 +30,13 @@ namespace otb
  *
  * This is the base class for alls class' generate modulus and
  * directions outputs.
- * GetOutput() method return the output image modulus and  
- * GetOutputDirection() return the output image direction 
- * 
+ * GetOutput() method return the output image modulus and
+ * GetOutputDirection() return the output image direction
+ *
  */
 template <class TInputImage,
 	class TOutputImage,
-	class TOutputImageDirection = TOutputImage > 
+	class TOutputImageDirection = TOutputImage >
 class ITK_EXPORT ImageToModulusAndDirectionImageFilter :  public itk::ImageToImageFilter< TInputImage, TOutputImage >
 {
 public:
@@ -44,7 +44,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -68,20 +68,20 @@ public:
 
   typedef typename InputImageType::Pointer        InputImagePointer;
   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
-  typedef typename InputImageType::RegionType     InputImageRegionType; 
+  typedef typename InputImageType::RegionType     InputImageRegionType;
   typedef typename OutputImageType::Pointer       OutputImagePointer;
   typedef typename OutputImageType::ConstPointer  OutputImageConstPointer;
-  typedef typename OutputImageType::RegionType    OutputImageRegionType; 
- 
-  /** Return the const output image modulus */  
+  typedef typename OutputImageType::RegionType    OutputImageRegionType;
+
+  /** Return the const output image modulus */
   const OutputImageType * GetOutput() const;
 
-  /** Return the output image modulus */  
+  /** Return the output image modulus */
   OutputImageType * GetOutput();
 
-  /** Return the const output image direction */  
+  /** Return the const output image direction */
   const OutputImageDirectionType * GetOutputDirection() const;
-  /** Return the output image direction */  
+  /** Return the output image direction */
   OutputImageDirectionType * GetOutputDirection();
 
   virtual void GenerateInputRequestedRegion();
@@ -102,5 +102,5 @@ private:
 #include "otbImageToModulusAndDirectionImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.txx b/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.txx
index 256b2f5876..10741cd6fa 100644
--- a/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.txx
+++ b/Code/FeatureExtraction/otbImageToModulusAndDirectionImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -41,9 +41,9 @@ ImageToModulusAndDirectionImageFilter()
 }
 
 
-/** Return the const output image modulus */  
+/** Return the const output image modulus */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-const typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageType * 
+const typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageType *
 ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::
 GetOutput() const
 {
@@ -54,9 +54,9 @@ GetOutput() const
 	return static_cast<const OutputImageType * >
     (this->itk::ProcessObject::GetOutput(0) );
 }
-/** Return the output image modulus */  
+/** Return the output image modulus */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageType * 
+typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageType *
 ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::
 GetOutput()
 {
@@ -68,9 +68,9 @@ GetOutput()
     (this->itk::ProcessObject::GetOutput(0) );
 }
 
-/** Return the const output image direction */  
+/** Return the const output image direction */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-const typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageDirectionType * 
+const typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageDirectionType *
 ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::
 GetOutputDirection()const
 {
@@ -82,9 +82,9 @@ GetOutputDirection()const
     (this->itk::ProcessObject::GetOutput(1) );
 }
 
-/** Return the output image direction */  
+/** Return the output image direction */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageDirectionType * 
+typename ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::OutputImageDirectionType *
 ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::
 GetOutputDirection()
 {
@@ -100,7 +100,7 @@ GetOutputDirection()
  * Standard "GenerateInputRequestedRegion" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-void 
+void
 ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
 ::GenerateInputRequestedRegion()
 {
@@ -111,12 +111,12 @@ ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDir
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-void 
+void
 ImageToModulusAndDirectionImageFilter<TInputImage, TOutputImage, TOutputImageDirection>::
 PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
- 
+
 }
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.h b/Code/FeatureExtraction/otbImageToPathListAlignFilter.h
index 0f5009a884..391d20bf3a 100644
--- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.h
+++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,9 +26,9 @@
 
 namespace otb
 {
-  
+
 /** \class ImageToPathListAlignFilter
- * \brief Base class used to implement filter to extract align points or group of points and give the coordinates. 
+ * \brief Base class used to implement filter to extract align points or group of points and give the coordinates.
  *
  */
 template <class TInputImage, class TOutputPath>
@@ -40,30 +40,30 @@ public:
   typedef ImageToPathListFilter<TInputImage,TOutputPath>       Superclass;
   typedef itk::SmartPointer<Self>                              Pointer;
   typedef itk::SmartPointer<const Self>                        ConstPointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageToPathListAlignFilter,ImageToPathListFilter);
 //  itkTypeMacro(ImageToPathListAlignFilter,itk::ImageSource);
-  
+
   /** ImageDimension constants */
   itkStaticConstMacro(InputImageDimension, unsigned int,
                       TInputImage::ImageDimension);
- 
+
   /** Some convenient typedefs. */
   typedef typename Superclass::OutputPathListType     OutputPathListType;
-  
-  typedef typename Superclass::InputImageType         InputImageType;          
-  typedef typename Superclass::InputImageRegionType   InputImageRegionType;    
+
+  typedef typename Superclass::InputImageType         InputImageType;
+  typedef typename Superclass::InputImageRegionType   InputImageRegionType;
   typedef typename InputImageType::Pointer            InputImagePointer;
   typedef typename InputImageType::ConstPointer       InputImageConstPointer;
-  
-  typedef typename InputImageType::SizeType           SizeType;                 
-  typedef typename InputImageType::ValueType          ValueType;  
+
+  typedef typename InputImageType::SizeType           SizeType;
+  typedef typename InputImageType::ValueType          ValueType;
   typedef typename InputImageType::PixelType          PixelType;
-  
+
   typedef typename Superclass::OutputPathType         OutputPathType;
   // typedef typename Superclass::OutputPathListType     OutputPathListType;
   typedef typename Superclass::OutputPathPointerType  OutputPathPointerType;
@@ -72,13 +72,13 @@ public:
   //typedef typename itk::NumericTraits<PixelType>::RealType       RealType;
   typedef double                                                  RealType;
 //  typedef typename itk::Image<RealType,InputImageDimension>      RealImageType;
-  typedef typename otb::Image<RealType,InputImageDimension>      RealImageType; 
+  typedef typename otb::Image<RealType,InputImageDimension>      RealImageType;
   typedef typename RealImageType::Pointer                        RealImageTypePointer;
   typedef typename RealImageType::IndexType                      RealImageTypeIndexType;
-        
-  
-       
- 
+
+
+
+
   /** Spacing (size of a pixel) of the output image. The
    * spacing is the geometric distance between image samples.
    * It is stored internally as double, but may be set from
@@ -87,7 +87,7 @@ public:
   virtual void SetSpacing( const float* spacing);
   virtual const double* GetSpacing() const;
 
-  /** Set/Get the value for pixels on and off the path. 
+  /** Set/Get the value for pixels on and off the path.
   * By default, this filter will return a "0" image with path pixels set to 1 */
   itkSetMacro(PathValue, ValueType);
   itkGetMacro(PathValue, ValueType);
@@ -105,7 +105,7 @@ public:
   /** Set/Get Size */
   itkSetMacro(Size,SizeType);
   itkGetMacro(Size,SizeType);
-  
+
   itkSetMacro(isMeaningfulSegment,bool);
   itkSetMacro(NbGradDirection,int);
   itkSetMacro(NbLineDirection,int);
@@ -116,7 +116,7 @@ public:
   itkGetConstReferenceMacro(NbLineDirection,int);
   itkGetConstReferenceMacro(MinGradNorm,double);
   itkGetConstReferenceMacro(Eps,double);
-  
+
 protected:
   ImageToPathListAlignFilter();
   ~ImageToPathListAlignFilter();
@@ -125,7 +125,7 @@ protected:
   virtual void GenerateData();
   virtual std::vector<double> tab(int n,double p,double m);
   virtual void AngleCalculate( const InputImageType*  InputImageIn);
-  
+
   SizeType     m_Size;
   double       m_Spacing[InputImageDimension];
   double       m_Origin[InputImageDimension];
diff --git a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx
index 0946840764..9531ca159e 100644
--- a/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx
+++ b/Code/FeatureExtraction/otbImageToPathListAlignFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@
 #include "itkNumericTraits.h"
 #include "itkImageLinearConstIteratorWithIndex.h"
 #include "itkImageLinearIteratorWithIndex.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -36,7 +36,7 @@ struct one_segment
   short start;    /* starting position (distance from border) */
   short end;      /* ending position (hence, length is end-start+1) */
   double nfa;     /* number of false alarms */
-  char ok;       
+  char ok;
 };
 
 /** Constructor */
@@ -46,9 +46,9 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 {
   this->SetNumberOfRequiredInputs(1);
   m_Size.Fill(0);
-  m_isMeaningfulSegment = false;	
+  m_isMeaningfulSegment = false;
   m_NbGradDirection = 16;
-  m_NbLineDirection = 96; 
+  m_NbLineDirection = 96;
   m_MinGradNorm=2.0;
   m_Eps=0.0;
 
@@ -69,7 +69,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::~ImageToPathListAlignFilter()
 {
 }
-  
+
 
 //----------------------------------------------------------------------------
 template <class TInputImage, class TOutputPath>
@@ -77,16 +77,16 @@ void
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::SetSpacing(const double* spacing)
 {
-  unsigned int i; 
+  unsigned int i;
   for (i=0; i<InputImageDimension; i++)
     {
     if ( spacing[i] != m_Spacing[i] )
       {
       break;
       }
-    } 
-  if ( i < InputImageDimension ) 
-    { 
+    }
+  if ( i < InputImageDimension )
+    {
     for (i=0; i<InputImageDimension; i++)
       {
       m_Spacing[i] = spacing[i];
@@ -100,16 +100,16 @@ void
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::SetSpacing(const float* spacing)
 {
-  unsigned int i; 
+  unsigned int i;
   for (i=0; i<InputImageDimension; i++)
     {
     if ( (double)spacing[i] != m_Spacing[i] )
       {
       break;
       }
-    } 
-  if ( i < InputImageDimension ) 
-    { 
+    }
+  if ( i < InputImageDimension )
+    {
     for (i=0; i<InputImageDimension; i++)
       {
       m_Spacing[i] = spacing[i];
@@ -119,7 +119,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 }
 
 template <class TInputImage, class TOutputPath>
-const double * 
+const double *
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::GetSpacing() const
 {
@@ -132,16 +132,16 @@ void
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::SetOrigin(const double* origin)
 {
-  unsigned int i; 
+  unsigned int i;
   for (i=0; i<InputImageDimension; i++)
     {
     if ( origin[i] != m_Origin[i] )
       {
       break;
       }
-    } 
-  if ( i < InputImageDimension ) 
-    { 
+    }
+  if ( i < InputImageDimension )
+    {
     for (i=0; i<InputImageDimension; i++)
       {
       m_Origin[i] = origin[i];
@@ -154,16 +154,16 @@ void
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::SetOrigin(const float* origin)
 {
-  unsigned int i; 
+  unsigned int i;
   for (i=0; i<InputImageDimension; i++)
     {
     if ( (double)origin[i] != m_Origin[i] )
       {
       break;
       }
-    } 
-  if ( i < InputImageDimension ) 
-    { 
+    }
+  if ( i < InputImageDimension )
+    {
     for (i=0; i<InputImageDimension; i++)
       {
       m_Origin[i] = origin[i];
@@ -172,7 +172,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 }
 
 template <class TInputImage, class TOutputPath>
-const double * 
+const double *
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::GetOrigin() const
 {
@@ -199,15 +199,15 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
   out[0] = 1.0;
   for (y=1,adr2=0;y<=n;y++) {
     adr1 = adr2;
-    adr2 += n+1;    
+    adr2 += n+1;
     out[adr2] = q*out[adr1];
-    for (x=1;x<=y;x++) 
+    for (x=1;x<=y;x++)
       out[adr2+x] = p*out[adr1+x-1] + q*out[adr1+x];
-  }  
+  }
 
   /*** sum to obtain proba (>=k among y) ***/
-  for (y=1,adr1=n+1;y<=n;y++,adr1+=n+1) 
-    for (x=y-1;x>=0;x--) 
+  for (y=1,adr1=n+1;y<=n;y++,adr1+=n+1)
+    for (x=y-1;x>=0;x--)
       out[adr1+x] += out[adr1+x+1];
 
   /*** multiply by m (number of segments) to obtain expectation***/
@@ -218,16 +218,16 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 }
 
 template <class TInputImage, class TOutputPath>
-void 
+void
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::AngleCalculate(const InputImageType* InputImage)
 {
   double threshold;
   int n,p,x,y;
-    
+
   typename InputImageType::SizeType Taille;
   typename RealImageType::IndexType IndexOut;
-  
+
   Taille = InputImage->GetLargestPossibleRegion().GetSize();
 
   typename RealImageType::RegionType region;
@@ -240,39 +240,39 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
   m_AngleImage->SetOrigin(InputImage->GetOrigin());
   m_AngleImage->SetSpacing(InputImage->GetSpacing());
   m_AngleImage->Allocate();
-   
+
   n = Taille[0];
   p = Taille[1];
 
   threshold = m_MinGradNorm;
   threshold *= threshold;
-  
-  typename InputImageType::IndexType idx; 
+
+  typename InputImageType::IndexType idx;
 
   for (x=0;x<p;x++){
      idx[0] = (n-1) ;
      idx[1] = x ;
 //     indice = (n-1)*p +x
      m_AngleImage->SetPixel(idx,static_cast<RealType>(-1000.0));
-  } 
+  }
   for (y=0;y<n;y++){
      idx[0] = y;
      idx[1] = p-1;
-//     indice = p*y+p-1     
+//     indice = p*y+p-1
      m_AngleImage->SetPixel(idx,static_cast<RealType>(-1000.0));
   }
-  
+
   typename InputImageType::IndexType adr;
   RealType PixelA,PixelB,PixelC,PixelD;
   RealType com1,com2,gx,gy,norm;
- 
-  for (x=0;x<p-1;x++) 
+
+  for (x=0;x<p-1;x++)
     for (y=0;y<n-1;y++) {
-// indice = y*p+x      
+// indice = y*p+x
       adr[0] = y;
       adr[1] = x;
       idx[0] = adr[0] +1;
-      idx[1] = adr[1] +1;      
+      idx[1] = adr[1] +1;
       PixelA = static_cast<RealType>(InputImage->GetPixel(idx)  );
       idx[0] = adr[0];
       idx[1] = adr[1];
@@ -286,21 +286,21 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
       assert( idx[0] < n );
       assert( idx[1] < p );
       assert( idx[0] >= 0 );
-      assert( idx[1] >= 0 );      
+      assert( idx[1] >= 0 );
       PixelC = static_cast<RealType>(InputImage->GetPixel(idx)   );
       idx[0] = adr[0];
       idx[1] = adr[1]+1;
       assert( idx[0] < n );
       assert( idx[1] < p );
       assert( idx[0] >= 0 );
-      assert( idx[1] >= 0 );      
+      assert( idx[1] >= 0 );
       PixelD = static_cast<RealType>(InputImage->GetPixel(idx)   );
       com1 = PixelA-PixelB;
       com2 = PixelC-PixelD;
       gx = 0.5 * (com1+com2);
       gy = 0.5 * (com1-com2);
       norm = gx*gx + gy*gy;
-      
+
       if (norm <=threshold)
          m_AngleImage->SetPixel(adr,static_cast<RealType>(-1000.0));
          else m_AngleImage->SetPixel(adr,static_cast<RealType>(vcl_atan2(gx,-gy)));
@@ -311,7 +311,7 @@ template <class TInputImage, class TOutputPath>
 void
 ImageToPathListAlignFilter<TInputImage,TOutputPath>
 ::GenerateData(void)
-{ 
+{
 //  SizeType size;
 //  double origin[InputImageDimension];
   typename InputImageType::SizeType Taille;
@@ -320,7 +320,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
   int   iseglist,size_seglist;  /* associated counter and dynamic size */
   int iseg,size_seg;
   double nfa,max_nfa;
-  std::vector<double> test; 
+  std::vector<double> test;
   std::vector<int>   count,startbloc,endbloc;
   std::vector<double> seglist;   /* list of recorded segments */
   std::vector<one_segment> seg;
@@ -330,22 +330,22 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
   // int tmp;
   int itheta,ntheta;
   double theta,theta0,dtheta,dx,dy,prec;
-  double error =0.0; 
+  double error =0.0;
   itkDebugMacro(<< "ImageToPathListAlignFilter::GenerateData() called");
 
 
-  // Get the input and output pointers 
+  // Get the input and output pointers
   const InputImageType  * InputImage   = this->GetInput();
   OutputPathListType *   OutputPath   = this->GetOutput();
   // Generate the image
 
-/* Filter algorithm */  
-   
+/* Filter algorithm */
+
   Taille = InputImage->GetLargestPossibleRegion().GetSize();
   nx = Taille[0];
   ny = Taille[1];
   max_nfa = vcl_pow(10.0,-(m_Eps));
-    
+
 //  typename InputImageType::IndexType adr;
 
   /*** maximal length for a line */
@@ -353,12 +353,12 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 
   /*** compute angle map of u ***/
   RealImageTypePointer lAngleImagePointer = RealImageType::New();
-  m_AngleImage = static_cast<RealImageType*>(lAngleImagePointer.GetPointer()); 
+  m_AngleImage = static_cast<RealImageType*>(lAngleImagePointer.GetPointer());
   this->AngleCalculate( InputImage );
 
   /*** compute P(k,l) ***/
-  test = tab(n,1.0/(double)(m_NbGradDirection),(double)(nx*ny)*(double)(nx*ny));    
-  
+  test = tab(n,1.0/(double)(m_NbGradDirection),(double)(nx*ny)*(double)(nx*ny));
+
    /*** initialization ***/
   prec = M_PI/(double)(m_NbGradDirection);
   ntheta = m_NbLineDirection/2;  /* i.e. # directions of NON-ORIENTED lines */
@@ -368,20 +368,20 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 
   max_nblocs = n/2+1; /* maximal number of blocs */
   count.resize(max_nblocs);
-  startbloc.resize(max_nblocs); 
-  endbloc.resize(max_nblocs); 
-  
+  startbloc.resize(max_nblocs);
+  endbloc.resize(max_nblocs);
+
   size_seg = 10000; /* initial allocation (may reallocate later) */
   seg.resize(size_seg);
-  
+
   size_seglist = 10000; /* initial allocation (may reallocate later) */
-  seglist.resize(5*size_seglist); 
+  seglist.resize(5*size_seglist);
 
   /* counter for recorded segments (seglist) */
   iseglist = 0;
 
 
-  
+
   /******************** first loop : the four sides ********************/
 
   for (side=0;side<4;side++) {
@@ -394,8 +394,8 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
     oy = ((side==2)?ny-1:0);
 
     posmax = nx*mx+ny*my;
-    
-    
+
+
     /*** second loop : angles ***/
     for (itheta = 0; itheta<ntheta; itheta++) {
       printf(".");
@@ -403,7 +403,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
       theta = theta0 + (double)(itheta)*dtheta;
       dx = (double)vcl_cos((double)theta);
       dy = (double)vcl_sin((double)theta);
-      
+
       /*** third loop : start positions ***/
       for (pos=0;pos<posmax;pos++) {
 
@@ -412,7 +412,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 
 	/*** fourth loop : phase for two-spaced pixels ***/
         for (lphase=0;lphase<2;lphase++) {
-	  
+
 	  /*** detect aligned points by blocs ***/
 	  inbloc = nblocs = cur = l = count[0] = 0;
 	  xx = ox+pos*mx + (int)(dx*(double)(l*2+lphase));
@@ -427,7 +427,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 	    assert( indexAngle[1] < ny );
 	    assert( indexAngle[0] >= 0 );
 	    assert( indexAngle[1] >= 0 );
-	    
+
 	    error = static_cast<double>( m_AngleImage->GetPixel(indexAngle) );
 	    if (error>-100.0) {
 	      error -= theta;
@@ -454,10 +454,10 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 	    xx = ox+pos*mx + (int)(dx*(double)(l*2+lphase));
 	    yy = oy+pos*my + (int)(dy*(double)(l*2+lphase));
 	  }
-	  
+
 	  /*** detect meaningful segments ***/
-	  for (i=0;i<nblocs;i++) 
-	    for (j=i;j<nblocs;j++) 
+	  for (i=0;i<nblocs;i++)
+	    for (j=i;j<nblocs;j++)
 	      if ((nfa = test[count[j+1]-count[i]
 			     +(n+1)*(1+endbloc[j]-startbloc[i])]) < max_nfa) {
 		seg[iseg].start = startbloc[i]*2+lphase;
@@ -469,7 +469,7 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 		if (iseg==size_seg) {
 		  size_seg = (size_seg*3)/2;
 		  seg.resize(size_seg);
-//		  if (!seg) 
+//		  if (!seg)
 //		    mwerror(FATAL,1,"Not enough memory.");
 		}
 	      }
@@ -477,66 +477,66 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
 	/*** end of phase loop ***/
 
 	/*** remove non-maximal segments ***/
-	if (!m_isMeaningfulSegment) 
-	  for (i=0;i<iseg;i++) 
+	if (!m_isMeaningfulSegment)
+	  for (i=0;i<iseg;i++)
 	    for (j=0;j<iseg;j++)
-	      if (i!=j) 
-		
+	      if (i!=j)
+
 		/* seg[i] is included in seg[j] ? */
 		if (seg[i].start>=seg[j].start && seg[i].end<=seg[j].end) {
-		  
+
 		  /* remove the less meaningful of seg[i] and seg[j] */
-		  if (seg[i].nfa<seg[j].nfa) seg[j].ok=0;	
+		  if (seg[i].nfa<seg[j].nfa) seg[j].ok=0;
 		  else seg[i].ok=0;
-		  
+
 		}
-	
+
 	/*** store detected segments ***/
-	for (i=0;i<iseg;i++) 
+	for (i=0;i<iseg;i++)
 	  if (seg[i].ok) {
 	    seglist[iseglist*5  ]=(double)(ox+pos*mx)+dx*(double)(seg[i].start);
 	    seglist[iseglist*5+1]=(double)(oy+pos*my)+dy*(double)(seg[i].start);
 	    seglist[iseglist*5+2]=(double)(ox+pos*mx)+dx*(double)(seg[i].end);
 	    seglist[iseglist*5+3]=(double)(oy+pos*my)+dy*(double)(seg[i].end);
 	    seglist[iseglist*5+4]=-(double)log10(seg[i].nfa);
-	    iseglist++; 
+	    iseglist++;
 	    /* reallocate seglist if necessary */
 	    if (iseglist==size_seglist) {
 	      size_seglist = (size_seglist*3)/2;
 	      seglist.resize(size_seglist);
-//	      if (!seglist) 
+//	      if (!seglist)
 //		mwerror(FATAL,1,"Not enough memory.");
 	    }
 	  }
       }
     }
     /*** end of second loop ***/
-    
+
     printf("   nb de segments: %d\n",iseglist);
   }
   /******************** end of first loop ********************/
-  
+
   seg.clear();
   endbloc.clear();
   startbloc.clear();
   count.clear();
   test.clear();
-    
+
   /* build segments list */
   seglist.resize(5*iseglist);
 
   /* build segments list */
   OutputPath->Clear();
 //  OutputPath->Resize(iseglist);
-  
+
   typedef typename OutputPathType::ContinuousIndexType ContinuousIndexType;
   typename InputImageType::PointType point;
-  
-  ContinuousIndexType cindex;  
+
+  ContinuousIndexType cindex;
   for (i=0;i<iseglist;i++) {
 
     OutputPathPointerType path = OutputPathType::New();
-    
+
     path->Initialize();
     point[0]=seglist[i*5  ];
     point[1]=seglist[i*5+1];
@@ -545,12 +545,12 @@ ImageToPathListAlignFilter<TInputImage,TOutputPath>
     cindex[0] = seglist[i*5+2];
     cindex[1] = seglist[i*5+3];
     path->AddVertex(cindex);
-    
+
     OutputPath->PushBack(path);
   }
   itkDebugMacro(<< "ImageToPathListAlignFilter::GenerateData() finished");
 
-} // end update function  
+} // end update function
 
 
 template <class TInputImage, class TOutputPath>
diff --git a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h
index 39a8bdecf7..96035001e6 100644
--- a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h
+++ b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -48,13 +48,13 @@ namespace otb
 	class MagnitudeFunctor
 	{
 	public:
-	  
+
 	  inline TOutputPixel operator()(const TInputPixel& input)
 	    {
 	      return vcl_sqrt(input[0]*input[0]+input[1]*input[1]);
 	    }
 	};
-      
+
       /** \class OrientationFunctor
        *  \brief This functor computes the orientation of a cavariant vector<br>
        *   Orientation values lies between 0 and 2*Pi.
@@ -63,7 +63,7 @@ namespace otb
 	class OrientationFunctor
 	{
 	public:
-	  
+
 	  inline TOutputPixel operator()(const TInputPixel& input)
 	    {
 	      TOutputPixel resp = vcl_atan2(input[1],input[0]);
@@ -76,7 +76,7 @@ namespace otb
 	    }
 	};
     }// end namespace Functor
-  
+
   /** \class ImageToSIFTKeyPointSetFilter
    *  \brief This class extracts key points from an input image, trough a pyramidal decomposition.
    *
@@ -99,7 +99,7 @@ namespace otb
    * Selected key points are stored in a itk::PointSet structure.
    * Data points contains a list of (magnitude, main orientation) for each level
    * of the pyramidal decomposition.
-   * 
+   *
    * Orientation is expressed in degree in the range [0,360] with a precision of 10 degrees.
    *
    * \example FeatureExtraction/SIFTExample.cxx
@@ -115,30 +115,30 @@ namespace otb
       typedef ImageToPointSetFilter<TInputImage,TOutputPointSet> Superclass;
       typedef itk::SmartPointer<Self>                            Pointer;
       typedef itk::SmartPointer<const Self>                      ConstPointer;
-  
+
       /** Creation through object factory macro */
-      itkNewMacro(Self);  
+      itkNewMacro(Self);
 
       /** Type macro */
       itkTypeMacro(ImageToSIFTKeyPointSetFilter,ImageToPointSetFilter);
-  
+
       /** Template parameters typedefs */
       typedef TInputImage InputImageType;
       typedef typename TInputImage::Pointer InputImagePointerType;
       typedef typename TInputImage::PixelType PixelType;
-      
+
       typedef TOutputPointSet OutputPointSetType;
       typedef typename TOutputPointSet::Pointer OutputPointSetPointerType;
       typedef typename TOutputPointSet::PixelType OutputPixelType;
       typedef typename TOutputPointSet::PointType OutputPointType;
       typedef typename TOutputPointSet::PointIdentifier OutputPointIdentifierType;
-      
+
       typedef itk::Vector<PixelType,3> VectorPointType;
-      
+
       /** Set/Get the number of octaves */
       itkSetMacro(OctavesNumber, unsigned int);
       itkGetMacro(OctavesNumber, unsigned int);
-      
+
       /** Set/Get the number of scales */
       itkSetMacro(ScalesNumber, unsigned int);
       itkGetMacro(ScalesNumber, unsigned int);
@@ -150,7 +150,7 @@ namespace otb
       /** Set/Get the shrink factors */
       itkSetMacro(ShrinkFactors, unsigned int);
       itkGetMacro(ShrinkFactors, unsigned int);
-      
+
       /** Set/Get the sigma 0 */
       itkSetMacro(Sigma0, double);
       itkGetMacro(Sigma0, double);
@@ -160,83 +160,83 @@ namespace otb
        */
       itkSetMacro(DoGThreshold, double);
       itkGetMacro(DoGThreshold, double);
-      
+
       /** Set/Get Edgethreshold
        *  Eliminating edge responses
        */
       itkSetMacro(EdgeThreshold, double);
       itkGetMacro(EdgeThreshold, double);
-      
+
       /** Set/Get Gauss sigma factor orientation */
       itkSetMacro(SigmaFactorOrientation, double);
       itkGetMacro(SigmaFactorOrientation, double);
-      
+
       /** Set/Get Gauss sigma factor descriptor */
       itkSetMacro(SigmaFactorDescriptor, double);
       itkGetMacro(SigmaFactorDescriptor, double);
-      
+
       /** Internal typedefs */
       typedef itk::ExpandImageFilter<TInputImage, TInputImage> ExpandFilterType;
       typedef typename ExpandFilterType::Pointer ExpandFilterPointerType;
 
       typedef itk::ShrinkImageFilter<InputImageType, InputImageType> ShrinkFilterType;
       typedef typename ShrinkFilterType::Pointer ShrinkFilterPointerType;
-      
+
       typedef itk::RecursiveGaussianImageFilter<InputImageType,InputImageType> GaussianFilterType;
       typedef typename GaussianFilterType::Pointer GaussianFilterPointerType;
-      
+
       typedef otb::ImageList<InputImageType> ImageListType;
       typedef typename ImageListType::Pointer ImageListPointerType;
-      
+
       typedef itk::SubtractImageFilter<InputImageType,InputImageType,InputImageType> SubtractFilterType;
       typedef typename SubtractFilterType::Pointer SubtractFilterPointerType;
-      
+
       typedef itk::ConstNeighborhoodIterator<InputImageType> NeighborhoodIteratorType;
       typedef typename NeighborhoodIteratorType::NeighborhoodType NeighborhoodType;
       typedef typename NeighborhoodType::OffsetType OffsetType;
-      
+
       typedef itk::ImageRegionConstIterator<InputImageType> RegionIteratorType;
-      
+
       typedef itk::MinimumMaximumImageCalculator<InputImageType> MinimumMaximumCalculatorType;
       typedef typename MinimumMaximumCalculatorType::Pointer MinimumMaximumCalculatorPointerType;
-      
-      typedef itk::GradientImageFilter<InputImageType,PixelType,PixelType> GradientFilterType;      
+
+      typedef itk::GradientImageFilter<InputImageType,PixelType,PixelType> GradientFilterType;
       typedef typename GradientFilterType::Pointer GradientFilterPointerType;
       typedef typename GradientFilterType::OutputImageType GradientOutputImageType;
-      
+
       typedef itk::UnaryFunctorImageFilter<GradientOutputImageType,InputImageType,
 	Functor::MagnitudeFunctor<typename GradientOutputImageType::PixelType,typename InputImageType::PixelType> > MagnitudeFilterType;
       typedef typename MagnitudeFilterType::Pointer MagnitudeFilterPointerType;
-      
+
       typedef itk::UnaryFunctorImageFilter<GradientOutputImageType,InputImageType,
 	Functor::OrientationFunctor<typename GradientOutputImageType::PixelType,typename InputImageType::PixelType> > OrientationFilterType;
       typedef typename OrientationFilterType::Pointer OrientationFilterPointerType;
-      
+
     protected:
       /** Actually process the input */
       virtual void GenerateData();
-      
+
       /** Constructor */
       ImageToSIFTKeyPointSetFilter();
-      
+
       /** Destructor */
       virtual ~ImageToSIFTKeyPointSetFilter() {}
-      
+
       /** PrintSelf method */
       virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
       /** Initialize input image */
       void InitializeInputImage();
-      
+
       /** Compute differenec of gaussian
-       * 
+       *
        *  \param input, current input in process
        */
       void ComputeDifferenceOfGaussian(InputImagePointerType input);
-      
+
       /** Localize key point */
       void DetectKeyPoint( const unsigned int octave );
-      
+
       /** Check local extremum for 26 neighbors (current and adjacents scales)
        *
        *  \param currentScale
@@ -248,9 +248,9 @@ namespace otb
       bool IsLocalExtremum( const NeighborhoodIteratorType& currentScale,
 			    const NeighborhoodIteratorType& previousScale,
 			    const NeighborhoodIteratorType& nextScale ) const;
-      
+
       /** Refine location key point
-       *  
+       *
        *  \li Discard keypoints with low contrats DoG < DoGThreshold
        *  \li Discard keypoints that have a ratio between the principles
        *      curvature greater than EdgeTrhesold (=10)
@@ -266,7 +266,7 @@ namespace otb
 				   const NeighborhoodIteratorType& previousScale,
 				   const NeighborhoodIteratorType& nextScale,
 				   VectorPointType& solution);
-      
+
       /** Assign key point orientation
        *
        * \param currentScale neighborhood iterator
@@ -278,7 +278,7 @@ namespace otb
       std::vector<PixelType> ComputeKeyPointOrientations(const NeighborhoodIteratorType& currentScale,
 					   const unsigned int scale,
 					   const PixelType translation);
-      
+
       /** Compute local image descriptor
        *
        * \param currentScale neighborhood iterator
@@ -290,96 +290,96 @@ namespace otb
       std::vector<PixelType> ComputeKeyPointDescriptor(const NeighborhoodIteratorType& currentScale,
 						       const unsigned int scale,
 						       const PixelType& orientation);
-      
+
     private:
       ImageToSIFTKeyPointSetFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
 
       /** Number of octaves */
       unsigned int m_OctavesNumber;
-      
+
       /** Number of scale for each octave */
       unsigned int m_ScalesNumber;
-      
+
       /** Expand factors */
       unsigned int m_ExpandFactors;
 
       /** Shrink factors */
       unsigned int m_ShrinkFactors;
-      
+
       /** Threshold DoG */
       double m_DoGThreshold;
 
       /** Edge Threshold */
       double m_EdgeThreshold;
-      
+
       /** Ratio threshold compute */
       double m_RatioEdgeThreshold;
-      
+
       /** Histogram sift keys descriptors gradient magnitude threshold */
       PixelType  m_GradientMagnitudeThreshold;
-      
+
       /** Sigma 0 */
       typename GaussianFilterType::ScalarRealType m_Sigma0;
-      
+
       /** Sigma k */
       double m_Sigmak;
-      
+
       /** Gauss factor length for key point orientation */
       double m_SigmaFactorOrientation;
-      
+
       /** Descriptor size */
       double m_SigmaFactorDescriptor;
-      
+
       /** Expand filter */
       ExpandFilterPointerType m_ExpandFilter;
-      
+
       /** Shrink filter */
       ShrinkFilterPointerType m_ShrinkFilter;
-      
+
       /** Gaussian filter */
       GaussianFilterPointerType m_XGaussianFilter;
       GaussianFilterPointerType m_YGaussianFilter;
-      
+
       /** Gaussian image pointer */
       InputImagePointerType m_LastGaussian;
-      
+
       /** Difference of gaussian list */
       ImageListPointerType m_DoGList;
-      
+
       /** Magnitude image list */
       ImageListPointerType m_MagnitudeList;
-      
+
       /** Orientation image list */
       ImageListPointerType m_OrientationList;
-            
+
       /** Subtract filter */
       SubtractFilterPointerType m_SubtractFilter;
 
       /** Gradient filter */
       GradientFilterPointerType m_GradientFilter;
-      
+
       /** Magnitude filter */
       MagnitudeFilterPointerType m_MagnitudeFilter;
 
       /** Orientation filter */
       OrientationFilterPointerType m_OrientationFilter;
-      
+
       /** Number of key points */
       OutputPointIdentifierType m_ValidatedKeyPoints;
-      
+
       /** Number of key point which offset is larger than 0.5 per octave*/
       unsigned int m_DifferentSamplePoints;
-      
+
       /** Number of discarded key points */
       unsigned int m_DiscardedKeyPoints;
-      
+
       /** Number of change sample max */
       unsigned int m_ChangeSamplePointsMax;
 
       /** Gaussian sigma for histogram smoothing */
       static const double m_HistogramGaussianWeights[73];
-      
+
       /** Offsets vector, conveniance datas */
       static const OffsetType m_Offsets[8];
     };
diff --git a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx
index e7c61be404..004f84ef6c 100644
--- a/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx
+++ b/Code/FeatureExtraction/otbImageToSIFTKeyPointSetFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,21 +24,21 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   template <class TInputImage, class TOutputPointSet>
   const double
   ImageToSIFTKeyPointSetFilter<TInputImage,TOutputPointSet>
-  ::m_HistogramGaussianWeights[73] = { 
-    2.3771112282795414e-07, 3.8860734758633732e-07, 6.2655544995978937e-07, 9.9631120821413786e-07, 1.5624909838697011e-06, 2.4167238265599128e-06, 3.6865788528530121e-06, 
-    5.5463469229192623e-06, 8.2295774080263437e-06, 1.2043009749602365e-05, 1.738119136656513e-05,  2.4740646513897326e-05, 3.4731980398846277e-05, 4.808781565748272e-05, 
-    6.5664032975164266e-05, 8.8431512984476723e-05, 0.00011745555408931643, 0.00015386047198026335, 0.00019877765486783745, 0.00025327659834301937, 0.00031828015928190065, 
-    0.00039446735551235698, 0.00048216931692246382, 0.00058126620279441276, 0.00069109471776775144, 0.00081037694122312908, 0.00093718121775182789, 0.0010689246133776746, 
-    0.0012024238404411182,  0.0013339976954896103,  0.0014596192424447215,  0.0015751106965100009,  0.0016763688464699555,  0.0017596045720966803,  0.0018215772013714365, 
-    0.0018598035923515156,  0.0018727231637146351,  0.0018598035923515156,  0.0018215772013714365,  0.0017596045720966803,  0.0016763688464699555,  0.0015751106965100009, 
-    0.0014596192424447215,  0.0013339976954896103,  0.0012024238404411182,  0.0010689246133776746,  0.00093718121775182789, 0.00081037694122312908, 0.00069109471776775144, 
-    0.00058126620279441276, 0.00048216931692246382, 0.00039446735551235698, 0.00031828015928190065, 0.00025327659834301937, 0.00019877765486783745, 0.00015386047198026335, 
-    0.00011745555408931643, 8.8431512984476723e-05, 6.5664032975164266e-05, 4.808781565748272e-05,  3.4731980398846277e-05, 2.4740646513897326e-05, 1.738119136656513e-05, 
-    1.2043009749602365e-05, 8.2295774080263437e-06, 5.5463469229192623e-06, 3.6865788528530121e-06, 2.4167238265599128e-06, 1.5624909838697011e-06, 9.9631120821413786e-07, 
+  ::m_HistogramGaussianWeights[73] = {
+    2.3771112282795414e-07, 3.8860734758633732e-07, 6.2655544995978937e-07, 9.9631120821413786e-07, 1.5624909838697011e-06, 2.4167238265599128e-06, 3.6865788528530121e-06,
+    5.5463469229192623e-06, 8.2295774080263437e-06, 1.2043009749602365e-05, 1.738119136656513e-05,  2.4740646513897326e-05, 3.4731980398846277e-05, 4.808781565748272e-05,
+    6.5664032975164266e-05, 8.8431512984476723e-05, 0.00011745555408931643, 0.00015386047198026335, 0.00019877765486783745, 0.00025327659834301937, 0.00031828015928190065,
+    0.00039446735551235698, 0.00048216931692246382, 0.00058126620279441276, 0.00069109471776775144, 0.00081037694122312908, 0.00093718121775182789, 0.0010689246133776746,
+    0.0012024238404411182,  0.0013339976954896103,  0.0014596192424447215,  0.0015751106965100009,  0.0016763688464699555,  0.0017596045720966803,  0.0018215772013714365,
+    0.0018598035923515156,  0.0018727231637146351,  0.0018598035923515156,  0.0018215772013714365,  0.0017596045720966803,  0.0016763688464699555,  0.0015751106965100009,
+    0.0014596192424447215,  0.0013339976954896103,  0.0012024238404411182,  0.0010689246133776746,  0.00093718121775182789, 0.00081037694122312908, 0.00069109471776775144,
+    0.00058126620279441276, 0.00048216931692246382, 0.00039446735551235698, 0.00031828015928190065, 0.00025327659834301937, 0.00019877765486783745, 0.00015386047198026335,
+    0.00011745555408931643, 8.8431512984476723e-05, 6.5664032975164266e-05, 4.808781565748272e-05,  3.4731980398846277e-05, 2.4740646513897326e-05, 1.738119136656513e-05,
+    1.2043009749602365e-05, 8.2295774080263437e-06, 5.5463469229192623e-06, 3.6865788528530121e-06, 2.4167238265599128e-06, 1.5624909838697011e-06, 9.9631120821413786e-07,
     6.2655544995978937e-07, 3.8860734758633732e-07, 2.3771112282795414e-07};
 
   template <class TInputImage, class TOutputPointSet>
@@ -53,7 +53,7 @@ namespace otb
     {{ 1, 0}}, //6
     {{ 1, 1}}, //7
     };
-  
+
   /**
    * Constructor
    */
@@ -67,24 +67,24 @@ namespace otb
     m_ShrinkFactors = 2;
     m_Sigma0 = 1.6;
     m_Sigmak = 0;
-    
+
     m_DoGThreshold = 0.03;
     m_EdgeThreshold = 10;
     m_RatioEdgeThreshold = 0;
-    
+
     m_ValidatedKeyPoints = 0;
     m_DifferentSamplePoints = 0;
     m_DiscardedKeyPoints = 0;
     m_ChangeSamplePointsMax = 2;
-    
+
     m_SigmaFactorOrientation = 3;
     m_SigmaFactorDescriptor = 1.5;
-    
+
     m_GradientMagnitudeThreshold = 0.2;
-    
+
     m_ExpandFilter = ExpandFilterType::New();
   }
-  
+
   template <class TInputImage, class TOutputPointSet>
   void
   ImageToSIFTKeyPointSetFilter<TInputImage,TOutputPointSet>
@@ -93,46 +93,46 @@ namespace otb
     // First, subsample the input image
     InitializeInputImage();
 
-    InputImagePointerType input = m_ExpandFilter->GetOutput(); 
+    InputImagePointerType input = m_ExpandFilter->GetOutput();
     typename InputImageType::PointType point;
     typename InputImageType::IndexType  index;
     index[0] = 0;
     index[1] = 0;
-    
+
     m_ExpandFilter->GetOutput()->TransformIndexToPhysicalPoint(index, point);
-    
+
     // for each octave, compute the difference of gaussian
     unsigned int lOctave = 0;
     m_Sigmak = vcl_pow(2, static_cast<double>(1/(double)(m_ScalesNumber+1)));
     m_RatioEdgeThreshold = (m_EdgeThreshold+1)*(m_EdgeThreshold+1)/m_EdgeThreshold;
-    
+
     for (lOctave = 0; lOctave != m_OctavesNumber; lOctave++)
       {
 	m_DifferentSamplePoints = 0;
 	m_DiscardedKeyPoints = 0;
-	
+
 	typename InputImageType::PointType origin0 = input->GetOrigin();
-	  
+
 	ComputeDifferenceOfGaussian(input);
 	DetectKeyPoint(lOctave);
-	
+
 	// Get the last gaussian for subsample and
 	// repeat the process
 	m_ShrinkFilter = ShrinkFilterType::New();
 	m_ShrinkFilter->SetInput(m_LastGaussian);
 	m_ShrinkFilter->SetShrinkFactors(m_ShrinkFactors);
 	m_ShrinkFilter->Update();
-	
+
 	input = m_ShrinkFilter->GetOutput();
-	
+
 	typename InputImageType::PointType origin1;
 	typename InputImageType::SpacingType spacing = input->GetSpacing();
-	
+
 	origin1[0] = origin0[0] + spacing[0]*0.25;
 	origin1[1] = origin0[1] + spacing[1]*0.25;
-	
+
 	input->SetOrigin(origin1);
-	
+
 	otbGenericMsgDebugMacro( <<"ImageToSIFTKeyPointSetFilter:: Number total key points : " \
 				 << m_ValidatedKeyPoints);
 	otbGenericMsgDebugMacro( <<"ImageToSIFTKeyPointSetFilter:: Number different sample key points per octave : " \
@@ -141,14 +141,14 @@ namespace otb
 				 << m_DiscardedKeyPoints );
 	otbGenericMsgDebugMacro( <<"ImageToSIFTKeyPointSetFilter:: Resample image factor : " \
 				 << m_ShrinkFactors);
-	
+
       }
-    
+
     otbGenericMsgDebugMacro( <<"ImageToSIFTKeyPointSetFilter:: Total number key points : " \
 			     << this->GetOutput()->GetNumberOfPoints());
-    
+
   }
-  
+
   /**
    * Initialize the input image
    */
@@ -156,7 +156,7 @@ namespace otb
   void
   ImageToSIFTKeyPointSetFilter<TInputImage,TOutputPointSet>
   ::InitializeInputImage()
-  {    
+  {
     m_ExpandFilter->SetInput( this->GetInput(0));
     m_ExpandFilter->SetExpandFactors(m_ExpandFactors);
     m_ExpandFilter->Update();
@@ -164,13 +164,13 @@ namespace otb
     typename InputImageType::PointType origin0 = this->GetInput(0)->GetOrigin();
     typename InputImageType::PointType origin1;
     typename InputImageType::SpacingType spacing = m_ExpandFilter->GetOutput()->GetSpacing();
-    
+
     origin1[0] = origin0[0]-spacing[0]*0.5;
     origin1[1] = origin0[1]-spacing[1]*0.5;
-    
+
     m_ExpandFilter->GetOutput()->SetOrigin(origin1);
   }
-  
+
   /**
    * Compute the difference of gaussian
    */
@@ -181,53 +181,53 @@ namespace otb
   {
     unsigned int lScale = 0;
     InputImagePointerType previousGaussian;
-    
+
     m_DoGList = ImageListType::New();
-    
+
     m_MagnitudeList = ImageListType::New();
     m_OrientationList = ImageListType::New();
 //     m_GaussianWeightOrientationList = ImageListType::New();
 //     m_GaussianWeightDescriptorList = ImageListType::New();
-    
+
     // itkRecursiveGaussian use spacing to compute
     // length sigma gaussian (in mm)
     // sigma = sigma/spacing
     //
-    // with multiply by spacing before filtering, length sigma gaussian 
+    // with multiply by spacing before filtering, length sigma gaussian
     // is compute in pixel
     double xsigman = vcl_abs(input->GetSpacing()[0])*m_Sigma0;
     double ysigman = vcl_abs(input->GetSpacing()[1])*m_Sigma0;
-    
+
     for (lScale = 0; lScale != m_ScalesNumber+2; lScale++)
       {
 	m_XGaussianFilter = GaussianFilterType::New();
 	m_YGaussianFilter = GaussianFilterType::New();
-	
+
 	m_XGaussianFilter->SetSigma(xsigman);
 	m_XGaussianFilter->SetDirection(0);
 	m_XGaussianFilter->SetInput(input);
-	
+
 	m_YGaussianFilter->SetSigma(ysigman);
 	m_YGaussianFilter->SetDirection(1);
 	m_YGaussianFilter->SetInput(m_XGaussianFilter->GetOutput());
-	
+
 	m_YGaussianFilter->Update();
-	
+
 	m_GradientFilter = GradientFilterType::New();
 	m_MagnitudeFilter = MagnitudeFilterType::New();
 	m_OrientationFilter = OrientationFilterType::New();
-	
+
 	m_GradientFilter->SetInput(m_YGaussianFilter->GetOutput());
 	m_MagnitudeFilter->SetInput(m_GradientFilter->GetOutput());
 	m_OrientationFilter->SetInput(m_GradientFilter->GetOutput());
-	
+
 	m_MagnitudeFilter->Update();
 	m_OrientationFilter->Update();
-	
+
 	m_MagnitudeList->PushBack(m_MagnitudeFilter->GetOutput());
 	m_OrientationList->PushBack(m_OrientationFilter->GetOutput());
 
-	
+
 	if (lScale>0)
 	  {
 	    m_SubtractFilter = SubtractFilterType::New();
@@ -236,7 +236,7 @@ namespace otb
 	    m_SubtractFilter->Update();
 	    m_DoGList->PushBack(m_SubtractFilter->GetOutput());
 	  }
-	
+
 	previousGaussian = m_YGaussianFilter->GetOutput();
 	xsigman = xsigman*m_Sigmak;
 	ysigman = ysigman*m_Sigmak;
@@ -244,7 +244,7 @@ namespace otb
     m_LastGaussian = previousGaussian;
     otbGenericMsgDebugMacro( <<"ImageToSIFTKeyPointSetFilter:: Number of DoG "<<m_DoGList->Size() );
   }
-  
+
   /**
    * Localize key point
    */
@@ -260,7 +260,7 @@ namespace otb
 	unsigned int lScale = 1;
 	OutputPointSetPointerType  outputPointSet = this->GetOutput();
 	typename InputImageType::SpacingType spacing = lIterDoG.Get()->GetSpacing();
-	
+
 	while ( (lIterDoG+1) != m_DoGList->End())
 	  {
 	    otbGenericMsgDebugMacro( <<"ImageToSIFTKeyPointSetFilter:: octave: " << octave << " scale: " << lScale);
@@ -268,12 +268,12 @@ namespace otb
 	    MinimumMaximumCalculatorPointerType lMaximumCalculator = MinimumMaximumCalculatorType::New();
 	    lMaximumCalculator->SetImage(lIterDoG.Get());
 	    lMaximumCalculator->Compute();
-	    
+
 	    typename InputImageType::SizeType lRadius;
 	    lRadius.Fill(1);
 	    typename ImageListType::Iterator lIterNext = lIterDoG+1;
 	    typename ImageListType::Iterator lIterPrev = lIterDoG-1;
-	    
+
 	    NeighborhoodIteratorType lIterCurrent(lRadius,
 						  lIterDoG.Get(),
 						  lIterDoG.Get()->GetLargestPossibleRegion());
@@ -283,11 +283,11 @@ namespace otb
 	    NeighborhoodIteratorType lIterUpperAdjacent(lRadius,
 							lIterNext.Get(),
 							lIterNext.Get()->GetLargestPossibleRegion());
-	    
+
 	    while ( !lIterCurrent.IsAtEnd() &&
 		    !lIterLowerAdjacent.IsAtEnd() &&
 		    !lIterUpperAdjacent.IsAtEnd() )
-	      { 
+	      {
 		// check local min/max
 		if (IsLocalExtremum(lIterCurrent,
 				    lIterLowerAdjacent,
@@ -295,12 +295,12 @@ namespace otb
 		  {
 		    VectorPointType lTranslation(PixelType(0));
 		    OffsetType lOffsetZero = {{0,0}};
-		    
+
 		    unsigned int lChangeSamplePoints = 0;
 		    NeighborhoodIteratorType neighborCurrentScale(lIterCurrent);
 		    NeighborhoodIteratorType neighborPreviousScale(lIterLowerAdjacent);
 		    NeighborhoodIteratorType neighborNextScale(lIterUpperAdjacent);
-		    
+
 		    bool accepted = false;
 		    bool changed = true;
 		    while (lChangeSamplePoints < m_ChangeSamplePointsMax &&
@@ -310,21 +310,21 @@ namespace otb
  							  neighborPreviousScale,
  							  neighborNextScale,
  							  lTranslation);
-			
+
 			OffsetType lTranslateOffset = {{0,0}};
-			
+
 			lTranslateOffset[0] += static_cast<int>(lTranslation[0]>0.5);
 			lTranslateOffset[0] += -static_cast<int>(lTranslation[0]<-0.5);
-			
+
 			lTranslateOffset[1] += static_cast<int>(lTranslation[1]>0.5);
 			lTranslateOffset[1] += -static_cast<int>(lTranslation[1]<-0.5);
-			
+
 			NeighborhoodIteratorType moveIterator = neighborCurrentScale+lTranslateOffset;
-			
+
 			if ( moveIterator.InBounds())
 			  {
 			    changed = lTranslateOffset != lOffsetZero;
-			    
+
 			    // move iterator
 			    neighborCurrentScale+=lTranslateOffset;
 			    neighborPreviousScale+=lTranslateOffset;
@@ -333,21 +333,21 @@ namespace otb
 			else
 			  {
 			    changed = false;
-			  }						
+			  }
 			lChangeSamplePoints++;
 		      }
 		    if (changed)
 		      {
 			m_DifferentSamplePoints++;
 		      }
-		    
+
 		    // add key point
 		    if (accepted)
 		      {
 			std::vector<PixelType> lOrientations = ComputeKeyPointOrientations(neighborCurrentScale,
 								  lScale,
 								  lTranslation[2]);
-			
+
 			// for each main orientation
 			for(typename std::vector<PixelType>::iterator orientationIt = lOrientations.begin(); orientationIt != lOrientations.end();++orientationIt)
 			  {
@@ -355,23 +355,23 @@ namespace otb
 			    std::vector<PixelType> lDescriptors = ComputeKeyPointDescriptor(neighborCurrentScale,
 											    lScale,
 											    *orientationIt);
-			
+
 			    OutputPointType keyPoint;
-			    
+
 			    lIterDoG.Get()->TransformIndexToPhysicalPoint(neighborCurrentScale.GetIndex(),
 									  keyPoint);
 			    keyPoint[0] += spacing[0]*lTranslation[0];
 			    keyPoint[1] += spacing[1]*lTranslation[1];
-			
+
 			    outputPointSet->SetPoint(m_ValidatedKeyPoints, keyPoint);
-			    
+
 			    OutputPixelType data;
 			    data.SetSize(128);
 			    // check this, compute scale
 			    // real scale = octave*scale
-			    typename std::vector<PixelType>::const_iterator lIterDescriptor = 
+			    typename std::vector<PixelType>::const_iterator lIterDescriptor =
 			      lDescriptors.begin();
-			
+
 			    unsigned int lIndDesc = 0;
 			    while (lIterDescriptor != lDescriptors.end())
 			      {
@@ -380,23 +380,23 @@ namespace otb
 				lIterDescriptor++;
 			      }
 			    outputPointSet->SetPointData(m_ValidatedKeyPoints, data);
-			    
+
 			    m_ValidatedKeyPoints++;
 			  }
 		      }
 		  }
-		
+
 		++lIterCurrent;
 		++lIterLowerAdjacent;
 		++lIterUpperAdjacent;
 	      }
-	    
+
 	    ++lIterDoG;
 	    lScale++;
 	  }
       }
   }
-  
+
   /**
    * Check local extremum for 26 neighbors
    */
@@ -411,7 +411,7 @@ namespace otb
     bool isMax = currentScale.GetCenterPixel() > currentScale.GetPixel(m_Offsets[0]);
     bool isExtremum = isMin || isMax;
     unsigned int lIterOffset = 0;
-    
+
     while (isExtremum && lIterOffset != 8)
       {
 	OffsetType off = m_Offsets[lIterOffset];
@@ -445,7 +445,7 @@ namespace otb
       }
     return isExtremum;
   }
-  
+
   /**
    * Refine location key point
    */
@@ -459,43 +459,43 @@ namespace otb
   {
     bool accepted = true;
     solution = VectorPointType(PixelType(0));
-        
+
     PixelType dx = 0.5*(currentScale.GetPixel(m_Offsets[6])
 			-currentScale.GetPixel(m_Offsets[1]) );
-    
+
     PixelType dy = 0.5*(currentScale.GetPixel(m_Offsets[4])
 			-currentScale.GetPixel(m_Offsets[3]) );
-    
+
     PixelType ds = 0.5*(nextScale.GetCenterPixel()-
 			previousScale.GetCenterPixel());
-    
+
     PixelType dxx = currentScale.GetPixel(m_Offsets[6])
       -2*currentScale.GetCenterPixel()
       +currentScale.GetPixel(m_Offsets[1]);
-    
+
     PixelType dyy = currentScale.GetPixel(m_Offsets[3])
       -2*currentScale.GetCenterPixel()
       +currentScale.GetPixel(m_Offsets[4]);
-    
+
     PixelType dss = previousScale.GetCenterPixel()
       -2*currentScale.GetCenterPixel()
       +nextScale.GetCenterPixel();
-   
+
     PixelType dxy = 0.25*(currentScale.GetPixel(m_Offsets[7])
 			  +currentScale.GetPixel(m_Offsets[0])
 			  -currentScale.GetPixel(m_Offsets[2])
 			  -currentScale.GetPixel(m_Offsets[5]) );
-    
+
     PixelType dxs = 0.25*(nextScale.GetPixel(m_Offsets[6])
 			  +previousScale.GetPixel(m_Offsets[1])
 			  -nextScale.GetPixel(m_Offsets[1])
 			  -previousScale.GetPixel(m_Offsets[6]) );
-    
+
     PixelType dys = 0.25*(nextScale.GetPixel(m_Offsets[4])
 			  +previousScale.GetPixel(m_Offsets[3])
 			  -nextScale.GetPixel(m_Offsets[3])
 			  -previousScale.GetPixel(m_Offsets[4]) );
-    
+
     // Compute matrice determinant
     double det = dxx*(dyy*dss-dys*dys) -dxy*(dxy*dss-dxs*dys)+dxs*(dxy*dys-dxs*dyy);
 
@@ -503,24 +503,24 @@ namespace otb
     solution[0] = -dx*(dyy*dss-dys*dys)-dy*(dxs*dys-dxy*dss)-ds*(dxy*dys-dyy*dxs);
     solution[1] = -dx*(dys*dxs-dss*dxy)-dy*(dxx*dss-dxs*dxs)-ds*(dxs*dxy-dxx*dys);
     solution[2] = -dx*(dxy*dys-dxs*dyy)-dy*(dxy*dxs-dxx*dys)-ds*(dxx*dyy-dxy*dxy);
-    
+
     // Compute interpolated value DoG for lSolution (determinant factor)
     PixelType lDoGInterpolated = det*currentScale.GetCenterPixel() +
       0.5*(dx*solution[0]+
 	   dy*solution[1]+
 	   ds*solution[2]);
-    
+
     PixelType lHessianTrace2 = (dxx+dyy)*(dxx+dyy);
     PixelType lHessianDet = dxx*dyy-dxy*dxy;
     // DoG threshold
-    
+
     accepted = fabs(lDoGInterpolated) >= fabs(det*m_DoGThreshold);
-    
+
     // Eliminating edge response
 
     accepted = accepted &&
       fabs(lHessianTrace2) < fabs(m_RatioEdgeThreshold*lHessianDet);
-    
+
     if (!accepted)
       {
 	m_DiscardedKeyPoints++;
@@ -536,7 +536,7 @@ namespace otb
       }
     return accepted;
   }
-  
+
   /**
    * Compute key point orientation
    */
@@ -546,7 +546,7 @@ namespace otb
   ::ComputeKeyPointOrientations( const NeighborhoodIteratorType& currentScale,
 				const unsigned int scale,
 				const PixelType translation)
-  {    
+  {
     // radius of the neighborhood
     unsigned int radius = 4;
     double lSigma = scale*3;
@@ -555,7 +555,7 @@ namespace otb
 
     // initialize the histogram
     std::vector<double> lHistogram(nbBins,0.), lSmoothedHistogram(nbBins,0.);
-    
+
     // Build the region to examine
     typename InputImageType::RegionType region;
     typename InputImageType::RegionType::SizeType regionSize;
@@ -565,23 +565,23 @@ namespace otb
     regionIndex[0] = currentScale.GetIndex()[0]-regionSize[0]/2;
     regionIndex[1] = currentScale.GetIndex()[1]-regionSize[1]/2;
     region.SetIndex(regionIndex);
-    
+
     if(!region.Crop(m_OrientationList->GetNthElement(scale)->GetLargestPossibleRegion()))
       {
 	itkExceptionMacro(<<"Region "<<region<<" is strictly outside the largest possible region!");
       }
-    
+
     // iterators on the orientation and the magnitude
     RegionIteratorType lIterOrientation(m_OrientationList->GetNthElement(scale),region);
     RegionIteratorType lIterMagn(m_MagnitudeList->GetNthElement(scale), region);
     lIterOrientation.GoToBegin();
     lIterMagn.GoToBegin();
-    
+
     // For each pixel
     while (!lIterOrientation.IsAtEnd() && !lIterMagn.IsAtEnd())
       {
-	
-	// check if pixel is inside the circle of radius 
+
+	// check if pixel is inside the circle of radius
 	float dx = lIterMagn.GetIndex()[0]-currentScale.GetIndex()[0];
 	float dy = lIterMagn.GetIndex()[1]-currentScale.GetIndex()[1];
 	float dist = vcl_sqrt(dx*dx+dy*dy);
@@ -592,10 +592,10 @@ namespace otb
 	    //Get the values
 	    PixelType lOrientation = lIterOrientation.Get();
 	    PixelType lMagnitude = lIterMagn.Get();
-	   
+
 	    // Compute the gaussian weight
 	    double lWeightMagnitude = vcl_exp(-dist*dist/(2*lSigma*lSigma));
-	    
+
 	    // Compute the histogram bin index
 	    unsigned int lHistoIndex = static_cast<unsigned int>(vcl_floor(nbBins*lOrientation/(2*M_PI)));
 
@@ -605,7 +605,7 @@ namespace otb
 	++lIterOrientation;
 	++lIterMagn;
       }
-    
+
     // Computing smoothed histogram and looking for the maximum and a second maximum within 80% of the first
     double max = 0;
     double secondMax = 0;
@@ -675,7 +675,7 @@ namespace otb
       {
 	orientation-=360;
       }
-    
+
 //     orientations.push_back( static_cast<PixelType>(maxIndex*binWidth + binWidth/2));
     orientations.push_back(static_cast<PixelType>(orientation));
 
@@ -689,16 +689,16 @@ namespace otb
 // 	y2 = lSmoothedHistogram[secondMaxIndex];
 // 	x3 = (secondMaxIndex+1)*binWidth+binWidth/2;
 // 	y3 = lSmoothedHistogram[secondMaxIndex+1>static_cast<int>(nbBins)-1 ? secondMaxIndex+1-nbBins : secondMaxIndex+1];
-	
+
 // 	denom = x1*x1*x2 + x2*x2*x3 + x3*x3*x1 - x1*x1*x3 - x2*x2*x1 - x3*x3*x2;
 // 	num = y1*x2 + y2 * x3 + y3*x1 - y1*x3 - y2*x1 - y3*x2;
-	
+
 // 	if(denom == 0 || num == 0)
 // 	  {
 // 	    // no main orientation, return an empty orientation vector
 // 	    return orientations;
 // 	  }
-	
+
 // 	a = num/denom;
 // 	b = ((y1-y2)-a*(x1*x1-x2*x2))/(x1-x2);
 
@@ -717,7 +717,7 @@ namespace otb
 
     return orientations;
   }
-  
+
   /**
    * Compute key point descriptor
    */
@@ -729,7 +729,7 @@ namespace otb
 			       const PixelType& orientation)
   {
     std::vector<PixelType> lHistogram(128, 0.);
-    
+
      typename InputImageType::RegionType  region;
     typename InputImageType::RegionType::SizeType regionSize;
     typename InputImageType::RegionType::IndexType regionIndex;
@@ -739,7 +739,7 @@ namespace otb
     unsigned int nbBinsPerHistogram = 8;
 
     float radius = static_cast<float>(nbHistograms/2*nbPixelsPerHistogram);
-    
+
 //     std::cout<<"Radius: "<<radius<<std::endl;
 
 
@@ -750,14 +750,14 @@ namespace otb
     // sigma set to one half the width of descriptor window
     // TODO check this
     double lSigma = radius;
-    
+
     // index - regionSize/2
     regionIndex[0]=currentScale.GetIndex()[0]-regionSize[0]/2;
     regionIndex[1]=currentScale.GetIndex()[1]-regionSize[1]/2;
 
     region.SetIndex(regionIndex);
     region.SetSize(regionSize);
-    
+
     // Crop with largest region
     if (!region.Crop(m_OrientationList->GetNthElement(scale)->GetLargestPossibleRegion()))
       {
@@ -771,7 +771,7 @@ namespace otb
     // For each pixel in the region
     while(!lIterMagnitude.IsAtEnd() && !lIterOrientation.IsAtEnd())
       {
-	// check if pixel is inside the circle of radius 
+	// check if pixel is inside the circle of radius
 	float dx = lIterMagnitude.GetIndex()[0]-currentScale.GetIndex()[0];
 	float dy = lIterMagnitude.GetIndex()[1]-currentScale.GetIndex()[1];
 	float dist = vcl_sqrt(dx*dx+dy*dy);
@@ -790,7 +790,7 @@ namespace otb
 	    unsigned int yHistogramIndex = static_cast<unsigned int>(vcl_floor((rdy + radius)/static_cast<float>(nbPixelsPerHistogram)));
 
 	    // decide to which bin of the histogram the pixel contributes
-	    float compensatedOrientation =  lIterOrientation.Get()-angle;	    
+	    float compensatedOrientation =  lIterOrientation.Get()-angle;
 	    if(compensatedOrientation<0)
 	      {
 		compensatedOrientation+=2*M_PI;
@@ -800,10 +800,10 @@ namespace otb
 		compensatedOrientation-=2*M_PI;
 	      }
 	    unsigned int histogramBin = static_cast<unsigned int>(vcl_floor(compensatedOrientation*nbBinsPerHistogram/(2*M_PI)));
-	    
+
 	    // Compute the wheight of the pixel in the histogram
 	    double lWeightMagnitude = vcl_exp(-(dist*dist)/(2*lSigma*lSigma));
-	    
+
 	    // Compute the global descriptor index
 	    unsigned int descriptorIndex = yHistogramIndex * nbBinsPerHistogram * nbHistograms
 	      + xHistogramIndex * nbBinsPerHistogram + histogramBin;
@@ -813,18 +813,18 @@ namespace otb
 	++lIterOrientation;
 	++lIterMagnitude;
       }
-    
+
     // normalize histogram to unit lenght
     typename std::vector<PixelType>::iterator lIterHisto = lHistogram.begin();
     float lNorm = 0.0;
-    
+
     while (lIterHisto != lHistogram.end())
       {
 	lNorm = lNorm + (*lIterHisto)*(*lIterHisto);
 	++lIterHisto;
       }
     lNorm = vcl_sqrt(lNorm);
-    
+
     lIterHisto = lHistogram.begin();
     while(lIterHisto != lHistogram.end())
       {
@@ -836,7 +836,7 @@ namespace otb
 	  {
 	    *lIterHisto = m_GradientMagnitudeThreshold;
 	  }
-	
+
 	// threshold gradient magnitude
 	if (*lIterHisto > m_GradientMagnitudeThreshold)
 	  {
@@ -844,28 +844,28 @@ namespace otb
 	  }
 	++lIterHisto;
       }
-    
+
     // renormalize histogram to unit length
     lIterHisto = lHistogram.begin();
     lNorm = 0.0;
-    
+
     while (lIterHisto != lHistogram.end())
       {
 	lNorm = lNorm + (*lIterHisto)*(*lIterHisto);
 	++lIterHisto;
       }
     lNorm = vcl_sqrt(lNorm);
-    
+
     lIterHisto = lHistogram.begin();
     while(lIterHisto != lHistogram.end())
       {
 	*lIterHisto = (*lIterHisto)/lNorm;
 	++lIterHisto;
       }
-    
+
     return lHistogram;
   }
-  
+
   /**
    * PrintSelf Method
    */
@@ -878,12 +878,12 @@ namespace otb
     typedef typename TOutputPointSet::PointDataContainerIterator PointsDataIteratorType;
     typedef itk::ProcessObject ProcessObjectType;
     const OutputPointSetType* output = dynamic_cast<const OutputPointSetType*>(this->ProcessObjectType::GetOutput(0));
-          
+
     Superclass::PrintSelf(os, indent);
     os<<indent<<"Number of octaves: "<<m_OctavesNumber<<std::endl;
     os<<indent<<"Number of scales: "<<m_ScalesNumber<<std::endl;
-    
+
     os<<indent<<"Number of SIFT key points: " << output->GetNumberOfPoints() << std::endl;
   }
-  
+
 } // End namespace otb
diff --git a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h
index c0a5750a9f..1f4440cb1c 100644
--- a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h
+++ b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.h
@@ -12,8 +12,8 @@ See OTBCopyright.txt for details.
 Copyright (c) CS Systemes d'information. All rights reserved.
 See CSCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -33,23 +33,23 @@ PURPOSE.  See the above copyright notices for more information.
 
 /** \class ImageToSURFKeyPointSetFilter
  *  \brief This class extracts key points from an image through a pyramidal gaussian based decomposition
- * 
+ *
  * This class implements the SURF Key point detector proposed by Tuytelaars and Vangool from the university
  * of Leuven, 2005
- *  
- * \li Gaussian Second order derivative Hessian images are computed in each 
+ *
+ * \li Gaussian Second order derivative Hessian images are computed in each
  *     level and each octave for the input image.
- * \li For each octave, an extremum search is launched on each 3 adjacent scales. 
- * \li The Key points detected are the ones extremum in the current , previous and 
+ * \li For each octave, an extremum search is launched on each 3 adjacent scales.
+ * \li The Key points detected are the ones extremum in the current , previous and
  *     next scale of reserach. 3 scales are needed for the computation (NumberOfScales >=3).
  * \li Orientation and descriptors are computed for each key point detected.
- * 
+ *
  * Selected Key Points are stored in an itk::PointSet structure.
  * Points contains the coordinate of the detected point.
- * DataPoints contain the values of the 64 element descriptor for each key point 
+ * DataPoints contain the values of the 64 element descriptor for each key point
  * detected through the pyramidal analysis.
  *
- * Orientation is expressed in degree in the range of [0,360] 
+ * Orientation is expressed in degree in the range of [0,360]
  *
  *  \sa otb::ImageToDeterminantHessianImage
  */
@@ -60,22 +60,22 @@ namespace otb
     class ITK_EXPORT ImageToSURFKeyPointSetFilter
     : public ImageToPointSetFilter<TInputImage, TOutputPointSet>
     {
-      
-    public: 
-      
+
+    public:
+
     /** Standard class typedefs. */
       typedef ImageToSURFKeyPointSetFilter                                Self;
       typedef ImageToPointSetFilter<TInputImage,TOutputPointSet>          Superclass;
       typedef itk::SmartPointer<Self>                                     Pointer;
       typedef itk::SmartPointer<const Self>                               ConstPointer;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
-            
+
       /** Run-time type information (and related methods). */
-      itkTypeMacro(ImageToSURFKeyPointSetFilter,ImageToPointSetFilter);  
-      
-      
+      itkTypeMacro(ImageToSURFKeyPointSetFilter,ImageToPointSetFilter);
+
+
       /** Template parameters typedefs*/
       typedef TInputImage InputImageType;
       typedef typename InputImageType::Pointer             InputImagePointerType;
@@ -85,44 +85,44 @@ namespace otb
       typedef typename InputImageType::SpacingType         SpacingType;
       typedef typename InputImageType::SizeType            SizeType;
       typedef typename InputImageType::PointType           PointImageType;
-      
+
       typedef TOutputPointSet OutputPointSetType;
       typedef typename TOutputPointSet::Pointer            OutputPointSetPointerType;
       typedef typename TOutputPointSet::PixelType          OutputPixelType;
       typedef typename TOutputPointSet::PointType          OutputPointType;
       typedef typename TOutputPointSet::PointIdentifier    OutputPointIdentifierType;
-            
+
       /** Set/Get the number of Octaves */
       itkSetMacro(OctavesNumber,int);
       itkGetMacro(OctavesNumber,int);
-      
+
       /** Set/Get the number of scales*/
       itkSetMacro(ScalesNumber,int);
       itkGetMacro(ScalesNumber,int);
-            
+
       /** Get the number of KeyPoints detected*/
       itkGetMacro(NumberOfPoints,int);
-     
+
       /** Internal filters typedefs */
       typedef itk::ConstNeighborhoodIterator<InputImageType> NeighborhoodIteratorType;
       typedef typename NeighborhoodIteratorType::NeighborhoodType NeighborhoodType;
-     
+
       typedef otb::ImageToHessianDeterminantImageFilter<InputImageType ,InputImageType > ImageToDetHessianImageType;
       typedef typename ImageToDetHessianImageType::Pointer DetHessianPointerFilter;
-     
+
       /** Filter for  resampling images for the multi-scale analysis */
       typedef itk::ResampleImageFilter<InputImageType,InputImageType> ResampleFilterType;
-      typedef typename ResampleFilterType::Pointer ResampleFilterPointerType; 
+      typedef typename ResampleFilterType::Pointer ResampleFilterPointerType;
 
       /** ImageList  to store the Hessian determinant image at each scale (sigma width)*/
       typedef otb::ImageList< InputImageType > ImageListType;
       typedef typename ImageListType::Pointer ImageListTypePointer;
-           
+
       /** */
       typedef std::vector<double> VectorType;
-      
+
     protected:
-      
+
       /**
        * Constructor.
        */
@@ -141,7 +141,7 @@ namespace otb
       virtual void  GenerateData();
 
 
-      
+
       /** Check local extremum for 8 neighbors (current)
        *
        *  \param currentScale
@@ -149,9 +149,9 @@ namespace otb
        *  \return true if the Central pixel is extremum
        */
       virtual bool IsLocalExtremum(const NeighborhoodType& neigh);
-      
-      
-      
+
+
+
       /** Check local extremum for 8 neighbors (Previous or Scale)
        *
        *  \param neigh
@@ -159,59 +159,59 @@ namespace otb
        *
        *  \return true if the Central pixel is extremum
        */
-      virtual bool IsLocalExtremumAround(const NeighborhoodType& neigh, 
+      virtual bool IsLocalExtremumAround(const NeighborhoodType& neigh,
 					 double CenterValue);
 
-      
-      /** AssignOrientation 
+
+      /** AssignOrientation
        *
        * \param currentScale neighborhood
        * \param scale affected to the keypoint
        *
        * \return  key point orientation
        */
-      virtual double AssignOrientation(const NeighborhoodType& neigh, 
+      virtual double AssignOrientation(const NeighborhoodType& neigh,
 				       double S);
-      
+
       /** ComputeDescriptor
        *
        * \param currentScale Neighboorhood
-       * \param orientation assigned to the key point 
-       * \param scale 
+       * \param orientation assigned to the key point
+       * \param scale
        *
        * \return hsitogram descriptor
        */
-      virtual VectorType ComputeDescriptor(const NeighborhoodType& neigh, 
-				     double O, 
+      virtual VectorType ComputeDescriptor(const NeighborhoodType& neigh,
+				     double O,
 				     double S);
       /**
-       * Compute min a b c 
-       */	
+       * Compute min a b c
+       */
       virtual int GetMin( int a , int b , int c);
-      
-	private: 
-      
+
+	private:
+
       ImageToSURFKeyPointSetFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-     
+
       /** Number of octaves */
       int m_OctavesNumber;
-      
+
       /** Number of scale for each octave */
       int m_ScalesNumber;
-      
+
       /** Number of key points detected */
       int m_NumberOfPoints;
-      
+
       /** Those images */
       InputImagePointerType m_determinantImage;
       InputImagePointerType m_ImageCurrent;
       InputImagePointerType m_ImageMovedPrev;
       InputImagePointerType m_ImageMovedNext;
-      
+
       /** ImageToDeterminantHessianFilter filter */
       DetHessianPointerFilter m_DetHessianFilter;
-      
+
       /*Resample Filter*/
       ResampleFilterPointerType m_ResampleFilter;
 
@@ -225,4 +225,4 @@ namespace otb
 
 #endif
 
- 
+
diff --git a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx
index d3fda1604c..1bd63f0053 100644
--- a/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx
+++ b/Code/FeatureExtraction/otbImageToSURFKeyPointSetFilter.txx
@@ -12,8 +12,8 @@ See OTBCopyright.txt for details.
 Copyright (c) CS systèmes d'information. All rights reserved.
 See CSCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -59,25 +59,25 @@ namespace otb
     double k;
     double sigma_in = 2.;
     SizeType radius;
-    
+
     /*Output*/
     OutputPointSetPointerType  outputPointSet = this->GetOutput();
 
     /** Computing the multiplicative factor for scales iteration
-     * scalar used for the wifth of the gaussian 
+     * scalar used for the wifth of the gaussian
      */
-    if(m_ScalesNumber > 1 )  
+    if(m_ScalesNumber > 1 )
       k = (double)std::pow(2.0,(double)(1/(double)(m_ScalesNumber-1))) ;
-    else 
+    else
       k = 3;
-    
-        
+
+
      /* Computation loop over octaves*/
     for (int i = 0; i < m_OctavesNumber ; i++ ){
-      
+
       sigma_in = 2.;
       m_ImageList = ImageListType::New();
-      
+
       /*--------------------------------------------------------
 	Octave per octave
 	--------------------------------------------------------*/
@@ -85,12 +85,12 @@ namespace otb
 
 	m_ResampleFilter = ResampleFilterType::New();
 	m_ResampleFilter ->SetInput(this->GetInput(0));
-	
+
 	SizeType size = this->GetInput(0)->GetLargestPossibleRegion().GetSize();
 	for (int k = 0; k < 2; ++k)
 	  size[k] = (unsigned int) floor(size[k]/std::pow(2.0,i) );
 	m_ResampleFilter->SetSize( size );
-	
+
 	SpacingType spacing = this->GetInput(0)->GetSpacing();
 	for (int k = 0; k < 2; ++k)
 	  spacing[k] = (spacing[k] * std::pow(2.0,i));
@@ -103,38 +103,38 @@ namespace otb
 	otbGenericMsgDebugMacro( <<"ImageToSURFKeyPointSetFilter:: Size of the image at the octave : " \
 				 << i << " is " \
 				 <<m_determinantImage->GetLargestPossibleRegion().GetSize() );
-	
+
       }
-      
+
       for (int j = 0 ; j < m_ScalesNumber; j++ )
       {
 	/** Incrementation of the gaussian width
-	 *  the width of the gaussian have to be doubled for 
-	 *  each iteration over octaves 
+	 *  the width of the gaussian have to be doubled for
+	 *  each iteration over octaves
 	 */
-	    
-	if ((i != 0 && j !=0 ) || (i == 0  && (i+j !=0) ) || ( m_ScalesNumber == 1 && i!=0 )) 
+
+	if ((i != 0 && j !=0 ) || (i == 0  && (i+j !=0) ) || ( m_ScalesNumber == 1 && i!=0 ))
 	  sigma_in *= k;
 
 	/**
-	 * For each octave, we serach for the key points 
+	 * For each octave, we serach for the key points
 	 */
-	
+
 	/** Hessian Determinant Image */
 	m_DetHessianFilter = ImageToDetHessianImageType::New();
-	
+
 	if ( i == 0 )m_DetHessianFilter->SetInput(this->GetInput(0));
   	else m_DetHessianFilter->SetInput(m_determinantImage );
-	
+
 	m_DetHessianFilter->SetSigma(sigma_in);
-	m_DetHessianFilter->Update();  
+	m_DetHessianFilter->Update();
 	m_determinantImage = m_DetHessianFilter->GetOutput() ;
-	
-	  if(i+j==0) 	
+
+	  if(i+j==0)
 	    otbGenericMsgDebugMacro( <<"ImageToSURFKeyPointSetFilter:: Size of the image at the octave : " \
 				     << i << " is " \
 				     <<m_determinantImage->GetLargestPossibleRegion().GetSize() );
-	  
+
 
 	  /** For each octave, we fill the imageList for the extremum search*/
 	  m_ImageList->PushBack(m_determinantImage);
@@ -143,62 +143,62 @@ namespace otb
       /*----------------------------------------------------*/
       /*           extremum  Search over octave's scales    */
       /*----------------------------------------------------*/
-                
+
       for (int jj = 1 ; jj < (int)(m_ImageList->Size() - 1 )  ; jj++)
 	{
 	  m_ImageCurrent = m_ImageList->GetNthElement(jj);
 	  m_ImageMovedPrev = m_ImageList->GetNthElement(jj-1);
 	  m_ImageMovedNext = m_ImageList->GetNthElement(jj+1);
-	  
-	 	  
+
+
 	  /** NeighboorhoodIterator parameters*/
 	  radius.Fill(1);
 	  NeighborhoodIteratorType it(radius, m_ImageCurrent,m_ImageCurrent->GetLargestPossibleRegion());
 	  it.GoToBegin();
-	  
+
 
 	  /* NeighboorhoodIterator Adjacents parameters*/
 	  NeighborhoodIteratorType itNeighPrev(radius, m_ImageMovedPrev,m_ImageMovedPrev->GetLargestPossibleRegion());
 	  itNeighPrev.GoToBegin();
-	  
+
 	  NeighborhoodIteratorType itNeighNext(radius, m_ImageMovedNext,m_ImageMovedNext->GetLargestPossibleRegion());
 	  itNeighNext.GoToBegin();
-	  
+
 	  while(!it.IsAtEnd())
 	    {
-	      
-	      if(IsLocalExtremum(it.GetNeighborhood())  
+
+	      if(IsLocalExtremum(it.GetNeighborhood())
 		 && IsLocalExtremumAround(itNeighPrev.GetNeighborhood(),m_ImageCurrent->GetPixel(it.GetIndex()))
 		 && IsLocalExtremumAround(itNeighNext.GetNeighborhood(),m_ImageCurrent->GetPixel(it.GetIndex())) )
 		{
-		  OutputPointType keyPoint; 
+		  OutputPointType keyPoint;
 		  itNeighPrev.SetLocation(it.GetIndex());
 		  itNeighNext.SetLocation(it.GetIndex());
-		  
+
 		  keyPoint[0] =  it.GetIndex()[0];
 		  keyPoint[1] =  it.GetIndex()[1];
-		  
+
 		  //keyPoint[2] =  sigma_in/pow(k,(double)jj)*pow(2.,(double)i);
 		  double sigmaDetected = sigma_in/pow(k,(double)jj)*pow(2.,(double)i);
-		  
+
 		  radius.Fill(GetMin((int)(this->GetInput(0)->GetLargestPossibleRegion().GetSize()[0] - keyPoint[0]),
 				     (int)(this->GetInput(0)->GetLargestPossibleRegion().GetSize()[1] - keyPoint[1]),
 				     (int)(6*sigmaDetected) ) ) ; // changer le sigma detected par keypoint[2]
-		  
-		  
+
+
 
 		  /*
-		    Computing the orientation of the key point detected 
+		    Computing the orientation of the key point detected
 		  */
 		  NeighborhoodIteratorType itNeighOrientation(radius,this->GetInput(0) ,
 							      this->GetInput(0)->GetLargestPossibleRegion());
-		  
+
 		  itNeighOrientation.SetLocation(it.GetIndex());
-		  
+
 		  /** TO DO*/
 		  //keyPoint[3] = AssignOrientation( itNeighOrientation.GetNeighborhood() ,keyPoint[2] );
 		  double orientationDetected = AssignOrientation( itNeighOrientation.GetNeighborhood() , sigmaDetected );
-		  
+
 		  /*Filling the Point pointSet Part*/
 		  outputPointSet->SetPoint(m_NumberOfPoints, keyPoint);
 
@@ -206,11 +206,11 @@ namespace otb
 		  /*----------------------------------------*/
 		  /*  Descriptor Computation                */
 		  /*----------------------------------------*/
-		  
+
 		  radius.Fill(GetMin((int)(this->GetInput(0)->GetLargestPossibleRegion().GetSize()[0] - keyPoint[0]),
 				     (int)(this->GetInput(0)->GetLargestPossibleRegion().GetSize()[1] - keyPoint[1]),
 				     (int)(10*sigmaDetected))); // TODO a changer sigmaDetected par Keypoint[2]
-	
+
 		  NeighborhoodIteratorType itNeighDescriptor(radius,this->GetInput(0),
 							     this->GetInput(0)->GetLargestPossibleRegion());
 		  itNeighDescriptor.SetLocation(it.GetIndex());
@@ -219,17 +219,17 @@ namespace otb
 		  //descriptor = ComputeDescriptor(itNeighDescriptor.GetNeighborhood(),keyPoint[3],keyPoint[2]);
 		  descriptor = ComputeDescriptor(itNeighDescriptor.GetNeighborhood(),orientationDetected,sigmaDetected);
 
-		  
-		  
+
+
 		  /*Updating the pointset data with values of the descriptor*/
 		  OutputPixelType data;
 		  data.SetSize(64);
-		  		
+
 		  unsigned int IndDescriptor = 0;
-		  
+
 		  typename std::vector<double>::const_iterator  itDescriptor =
 		    descriptor.begin();
-		  		  
+
 		   while(itDescriptor != descriptor.end())
 		    {
 		      data.SetElement(IndDescriptor, *itDescriptor);
@@ -237,26 +237,26 @@ namespace otb
 		      itDescriptor++;
 		    }
 		  outputPointSet->SetPointData(m_NumberOfPoints, data);
-		  
+
 		  m_NumberOfPoints++;
 		}
 	      ++it;
 	      ++itNeighPrev;
 	      ++itNeighNext;
-	      
+
 	    }/*End while for extremum search*/
-	  
+
 	} /*End Iteration over scales */
-      
+
       m_ImageList->Clear();
-      
+
     } /* End  Key Points search*/
 
     otbGenericMsgDebugMacro( <<"ImageToSURFKeyPointSetFilter:: Total Number of Key points "\
 			     << m_NumberOfPoints  );
 
   }/** End of GenerateData()*/
-    
+
   template <class TInputImage, class TOutputPointSet>
   int
   ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet>
@@ -264,7 +264,7 @@ namespace otb
   {
     return std::min(a,std::min(b,c));
   }
-  
+
   /*-----------------------------------------------------------
    * Find Local Extremum
    -----------------------------------------------------------*/
@@ -277,21 +277,21 @@ namespace otb
     double centerValue = neigh[centerIndex];
     bool max = false, min = false;
     int flag_min = 0, flag_max = 0;
-    
+
     while (i!=(int)neigh.Size()){
       if(i != centerIndex ){
-	if( centerValue> neigh[i] && flag_max == 0)   max = true;  
+	if( centerValue> neigh[i] && flag_max == 0)   max = true;
 	else { max = false;  flag_max = 1; }
-	
-	if(centerValue < neigh[i] && flag_min == 0 && centerValue <0)   min = true; 
+
+	if(centerValue < neigh[i] && flag_min == 0 && centerValue <0)   min = true;
 	else {  min = false; flag_min = 1; }
       }
       ++i;
     }
-    
+
     return max || min ;
   }
-  
+
   /*-----------------------------------------------------------
    *Find Local Extremum Around
    -----------------------------------------------------------*/
@@ -300,35 +300,35 @@ namespace otb
   ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet>
   ::IsLocalExtremumAround(const NeighborhoodType& neigh , double CenterValue)
   {
-    
-    int i = 0; 
+
+    int i = 0;
     bool max = false, min = false;
     int flag_min = 0, flag_max = 0;
-    
+
     while (i!=(int)neigh.Size()){
 
-      if( CenterValue> neigh[i] && flag_max == 0)   max = true;  
+      if( CenterValue> neigh[i] && flag_max == 0)   max = true;
       else { max = false;  flag_max = 1; }
-	
-      if(CenterValue < neigh[i] && flag_min == 0)   min = true; 
+
+      if(CenterValue < neigh[i] && flag_min == 0)   min = true;
       else {  min = false; flag_min = 1; }
-      
+
       ++i;
     }
-        
+
     return max || min ;
   }
-   
+
   /*-----------------------------------------------------------
    * Compute the orientation of The KeyPoint
    -----------------------------------------------------------*/
-  
+
   template <class TInputImage, class TOutputPointSet>
   double
   ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet>
   ::AssignOrientation(const NeighborhoodType& neigh , double S)
   {
-    
+
     int i= 0 ;
     int pas =( (i+S)-(int)(i+S) > 0.5 )?((int)S+1):(int)S  ;
     int Largeur = 2*neigh.GetRadius()[0]+1;                // Width & length of a neighborhood
@@ -336,13 +336,13 @@ namespace otb
     int col, raw ;
     double dist ;
     double  w;                                             // weight of the circular gaussian
-    
+
     OutputPointType pt ;
 
     // Gradient orientation histogram
     double angle;
     int bin        = 0 ;
-    int Pi         = 180;    
+    int Pi         = 180;
     int LengthBin  = 60;
     int NbBins     = (2*Pi/LengthBin);
     std::vector<double> tab(NbBins*2 , 0.);
@@ -352,30 +352,30 @@ namespace otb
 	col = i%Largeur - rayon ;
 	raw = i/Largeur - rayon ;
 	dist = vcl_sqrt(static_cast<double>(col *col  + raw * raw) );
-	col +=rayon; 
-	raw +=rayon;                           // Backup to the image coordinate axes 
-	
+	col +=rayon;
+	raw +=rayon;                           // Backup to the image coordinate axes
+
 	if(dist < 6*S)
 	{
 	  // Haar Wavelets responses accumulated in an histogram with Pi/3 precison
 	  if (( col > pas && col < Largeur - pas ) && ( raw > pas && raw < Largeur - pas) )
 	  {
-	    
+
 	    w  = vcl_exp(-((col-rayon)*(col-rayon) + (raw-rayon)*(raw-rayon))/(2*2.5*2.5*S*S) );
 	    pt[0] = (neigh[(col+pas) + raw * Largeur] - neigh[(col-pas) + raw *Largeur ]) * w ;
 	    pt[1] = (neigh[col + (raw+pas)* Largeur ] - neigh[col + (raw-pas)*Largeur]) * w;
-	    
-	    if (pt[0] + pt[1] != 0)                              
+
+	    if (pt[0] + pt[1] != 0)
 	    {
 	      angle = atan( pt[0]/pt[1] )*( Pi/M_PI);
-	      if(angle < 0 ) 
+	      if(angle < 0 )
 		angle += 2*Pi;
-	      
+
 	      bin = (int)(angle/LengthBin);
-	      
+
 	      if( bin <= NbBins-1  || bin >= 0 )
 	      {
-		tab[2*bin]   += pt[0]; 
+		tab[2*bin]   += pt[0];
 		tab[2*bin+1] += pt[1];
 	      }
 	    }
@@ -383,13 +383,13 @@ namespace otb
 	}
 	i+= pas;
       }
-    
-    //Find Orientation 
+
+    //Find Orientation
     double  indice = 0;
     double  max    = 0;
     double  length = 0;
-    
-    //Detection de l'orientation du point courant 
+
+    //Detection de l'orientation du point courant
     for (int i = 0 ; i < NbBins*2  ; i = i+2){
       length = vcl_sqrt( tab[i]*tab[i] + tab[i+1]*tab[i+1] );
       if( length > max){
@@ -397,21 +397,21 @@ namespace otb
 	indice = i/2;
       }
     }
-        
+
     return (indice+0.5)*LengthBin;
   }
-     
+
   /*-----------------------------------------------------------
    * Compute the descriptor of The KeyPoint
    -----------------------------------------------------------*/
-  
+
   template <class TInputImage, class TOutputPointSet>
   typename ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet>
   ::VectorType
   ImageToSURFKeyPointSetFilter< TInputImage, TOutputPointSet>
   ::ComputeDescriptor(const NeighborhoodType& neigh , double O , double S )
-  {  
-    
+  {
+
     typedef itk::CenteredRigid2DTransform<double> TransformType;
     TransformType::Pointer eulerTransform = TransformType::New();
     TransformType::ParametersType  ParamVec(5);
@@ -428,17 +428,17 @@ namespace otb
     double r = neigh.GetRadius()[0];
     double dist = 0;
     double x0 = neigh.GetCenterNeighborhoodIndex()% Largeur ;
-    double y0 = neigh.GetCenterNeighborhoodIndex()/ Largeur ; 
-    
-    //std::cout << " x0 " << x0 << " y0 "  << y0 << angle << std::endl;  
+    double y0 = neigh.GetCenterNeighborhoodIndex()/ Largeur ;
+
+    //std::cout << " x0 " << x0 << " y0 "  << y0 << angle << std::endl;
 
     VectorType  descriptorVector;
     descriptorVector.resize(64);
-     
+
     /** Parameters of the transformation*/
     ParamVec[0] = angle;
-    ParamVec[1] = x0; 
-    ParamVec[2] = y0; 
+    ParamVec[1] = x0;
+    ParamVec[2] = y0;
     ParamVec[3] = 0;
     ParamVec[4] = 0;
     eulerTransform->SetParameters(ParamVec);
@@ -447,41 +447,41 @@ namespace otb
       {
 	col = i % Largeur ;
 	raw = i / Largeur ;
-	
+
 	if (( col > pas && col < Largeur - pas ) && ( raw > pas && raw < Largeur - pas) )
 	  {
 	    double distanceX = (raw-r);
 	    double distanceY = (col-r);
 	    dist = vcl_sqrt(distanceX*distanceX + distanceY*distanceY);
-	   	    
+
 	    if(dist <= r )
 	      {
 		/* Transform point to compensate the rotation the orientation */
-		pDst[0] = col; 
+		pDst[0] = col;
 		pDst[1] = raw;
 		pSrc = eulerTransform->TransformPoint(pDst);
-		
+
 		/** New Coordinates (rotated) */
-		col = static_cast<int>(vcl_floor(pSrc[0])); 
-		raw = static_cast<int>(vcl_floor(pSrc[1]));  
-		
+		col = static_cast<int>(vcl_floor(pSrc[0]));
+		raw = static_cast<int>(vcl_floor(pSrc[1]));
+
 		if(raw==0) raw =+1;
 		if(col ==0) col +=1;
- 		
-		xx = static_cast<int> (pSrc[1]/rayon);    
-		yy = static_cast<int> (pSrc[0]/rayon); 
+
+		xx = static_cast<int> (pSrc[1]/rayon);
+		yy = static_cast<int> (pSrc[0]/rayon);
 		Nbin =  xx + 4*yy ;
-		
-		if( Nbin < 16)           //because 64 descriptor length 
-		  { 
+
+		if( Nbin < 16)           //because 64 descriptor length
+		  {
 		    double distanceXcompensee_2 = (pSrc[0] - r)*(pSrc[0] - r);
 		    double distanceYcompensee_2 = (pSrc[1] - r)*(pSrc[1] - r);
-		    
+
 		    w = vcl_exp(-( distanceXcompensee_2 + distanceYcompensee_2 ) / (2*3.3*3.3*S*S) );
-		    		    
+
 		    dx = 0.5 * (neigh[(col+pas) + raw * Largeur] - neigh[(col-pas) + raw *Largeur]) * w ;
 		    dy = 0.5 * (neigh[col + (raw+ pas)* Largeur] - neigh[col + (raw-pas)*Largeur])  * w;
-		    
+
 		    descriptorVector[4*Nbin  ] += dx ;
 		    descriptorVector[4*Nbin+1] += dy ;
 		    descriptorVector[4*Nbin+2] += vcl_abs(dx) ;
@@ -491,18 +491,18 @@ namespace otb
 	  }
 	i++;
       }
-          
+
     double accu = 0;
     for (int i = 0 ; i < 64 ;  i++)
       accu += descriptorVector[i]*descriptorVector[i];
-    
+
     for (int j = 0 ; j < 64 ;  j++)
       descriptorVector[j] /= vcl_sqrt(accu) ;
-    
+
     return descriptorVector;
 
   }
-  
+
   /*----------------------------------------------------------------
     PrintSelf
     -----------------------------------------------------------------*/
@@ -513,5 +513,5 @@ namespace otb
   {
     Superclass::PrintSelf(os, indent);
     os << indent << "Number of Key Points  " << m_NumberOfPoints  << std::endl;
-  }   
-} 
+  }
+}
diff --git a/Code/FeatureExtraction/otbImageToTreeFilter.h b/Code/FeatureExtraction/otbImageToTreeFilter.h
index 85931eb472..41f79f1a9e 100644
--- a/Code/FeatureExtraction/otbImageToTreeFilter.h
+++ b/Code/FeatureExtraction/otbImageToTreeFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,15 +22,15 @@
 namespace otb
 {
 /** \class ImageToTreeFilter
- * \brief Base class used to implement filters that have a image as input and a tree as output.  
+ * \brief Base class used to implement filters that have a image as input and a tree as output.
+ *
  *
- * 
  * \ingroup TreeListFilters
  * \ingroup TreeLists
  */
 
 template <class TInputImage, class TOutputTree>
-class ITK_EXPORT ImageToTreeFilter : public TreeSource<TOutputTree> 
+class ITK_EXPORT ImageToTreeFilter : public TreeSource<TOutputTree>
 {
 public:
   /** Standard class typedefs. */
@@ -41,7 +41,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageToTreeFilter, TreeSource);
 
@@ -49,11 +49,11 @@ public:
   typedef          TInputImage                    InputImageType;
   typedef typename InputImageType::Pointer        InputImagePointer;
   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
-  typedef typename InputImageType::RegionType     InputImageRegionType; 
-  typedef typename InputImageType::PixelType      InputImagePixelType; 
-  typedef typename InputImageType::SizeType       InputImageSizeType;                 
-  typedef typename InputImageType::ValueType      InputImageValueType;  
-  typedef typename InputImageType::IndexType      InputImageIndexType;  
+  typedef typename InputImageType::RegionType     InputImageRegionType;
+  typedef typename InputImageType::PixelType      InputImagePixelType;
+  typedef typename InputImageType::SizeType       InputImageSizeType;
+  typedef typename InputImageType::ValueType      InputImageValueType;
+  typedef typename InputImageType::IndexType      InputImageIndexType;
 
   typedef typename Superclass::OutputTreeType          OutputTreeType;
   typedef typename Superclass::OutputTreePointer       OutputTreePointer;
@@ -65,7 +65,7 @@ public:
   /** ImageDimension constants */
   itkStaticConstMacro(InputImageDimension, unsigned int,
                       TInputImage::ImageDimension);
-  
+
   DataObjectPointer  MakeOutput(unsigned int idx);
 
   /** Set the input image of this process object.  */
@@ -84,7 +84,7 @@ protected:
   ImageToTreeFilter();
   ~ImageToTreeFilter();
 
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
   ImageToTreeFilter(const ImageToTreeFilter&); //purposely not implemented
@@ -98,4 +98,4 @@ private:
 #endif
 
 #endif
- 
+
diff --git a/Code/FeatureExtraction/otbImageToTreeFilter.txx b/Code/FeatureExtraction/otbImageToTreeFilter.txx
index 2e82d84d2c..71c0bfc2bc 100644
--- a/Code/FeatureExtraction/otbImageToTreeFilter.txx
+++ b/Code/FeatureExtraction/otbImageToTreeFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ ImageToTreeFilter<TInputImage,TOutputTree>
   this->itk::ProcessObject::SetNumberOfRequiredInputs(1);
 
   OutputTreePointer output
-    = dynamic_cast<OutputTreeType*>(this->MakeOutput(0).GetPointer()); 
+    = dynamic_cast<OutputTreeType*>(this->MakeOutput(0).GetPointer());
 
   this->itk::ProcessObject::SetNumberOfRequiredOutputs(1);
   this->itk::ProcessObject::SetNthOutput(0, output.GetPointer());
@@ -49,7 +49,7 @@ ImageToTreeFilter<TInputImage,TOutputTree>
 ::~ImageToTreeFilter()
 {
 }
-  
+
 
 /**
  *   Make Output
@@ -70,38 +70,38 @@ ImageToTreeFilter<TInputImage,TOutputTree>
  *
  */
 template <class TInputImage, class TOutputTree>
-void 
+void
 ImageToTreeFilter<TInputImage,TOutputTree>
 ::SetInput(const InputImageType *input)
 {
   // process object is not const-correct, the const_cast
   // is required here.
-  this->itk::ProcessObject::SetNthInput(0, 
+  this->itk::ProcessObject::SetNthInput(0,
                                    const_cast< InputImageType * >(input) );
 }
 
 
-  
+
 /**
  *
  */
 template <class TInputImage, class TOutputTree>
 const typename ImageToTreeFilter<TInputImage,TOutputTree>::InputImageType *
 ImageToTreeFilter<TInputImage,TOutputTree>
-::GetInput(void) 
+::GetInput(void)
 {
   return dynamic_cast<const InputImageType*>
     (this->itk::ProcessObject::GetInput(0));
 }
 
- 
+
 /**
  *
  */
 template <class TInputImage, class TOutputTree>
 typename ImageToTreeFilter<TInputImage,TOutputTree>::OutputTreeType *
 ImageToTreeFilter<TInputImage,TOutputTree>
-::GetOutput(void) 
+::GetOutput(void)
 {
   return dynamic_cast<OutputTreeType*>
     (this->itk::ProcessObject::GetOutput(0));
@@ -112,7 +112,7 @@ ImageToTreeFilter<TInputImage,TOutputTree>
  *
  */
 template <class TInputImage, class TOutputTree>
-void 
+void
 ImageToTreeFilter<TInputImage,TOutputTree>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -123,11 +123,11 @@ ImageToTreeFilter<TInputImage,TOutputTree>
 
 /**
  * copy information from first input to all outputs
- * This is a void implementation to prevent the 
+ * This is a void implementation to prevent the
  * ProcessObject version to be called
  */
 template <class TInputImage, class TOutputTree>
-void 
+void
 ImageToTreeFilter<TInputImage,TOutputTree>
 ::GenerateOutputInformation()
 {
diff --git a/Code/FeatureExtraction/otbLikelihoodPathListFilter.h b/Code/FeatureExtraction/otbLikelihoodPathListFilter.h
index a0c256cbd4..03e89ef582 100644
--- a/Code/FeatureExtraction/otbLikelihoodPathListFilter.h
+++ b/Code/FeatureExtraction/otbLikelihoodPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,12 +25,12 @@ namespace otb
 {
 /** \class LikelihoodPathListFilter
  *  \brief Affect a value to each path of the list based on the image
- * 
+ *
  * PathList and image are given as an input, the filter affect a value to each
  * path: this value is equal to the sum of the pixels crossed by the path
  * (using a PolyLineImageConstIterator) divided by the number of points in the
  * path
- * 
+ *
  */
 template <class TPath, class TImage>
 class ITK_EXPORT LikelihoodPathListFilter
@@ -42,13 +42,13 @@ class ITK_EXPORT LikelihoodPathListFilter
   typedef PathListToPathListFilter<TPath>       Superclass;
   typedef itk::SmartPointer<Self>               Pointer;
   typedef itk::SmartPointer<const Self>         ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(LikelihoodPathListFilter, PathListToPathListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PathType         PathType;
   typedef typename Superclass::PathListType     PathListType;
@@ -63,13 +63,13 @@ class ITK_EXPORT LikelihoodPathListFilter
   typedef TImage ImageType;
   typedef typename ImageType::Pointer ImagePointerType;
   typedef typename ImageType::ConstPointer ImageConstPointerType;
-  
+
   /**
    * Set the input Likelihood image.
    * \param image The Likelihood image.
    */
   void SetInputImage(const ImageType * image);
-  
+
   /**
    * Get the input Likelihood image.
    * \return The input Likelihood image.
diff --git a/Code/FeatureExtraction/otbLikelihoodPathListFilter.txx b/Code/FeatureExtraction/otbLikelihoodPathListFilter.txx
index b10f929939..0de37e8466 100644
--- a/Code/FeatureExtraction/otbLikelihoodPathListFilter.txx
+++ b/Code/FeatureExtraction/otbLikelihoodPathListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.h b/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.h
index ce47089f16..6a30f9eb05 100644
--- a/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.h
+++ b/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,13 +25,13 @@
 
 namespace otb
 {
-  /** 
+  /**
    *\class LineCorrelationDetectorImageFilter
    * \brief To be documented
    *
    */
 
-template <class TInputImage, 
+template <class TInputImage,
 	  class TOutputImage,
           class TOutputImageDirection = TOutputImage,
 	  class TInterpolator = itk::LinearInterpolateImageFunction<TInputImage> >
@@ -42,7 +42,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -66,7 +66,7 @@ public:
   /** Typedefs to describe and access Interpolator */
   typedef typename InterpolatorType::Pointer InterpolatorPointer;
   typedef typename InterpolatorType::CoordRepType CoordRepType;
-  
+
   typedef typename InputImageType::PointType TPoint;
 
 
@@ -74,7 +74,7 @@ public:
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
 
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
@@ -89,11 +89,11 @@ protected:
 
   /** Compute the measure */
   virtual double ComputeMeasure(std::vector<double>* m1, std::vector<double>* m2, std::vector<double>* m3);
-  
+
 private:
   LineCorrelationDetectorImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
- 
+
 
 };
 } // end namespace otb
@@ -102,5 +102,5 @@ private:
 #include "otbLineCorrelationDetectorImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx b/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx
index 256536f5e2..6d67b0f76d 100644
--- a/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbLineCorrelationDetectorImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@
 #include "itkNeighborhoodAlgorithm.h"
 #include "itkZeroFluxNeumannBoundaryCondition.h"
 #include "itkProgressReporter.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -47,7 +47,7 @@ LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirect
 }
 
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
-double 
+double
 LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
 ::ComputeMeasure(std::vector<double>* m1, std::vector<double>* m2, std::vector<double>* m3)
 {
@@ -117,25 +117,25 @@ LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirect
   sigma2 = vcl_sqrt(sigma2);
   sigma3 = vcl_sqrt(sigma3);
   */
-  
+
 
   // Calculation of the cross correlation coefficient
-  
+
   double d1 = 0.;
   double d2 = 0.;
   double d3 = 0.;
 
   double rho12 = 0.;
   double rho13 = 0.;
-  
+
   // rho12
   if ( M2 != 0. )
     {
     d1 = sigma1/vcl_pow(M2,2)*m1->size();
     d2 = sigma2/vcl_pow(M2,2)*m2->size();
-    
+
     d3 = vcl_pow(((M1/M2)-1.),2)*(m1->size()*m2->size());
-  
+
         if ( ( d3 != 0. ) )
           rho12 = static_cast<double>( 1. / ( 1. + ( (m1->size()+m2->size())*(d1+d2)/d3 ) ) );
         else
@@ -146,9 +146,9 @@ LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirect
     {
     d1 = sigma1/vcl_pow(M3,2)*m1->size();
     d2 = sigma3/vcl_pow(M3,2)*m2->size();
-    
+
     d3 = vcl_pow(((M1/M3)-1.),2)*(m1->size()*m2->size());
-  
+
         if ( ( d3 != 0. ) )
           rho13 = static_cast<double>( 1. / ( 1. + ( (m1->size()+m2->size())*(d1+d2)/d3 ) ) );
         else
@@ -158,10 +158,10 @@ LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirect
 
 	rho12 = vcl_sqrt(rho12);
 	rho13 = vcl_sqrt(rho13);
-         
+
 	// Determination of the minimum intensity of detection between R12 et R13
 	return static_cast<double>( MIN( rho12, rho13 ) );
-	
+
 
 }
 
@@ -172,7 +172,7 @@ LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirect
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator>
-void 
+void
 LineCorrelationDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection, TInterpolator>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.h b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.h
index c5b55f8d3e..5b11331891 100644
--- a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.h
+++ b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@
 #include "itkNumericTraits.h"
 
 #define MINI(_A,_B) ((_A) < (_B) ? (_A) : (_B))
-#define MAXI(_A,_B) ((_A) > (_B) ? (_A) : (_B))  
+#define MAXI(_A,_B) ((_A) > (_B) ? (_A) : (_B))
 #define ROTATION(_x,_y,_theta,_xout,_yout) \
     (_xout) = (_x)*vcl_cos(_theta) - (_y)*vcl_sin(_theta); \
     (_yout) = (_x)*vcl_sin(_theta) + (_y)*vcl_cos(_theta)
@@ -47,15 +47,15 @@ namespace otb
  * ThreadedGenerateData"()" method calls the virtual
  * ComputeMeasure"()" method which implements the detection. This
  * method should be overloaded by each specific line detector.
- * 
+ *
  * The output is an image of intensity of detection and an image of
  * direction of the line fo each pixel.
- * 
+ *
  */
 
-template <class TInputImage, 
+template <class TInputImage,
 	  class TOutputImage,
-	  class TOutputImageDirection = TOutputImage, 
+	  class TOutputImageDirection = TOutputImage,
 	  class TInterpolator = itk::LinearInterpolateImageFunction<TInputImage> >
 class ITK_EXPORT LineDetectorImageFilterBase :  public ImageToModulusAndDirectionImageFilter< TInputImage, TOutputImage, TOutputImageDirection >
 {
@@ -64,7 +64,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -84,11 +84,11 @@ public:
   typedef typename Superclass::OutputImageType				OutputImageType;
   typedef typename Superclass::OutputImageDirectionType 	OutputImageDirectionType;
   typedef TInterpolator 									InterpolatorType;
-  
+
   /** Typedefs to describe and access Interpolator */
   typedef typename InterpolatorType::Pointer InterpolatorPointer;
   typedef typename InterpolatorType::CoordRepType CoordRepType;
-  
+
   typedef typename InputImageType::PointType TPoint;
 
 
@@ -97,13 +97,13 @@ public:
   typedef typename OutputImageType::PixelType OutputPixelType;
   typedef typename OutputImageType::Pointer OutputImagePointerType;
 
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
   /** Definition of the size of the images. */
   typedef typename InputImageType::SizeType SizeType;
-  
+
   /** Set the length of the linear feature. */
   itkSetMacro(LengthLine, unsigned int);
 
@@ -115,7 +115,7 @@ public:
 
   /** Get the length of the linear feature. */
   itkGetConstReferenceMacro(WidthLine, unsigned int);
-  
+
   /** Set the radius of one zone. */
   itkSetMacro(Radius, SizeType);
 
@@ -125,7 +125,7 @@ public:
 
   /** Set the radius of one zone. */
   itkSetMacro(Threshold, OutputPixelType);
-  
+
   /** Get the radius of one zone. */
   itkGetConstReferenceMacro(Threshold, OutputPixelType);
 
@@ -135,7 +135,7 @@ public:
   /** Get the numbero of drections for line detection. */
   itkGetConstReferenceMacro(NumberOfDirections, unsigned int);
 
-  
+
   virtual void GenerateInputRequestedRegion() throw(itk::InvalidRequestedRegionError);
 
 protected:
@@ -145,11 +145,11 @@ protected:
 
   void BeforeThreadedGenerateData();
 
-  /** LineDetectorImageFilterBase can be implemented for a treatment of filter multithreaded. 
-   * Thus, the ThreadedGenerateData() method is called for each thread process. 
-   * The data image are allocated automatically by the mother class by calling the 
-   * ThreadedGenerateData() method. ThreadedGenerateData can only write the portion 
-   * of the image specified by the parameter outputRegionForThread 
+  /** LineDetectorImageFilterBase can be implemented for a treatment of filter multithreaded.
+   * Thus, the ThreadedGenerateData() method is called for each thread process.
+   * The data image are allocated automatically by the mother class by calling the
+   * ThreadedGenerateData() method. ThreadedGenerateData can only write the portion
+   * of the image specified by the parameter outputRegionForThread
    *
    * \sa ImageToImageFilter::ThreadedGenerateData()
    * \sa    ImageToImageFilter::GenerateData()
@@ -159,25 +159,25 @@ protected:
 
   virtual double ComputeMeasure(std::vector<double>* m1, std::vector<double>* m2, std::vector<double>* m3);
 
-  /** Length of the linear feature = 2*m_LengthLine+1 */ 
+  /** Length of the linear feature = 2*m_LengthLine+1 */
   unsigned int m_LengthLine;
-  
-  /** Width of the linear feature = 2*m_WidthLine+1 */ 
+
+  /** Width of the linear feature = 2*m_WidthLine+1 */
   unsigned int m_WidthLine;
-     
+
   /** Radius of the region*/
   SizeType m_Radius;
-  
+
   /** Size of the facelist*/
   SizeType m_FaceList;
-  
+
   OutputPixelType m_Threshold;
 
   unsigned int m_NumberOfDirections;
 private:
   LineDetectorImageFilterBase(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
- 
+
 
 };
 } // end namespace otb
@@ -186,5 +186,5 @@ private:
 #include "otbLineDetectorImageFilterBase.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
index 4125cdb151..1589a5cb2b 100644
--- a/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
+++ b/Code/FeatureExtraction/otbLineDetectorImageFilterBase.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@
 #include "itkZeroFluxNeumannBoundaryCondition.h"
 #include "itkProgressReporter.h"
 #include "otbMacro.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -63,11 +63,11 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
   typename Superclass::InputImagePointer inputPtr   =  const_cast< TInputImage * >( this->GetInput() );
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -79,19 +79,19 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
   inputRequestedRegion = inputPtr->GetRequestedRegion();
 
   // Define the size of the region by the radius
-  m_Radius[1] = static_cast<unsigned int>(3*(2*m_WidthLine+1) + 2); 
+  m_Radius[1] = static_cast<unsigned int>(3*(2*m_WidthLine+1) + 2);
   m_Radius[0] = 2*m_LengthLine+1 ;
 
   // Define the size of the facelist by taking into account the rotation of the region
   m_FaceList[0] = static_cast<unsigned int>( vcl_sqrt( static_cast<double>((m_Radius[0]*m_Radius[0]) + (m_Radius[1]*m_Radius[1]) ) ) + 1 );
   m_FaceList[1] = m_FaceList[0];
-  
+
   otbMsgDevMacro( << "Radius   : "<<m_Radius[0]<<" "<<m_Radius[1]);
   otbMsgDevMacro( << "-> FaceList : "<<m_FaceList[0]<<" "<<m_FaceList[1]);
 
   // pad the input requested region by the operator radius
   inputRequestedRegion.PadByRadius( m_FaceList );
- 
+
   // crop the input requested region at the input's largest possible region
   if ( inputRequestedRegion.Crop(inputPtr->GetLargestPossibleRegion()) )
     {
@@ -105,7 +105,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     itk::OStringStream msg;
@@ -124,10 +124,10 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
  * has to be set up before ThreadedGenerateData
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class InterpolatorType >
-void 
+void
 LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, InterpolatorType>
 ::BeforeThreadedGenerateData()
-{  
+{
   typename OutputImageType::Pointer     output = this->GetOutput();
   output->FillBuffer(0);
   typename OutputImageType::Pointer     outputDirection = this->GetOutputDirection();
@@ -137,7 +137,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class InterpolatorType >
 void
 LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, InterpolatorType>
-::ThreadedGenerateData(	
+::ThreadedGenerateData(
 			const 	OutputImageRegionType& 		outputRegionForThread,
                        	int 	threadId
 		       )
@@ -148,8 +148,8 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 
   InterpolatorPointer interpolator2 = InterpolatorType::New();
   interpolator2->SetInputImage(input);
- 
-  
+
+
   itk::ZeroFluxNeumannBoundaryCondition<InputImageType> 	nbc;
   itk::ConstNeighborhoodIterator<InputImageType> 		bit,cit;
   typename itk::ConstNeighborhoodIterator<InputImageType>::OffsetType	off;
@@ -159,9 +159,9 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
   typedef itk::ImageRegionConstIterator<InputImageType> ConstInputIteratorType;
 
   // Allocate output
-  typename OutputImageType::Pointer     output = this->GetOutput();  
+  typename OutputImageType::Pointer     output = this->GetOutput();
   typename OutputImageType::Pointer     outputDir = this->GetOutputDirection();
-  
+
   // Find the data-set boundary "faces"
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType 		faceList;
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType::iterator 	fit;
@@ -171,16 +171,16 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   typename TInputImage::IndexType     bitIndex;
   typename InterpolatorType::ContinuousIndexType Index;
 
   // --------------------------------------------------------------------------
-  
+
   // Number of direction
   const unsigned int NB_DIR = this->GetNumberOfDirections();
-  // Number of zone	  
-  const int NB_ZONE = 3;  
+  // Number of zone
+  const int NB_ZONE = 3;
   // Definition of the 4 directions
   //double Theta[NB_DIR];
   //ROMAIN
@@ -196,45 +196,45 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
       Theta[i]=0.;*/
     }
 
-  // Number of the zone 
+  // Number of the zone
   unsigned int zone;
-  
-  
+
+
   // Intensity of the linear feature
   double R;
-  
+
   // Direction of detection
-  double Direction = 0.; 
+  double Direction = 0.;
 
   // Pixel location in the input image
   int X, Y;
-  
-  // Pixel location after rotation in the system axis of the region  
+
+  // Pixel location after rotation in the system axis of the region
   double xout, yout;
-  
+
   // location of the central pixel in the input image
   int Xc, Yc;
 
   // location of the central pixel between zone 1 and 2 and between zone 1 and 3
   int Yc12, Yc13;
-  
+
   //---------------------------------------------------------------------------
   otbMsgDevMacro( << "Theta    : "<<Theta[0]<<" "<<Theta[1]<<" "<<Theta[2]<<" "<<Theta[3]);
 
- 
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
 
   bool interiorFace = true;
 
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-    { 	
+    {
     bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius, input, *fit);
     cit = itk::ConstNeighborhoodIterator<InputImageType>(m_FaceList, input,*fit);
-    
+
     it = itk::ImageRegionIterator<OutputImageType>(output, *fit);
     itdir = itk::ImageRegionIterator<OutputImageType>(outputDir, *fit);
-    
+
     bit.OverrideBoundaryCondition(&nbc);
     bit.GoToBegin();
     cit.OverrideBoundaryCondition(&nbc);
@@ -244,14 +244,14 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 
 
     while ( (!bit.IsAtEnd())&&(!cit.IsAtEnd()) )
-      {	
+      {
 	InterpolatorPointer interpolator = InterpolatorType::New();
-	// Location of the central pixel of the region 
+	// Location of the central pixel of the region
 	off.Fill(0);
 	bitIndex = bit.GetIndex(off);
 	Xc = bitIndex[0];
 	Yc = bitIndex[1];
-	
+
 	// JULIEN :  If the processed region is the center face
 	// the input image can be used for the interpolation
 	if(interiorFace)
@@ -274,7 +274,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 	    typename InputImageType::Pointer tempImage = InputImageType::New();
 	    tempImage->SetRegions(tempRegion);
 	    tempImage->Allocate();
-	    
+
 	    for(unsigned int p = 0; p<=2*m_FaceList[0];p++)
 	      {
 		for(unsigned int q = 0; q<=2*m_FaceList[1];q++)
@@ -282,16 +282,16 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 		    typename itk::ConstNeighborhoodIterator<InputImageType>::OffsetType  index;
 		    index[0]=p-m_FaceList[0];
 		    index[1]=q-m_FaceList[1];
-		    tempImage->SetPixel(cit.GetIndex(index),cit.GetPixel(index));	      
+		    tempImage->SetPixel(cit.GetIndex(index),cit.GetPixel(index));
 		  }
 	      }
 	    interpolator->SetInputImage(tempImage);
 	  }
 
-            
+
       // Location of the central pixel between zone 1 and zone 2
       Yc12 = Yc - m_WidthLine - 1;
-      
+
       // Location of the central pixel between zone 1 and zone 3
       Yc13 = Yc + m_WidthLine + 1;
 
@@ -306,20 +306,20 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 		PixelValues[i] = NULL;
                 PixelValues[i] = new std::vector<double>[NB_ZONE];
         }
-	//otbMsgDevMacro( << "\tCentre Xc/Yc="<<Xc<<" "<<Yc<<" Yc12/Yc13="<<Yc12<<" "<<Yc13);          
-      // Loop on the region 
+	//otbMsgDevMacro( << "\tCentre Xc/Yc="<<Xc<<" "<<Yc<<" Yc12/Yc13="<<Yc12<<" "<<Yc13);
+      // Loop on the region
       for (unsigned int i = 0; i < m_Radius[0]; i++)
 	for (unsigned int j = 0; j < m_Radius[1]; j++)
         {
 
 	off[0]=i-m_Radius[0]/2;
 	off[1]=j-m_Radius[1]/2;
-	
+
         bitIndex = bit.GetIndex(off);
         X = bitIndex[0];
         Y = bitIndex[1];
-	
-	// We determine in the horizontal direction with which zone the pixel belongs. 
+
+	// We determine in the horizontal direction with which zone the pixel belongs.
         if ( Y < Yc12 )
       	  zone = 1;
         else if ( ( Yc12 < Y ) && ( Y < Yc13 ) )
@@ -331,62 +331,62 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
         //otbMsgDevMacro( << "\t\tPoint traite (i,j)=("<<i<<","<<j<<") -> X,Y="<<X<<","<<Y<<"  zone="<<zone);
         // Loop on the directions
         for (unsigned int dir=0; dir<NB_DIR; dir++ )
-          {      
+          {
 	  //ROTATION( (X-Xc), (Y-Yc), Theta[dir], xout, yout);
 
 	  xout = (X-Xc)*vcl_cos(Theta[dir]) - (Y-Yc)*vcl_sin(Theta[dir]);
 	  yout = (X-Xc)*vcl_sin(Theta[dir]) + (Y-Yc)*vcl_cos(Theta[dir]);
-  
+
 	  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 )));
-	  }     
-        } // end of the loop on the pixels of the region 
-          
+	  }
+        } // end of the loop on the pixels of the region
+
       R = 0.;
       Direction = 0.;
-           
+
       // Loop on the 4 directions
 
 
 	for (unsigned int dir=0; dir<NB_DIR; dir++ )
 	  {
-	  
+
 
 	  double Rtemp = this->ComputeMeasure(&PixelValues[dir][0], &PixelValues[dir][1], &PixelValues[dir][2]);
-	  
+
 	  if( Rtemp > R)
 	    {
 	    R = Rtemp;
 	    Direction = Theta[dir];
 	    }
-	  
+
 	  } // end of the loop on the directions
 
-        //otbMsgDevMacro( << "\t\tR,Direction : "<<R<<","<<Direction);	  
+        //otbMsgDevMacro( << "\t\tR,Direction : "<<R<<","<<Direction);
 	if( R >= this->GetThreshold() )
 	  {
-      
+
 	  // Assignment of this value to the output pixel
 	  it.Set( static_cast<OutputPixelType>(R) );
-	  
+
 	  // Assignment of this value to the "outputdir" pixel
-	  itdir.Set( static_cast<OutputPixelType>(Direction) );  
+	  itdir.Set( static_cast<OutputPixelType>(Direction) );
 	  }
 	else
 	  {
-	  
+
 	  it.Set( itk::NumericTraits<OutputPixelType>::Zero );
-	  
-	  itdir.Set( static_cast<OutputPixelType>(0) );  
-	  }	
+
+	  itdir.Set( static_cast<OutputPixelType>(0) );
+	  }
 	++bit;
 	++cit;
 	++it;
 	++itdir;
 	interiorFace=false;
-	progress.CompletedPixel();  
+	progress.CompletedPixel();
 
 	// ROMAIN
 	for (unsigned int i=0; i<NB_DIR; i++)
@@ -397,7 +397,7 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
 	delete[] PixelValues;
         PixelValues = NULL;
     }
-    
+
     }
 	delete[] Theta;
 }
@@ -414,14 +414,14 @@ LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, In
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class InterpolatorType >
-void 
+void
 LineDetectorImageFilterBase<TInputImage, TOutputImage, TOutputImageDirection, InterpolatorType>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
   os << indent << "Length: " << m_LengthLine << std::endl;
   os << indent << "Width: " << m_WidthLine << std::endl;
-  
+
 }
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h
index 16702da9c0..ba4bcceb5c 100644
--- a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h
+++ b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,37 +31,37 @@ namespace otb
  * \brief Application of detection of linear features based on the
  * ratio of local means.
  *
- * This class implements the Tupin's detector D1 used to detect 
+ * This class implements the Tupin's detector D1 used to detect
  * two parallel lines. This detector is derived from the coupling of two
  * ratio edge detectors (Touzi detector) on both side of a region.
  *
- * The region is divided in three zones to delimite two parallel lines. 
- * The size of one zone is defined by the product of the width 
+ * The region is divided in three zones to delimite two parallel lines.
+ * The size of one zone is defined by the product of the width
  * of the linear feature by its length.
  *
- * For each vertical line, we calculate the intensity of detection 
- * \f$ R_{12}(\theta_{0}) \f$ between zones 1 and 2 and \f$ R_{13}(\theta_{0})\f$ between  
+ * For each vertical line, we calculate the intensity of detection
+ * \f$ R_{12}(\theta_{0}) \f$ between zones 1 and 2 and \f$ R_{13}(\theta_{0})\f$ between
  * zones 1 and 3 according to the principle of the Touzi's filter.
  *
  * The response of the edge detector between two zones i and j is:
  *	 \f[R_{ij}=1-\min (\frac{\mu_{i}}{\mu_{j}};\frac{\mu_{j}}{\mu_{i}}) \f]
  *
  * The intensity of detection in the three other directions \f$ R(\theta_{i}) \f$
- * is determined by rotation of the pixels of each zone around the 
+ * is determined by rotation of the pixels of each zone around the
  * central pixel of the region considered. By default, the pixel location after
  * rotation is determined by the Spline interpolator.
- * 
- * Finally, the intensity of detection formed by the two parallel lines 
+ *
+ * Finally, the intensity of detection formed by the two parallel lines
  * is determined by the minimum response of a ration edge detector on both sides
  * of the linear structure:
  *	\f[ R = \min (R_{12};R_{13}) \f]
- * where \f$ R_{12} \f$ and \f$ R_{13}\f$ are the maximum response of the ratio edge 
+ * where \f$ R_{12} \f$ and \f$ R_{13}\f$ are the maximum response of the ratio edge
  * detector of \f$ R(\theta_{i}) \f$. The intensity of detection lies in
  * the interval \f$ [0, 1] \f$.
- * 
- * 
+ *
+ *
  */
-template <class TInputImage, 
+template <class TInputImage,
 	  class TOutputImage,
           class TOutputImageDirection = TOutputImage,
 	  class TInterpolator = itk::LinearInterpolateImageFunction<TInputImage> >
@@ -72,7 +72,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -96,7 +96,7 @@ public:
   /** Typedefs to describe and access Interpolator */
   typedef typename InterpolatorType::Pointer InterpolatorPointer;
   typedef typename InterpolatorType::CoordRepType CoordRepType;
-  
+
   typedef typename InputImageType::PointType TPoint;
 
 
@@ -104,7 +104,7 @@ public:
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
 
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
@@ -117,11 +117,11 @@ protected:
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   virtual double ComputeMeasure(std::vector<double>* m1, std::vector<double>* m2, std::vector<double>* m3);
-  
+
 private:
   LineRatioDetectorImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
- 
+
 
 };
 } // end namespace otb
@@ -130,5 +130,5 @@ private:
 #include "otbLineRatioDetectorImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx
index 533bae8f23..6d6feddaa5 100644
--- a/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbLineRatioDetectorImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@
 #include "itkNeighborhoodAlgorithm.h"
 #include "itkZeroFluxNeumannBoundaryCondition.h"
 #include "itkProgressReporter.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -48,11 +48,11 @@ LineRatioDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection,
 }
 
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator >
-double 
+double
 LineRatioDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >
 ::ComputeMeasure(std::vector<double>* m1, std::vector<double>* m2, std::vector<double>* m3)
 {
-  
+
   double M1 = 0.0;
   double M2 = 0.0;
   double M3 = 0.0;
@@ -86,21 +86,21 @@ LineRatioDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection,
 
   double R12 = 0.0;
   double R13 = 0.0;
-  
-  if (( M1 != 0. ) && (M2 != 0. )) 
+
+  if (( M1 != 0. ) && (M2 != 0. ))
     R12 = static_cast<double>( 1 - MIN( (M1/M2), (M2/M1) ) );
   else if (( M1 != 0. ) || (M2 != 0. ))
     R12 = 1.0;
   else R12 = 0.;
-    
-  
-  if (( M1 != 0. ) && (M3 != 0. )) 
+
+
+  if (( M1 != 0. ) && (M3 != 0. ))
     R13 = static_cast<double>( 1 - MIN( (M1/M3), (M3/M1) ) );
   else if (( M1 != 0. ) || (M3 != 0. ))
     R13 = 1.0;
   else R13 = 0.;
 
-  
+
   // Determination of the minimum intensity of detection between R12 et R13
   return static_cast<double>( MIN( R12, R13 ) );
 
@@ -111,12 +111,12 @@ LineRatioDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection,
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection, class TInterpolator >
-void 
+void
 LineRatioDetectorImageFilter< TInputImage, TOutputImage, TOutputImageDirection, TInterpolator >
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
- 
+
 }
 
 
diff --git a/Code/FeatureExtraction/otbLinkPathListFilter.h b/Code/FeatureExtraction/otbLinkPathListFilter.h
index ad5b512959..fd553c17e9 100644
--- a/Code/FeatureExtraction/otbLinkPathListFilter.h
+++ b/Code/FeatureExtraction/otbLinkPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,20 +25,20 @@ namespace otb
 {
 /** \class LinkPathListFilter
  *  \brief This filters link path from the input path list according to distance and angular criterions.
- *  
+ *
  *  This filter examines both ends of each path to link and is able to link several path into one single path.
  *  The two criterions to link a path are :
  *  - The two ends to link must be closer than the user defined threshold in terms of euclidean distance,
  *  - The angle at the link must not be sharp (less than the user defined threshold).
- *  
+ *
  *  Please note that this filter may invert the order of the vertices in the newly created path.
  *
  *  This filter is part of the road extraction framework.
- * 
+ *
    * \sa ParallelLinePathListFilter
- * 
+ *
    * \ingroup PathFilters
- * 
+ *
  */
 template <class TPath>
 class ITK_EXPORT LinkPathListFilter
@@ -50,13 +50,13 @@ class ITK_EXPORT LinkPathListFilter
   typedef PathListToPathListFilter<TPath>       Superclass;
   typedef itk::SmartPointer<Self>               Pointer;
   typedef itk::SmartPointer<const Self>         ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(LinkPathListFilter, PathListToPathListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PathType         PathType;
   typedef typename Superclass::PathListType     PathListType;
@@ -67,7 +67,7 @@ class ITK_EXPORT LinkPathListFilter
   typedef typename PathType::VertexListType VertexListType;
   typedef typename VertexListType::ConstIterator VertexIteratorType;
   typedef double 								RealType;
-  
+
   itkSetMacro(AngularThreshold,RealType);
   itkGetMacro(AngularThreshold,RealType);
   itkSetMacro(DistanceThreshold,RealType);
@@ -114,7 +114,7 @@ private:
 
   /// Do not use the sign of the orientation of the lines
   bool m_ModuloPI;
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/FeatureExtraction/otbLinkPathListFilter.txx b/Code/FeatureExtraction/otbLinkPathListFilter.txx
index de01ae56e8..ccaea3bab3 100644
--- a/Code/FeatureExtraction/otbLinkPathListFilter.txx
+++ b/Code/FeatureExtraction/otbLinkPathListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -19,7 +19,7 @@ PURPOSE.  See the above copyright notices for more information.
 #define __otbLinkPathListFilter_txx
 
 #include "otbLinkPathListFilter.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -43,12 +43,12 @@ LinkPathListFilter<TPath>
   // IO
   const PathListType *  inputPtr  = this->GetInput();
   PathListType *  outputPtr = this->GetOutput();
- 
+
   // Input iterator
   IteratorType inputIt = inputPtr->Begin();
-  
+
   std::vector<bool> eraseFlagVector;
-  
+
   // First we copy all input path to output
   while( inputIt != inputPtr->End())
     {
@@ -105,7 +105,7 @@ LinkPathListFilter<TPath>
 				{
 				  found = true;
 				}
-			    } 
+			    }
 			}
 		      // Examining end of path1 with end of path2
 		      vTargetIt = outputIt2.Get()->GetVertexList()->End();
@@ -114,7 +114,7 @@ LinkPathListFilter<TPath>
 		      --vTargetIt;
 		      v4 = vTargetIt.Value();
 		      tmpDistance = vcl_sqrt(vcl_pow(v2[0]-v3[0],2)+vcl_pow(v2[1]-v3[1],2));
-		      
+
 		      if((tmpDistance<static_cast<double>(m_DistanceThreshold)) && ((!found)||(tmpDistance<distance)))
 			{
 			  if(VerifyAngularCondition(v1,v2,v3,v4))
@@ -129,7 +129,7 @@ LinkPathListFilter<TPath>
 				{
 				  found = true;
 				}
-			    } 
+			    }
 			}
 		      // Examining beginning of path1 with end of path2
 		      vSourceIt = outputIt1.Get()->GetVertexList()->Begin();
@@ -137,7 +137,7 @@ LinkPathListFilter<TPath>
 		      ++vSourceIt;
 		      v1 = vSourceIt.Value();
 		      tmpDistance = vcl_sqrt(vcl_pow(v2[0]-v3[0],2)+vcl_pow(v2[1]-v3[1],2));
-		      
+
 		      if((tmpDistance<static_cast<double>(m_DistanceThreshold)) && ((!found)||(tmpDistance<distance)))
 			{
 			  if(VerifyAngularCondition(v1,v2,v3,v4))
@@ -152,7 +152,7 @@ LinkPathListFilter<TPath>
 				{
 				  found = true;
 				}
-			    } 
+			    }
 			}
 		      // Examining beginning of path1 with beginning of path2
 		      vTargetIt = outputIt2.Get()->GetVertexList()->Begin();
@@ -174,7 +174,7 @@ LinkPathListFilter<TPath>
 				{
 				  found = true;
 				}
-			    } 
+			    }
 			}
 		    }
 		  ++index2;
@@ -185,11 +185,11 @@ LinkPathListFilter<TPath>
 		  //otbMsgDevMacro(<<"Search ended, merging path "<<index1<<" and path "<<pathToLinkIndex);
 		  // an appropriate path was found
 		  outputIt2 = outputPtr->Begin() + pathToLinkIndex;
-		  PathPointerType newPath = this->LinkPath(outputIt1.Get(),revert1,outputIt2.Get(),revert2);	  
+		  PathPointerType newPath = this->LinkPath(outputIt1.Get(),revert1,outputIt2.Get(),revert2);
 		  outputPtr->PushBack(newPath);
 		  // add a non erased flag for the new path
 		  eraseFlagVector.push_back(false);
-		  // mark the old path as erased 
+		  // mark the old path as erased
 		  eraseFlagVector[index1]=true;
 		  eraseFlagVector[pathToLinkIndex]=true;
 		}
@@ -197,9 +197,9 @@ LinkPathListFilter<TPath>
 	}
       ++index1;
       // This replaces ++outputIt1 because the iterators is somehow invalidated by a pushback.
-      outputIt1 = outputPtr->Begin() + index1;     
+      outputIt1 = outputPtr->Begin() + index1;
     }
-  
+
   // search ended, now removing the erased path
   typename std::vector<bool>::reverse_iterator it = eraseFlagVector.rbegin();
   index1 = eraseFlagVector.size()-1;
@@ -234,7 +234,7 @@ LinkPathListFilter<TPath>
     {
     alpha1 = (alpha1 >= 0)?alpha1:(alpha1+M_PI);
     alpha2 = (alpha2 >= 0)?alpha2:(alpha2+M_PI);
-    alpha3 = (alpha3 >= 0)?alpha3:(alpha3+M_PI);  
+    alpha3 = (alpha3 >= 0)?alpha3:(alpha3+M_PI);
     }
   else
     {
@@ -242,7 +242,7 @@ LinkPathListFilter<TPath>
     alpha2 = (alpha2 >= 0)?alpha2:(alpha2+2.*M_PI);
     alpha3 = (alpha3 >= 0)?alpha3:(alpha3+2.*M_PI);
     }
-   
+
   bool resp = (vcl_abs(alpha1-alpha2) < static_cast<double>(m_AngularThreshold))
     && (vcl_abs(alpha1-alpha3) < static_cast<double>(m_AngularThreshold))
     &&(vcl_abs(alpha2-alpha3) <static_cast<double>(m_AngularThreshold ));
@@ -258,12 +258,12 @@ LinkPathListFilter<TPath>
  */
 template <class TPath>
 typename LinkPathListFilter<TPath>
-::PathPointerType 
+::PathPointerType
 LinkPathListFilter<TPath>
 ::LinkPath(PathPointerType p1, bool revert1 , PathPointerType p2, bool revert2)
 {
   PathPointerType resp = PathType::New();
-  
+
   VertexIteratorType it;
 
 
@@ -282,7 +282,7 @@ LinkPathListFilter<TPath>
 	  resp->AddVertex((it).Value());
 	}
     }
-  
+
   if(revert2)
     {
       for(it=(p2->GetVertexList()->End());it!=p2->GetVertexList()->Begin();)
diff --git a/Code/FeatureExtraction/otbLocalHoughFilter.h b/Code/FeatureExtraction/otbLocalHoughFilter.h
index 4e284ab142..0277cda22b 100644
--- a/Code/FeatureExtraction/otbLocalHoughFilter.h
+++ b/Code/FeatureExtraction/otbLocalHoughFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,15 +38,15 @@ namespace otb
  *
  * This class implements a filter that applies the hough transform on nxm
  * pixel tiling of the image. The Hough filter is used to find straight
- * lines in a 2-dimensional image. It detects the best line in each tile 
+ * lines in a 2-dimensional image. It detects the best line in each tile
  * and suppresses dubious line detection due to small local structures.
  *
- * Input parameters are : the tile radius, the number of lines we are 
- * looking for, the variance of the accumulator blurring (default = 5) and 
+ * Input parameters are : the tile radius, the number of lines we are
+ * looking for, the variance of the accumulator blurring (default = 5) and
  * the radius of the disc to remove from the accumulator (default = 10).
- * 
+ *
  */
- 
+
 template <class TInputImage>
 class ITK_EXPORT LocalHoughFilter : public ImageToLineSpatialObjectListFilter<TInputImage>
 {
@@ -58,21 +58,21 @@ public:
   typedef ImageToLineSpatialObjectListFilter<TInputImage>	Superclass;
   typedef itk::SmartPointer<Self>                       	Pointer;
   typedef itk::SmartPointer<const Self>                 	ConstPointer;
-  
+
     /** Method for management of the "object factory". */
   itkNewMacro(Self);
 
   /** Return the name of the class. */
   itkTypeMacro(LocalHoughFilter, ImageToLineSpatialObjectListFilter);
-  
-  
+
+
   /** Definition of the list of lines. */
   typedef typename Superclass::LinesListType	 LinesListType;
   typedef typename LinesListType::const_iterator LineIterator;
-  
+
   typedef typename LinesListType::LineType	 LineType;
   typedef typename LineType::Pointer   		 LinePointer;
-  
+
   typedef typename LineType::PointListType  	PointListType;
   typedef typename LineType::LinePointType      LinePointType;
 
@@ -83,27 +83,27 @@ public:
 
 
   typedef TInputImage InputImageType;
-  
+
   //------------------------------------------------------------
    typedef  unsigned char    OutputPixelType;
    typedef  otb::Image< OutputPixelType, 2 > OutputImageType;
-   //-----------------------------------------------  
+   //-----------------------------------------------
 
   /** Definition of the pixel type of the input and output images */
   typedef typename InputImageType::PixelType 	InputPixelType;
   typedef   float           			AccumulatorPixelType;
-  
+
   typedef typename InputImageType::RegionType	InputImageRegionType;
 
   /** Definition of the size of the images. */
   typedef typename InputImageType::SizeType SizeType;
-  
+
   typedef typename InputImageType::RegionType::IndexType	IndexType;
-  
+
   /** Typedefs to define the extract ROI filter. */
   typedef ExtractROI< InputPixelType, InputPixelType>	ROIFilterType;
-  
-    
+
+
   /** Set the radius of the local region where to apply the Hough filter. */
   itkSetMacro(Radius, SizeType);
 
@@ -137,7 +137,7 @@ public:
   itkGetMacro(Threshold,float);
 
 
-  
+
 protected:
   LocalHoughFilter();
   virtual ~LocalHoughFilter() {}
@@ -145,11 +145,11 @@ protected:
 
   /** Definition of the Hough Filter. */
   typedef itk::HoughTransform2DLinesImageFilter<InputPixelType, AccumulatorPixelType>	HoughFilterType;
-  
+
 
   virtual void GenerateData();
-  
-  
+
+
 private:
   LocalHoughFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -159,24 +159,24 @@ private:
 
   /** Radius used to define the overlap of local regions. */
   SizeType m_Overlap;
-  
+
   /** Parameter of the Hough filter : number of lines we are looking for. */
   unsigned int  m_NumberOfLines;
-  
+
   /** Variance of the accumulator blurring (default = 5). */
   float m_Variance;
-  
+
   /** Radius of the disc to remove from the accumulator (default = 10). */
   float m_DiscRadius;
 
   /** Threshold abouve which a pixel is consedered as valid */
   float m_Threshold;
-  
+
  LinePointer LinePointResearch(LineIterator itLines, InputImageType *localImage, IndexType origin);
 
-  
+
 };
-  
+
 
 } // end namespace otb
 
diff --git a/Code/FeatureExtraction/otbLocalHoughFilter.txx b/Code/FeatureExtraction/otbLocalHoughFilter.txx
index fc39fcf092..968d5850f6 100644
--- a/Code/FeatureExtraction/otbLocalHoughFilter.txx
+++ b/Code/FeatureExtraction/otbLocalHoughFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,11 +43,11 @@ LocalHoughFilter<TInputImage>::LocalHoughFilter() : ImageToLineSpatialObjectList
 template <class TInputImage>
 typename LocalHoughFilter<TInputImage>::LinePointer
 LocalHoughFilter<TInputImage>::
-LinePointResearch(LineIterator itLines, InputImageType *image, IndexType origin) 
+LinePointResearch(LineIterator itLines, InputImageType *image, IndexType origin)
 {
-        	
+
    // Get the list of points which consists of two points to represent a
-   // straight line 
+   // straight line
    PointListType & pointsList = (*itLines)->GetPoints();
    typename PointListType::const_iterator   itPoints = pointsList.begin();
 
@@ -59,74 +59,74 @@ LinePointResearch(LineIterator itLines, InputImageType *image, IndexType origin)
    double v[2];
    v[0] = u[0]-(*itPoints).GetPosition()[0];
    v[1] = u[1]-(*itPoints).GetPosition()[1];
-	
+
    double norm = vcl_sqrt(v[0]*v[0]+v[1]*v[1]);
    v[0] /= norm;
    v[1] /= norm;
 
 
-   typename InputImageType::RegionType region = image->GetLargestPossibleRegion(); 
-	       
+   typename InputImageType::RegionType region = image->GetLargestPossibleRegion();
+
    PointListType ptList;
    LinePointType point;
-	 
+
    typename InputImageType::IndexType localIndex;
    typename InputImageType::IndexType previousIndex;
    typename InputImageType::IndexType nextIndex;
-	
-	
-   // The diagonal is the largest distance between two edges of image	
+
+
+   // The diagonal is the largest distance between two edges of image
    itk::Size<2> size = region.GetSize();
    float diag = vcl_sqrt((float)( size[0]*size[0] + size[1]*size[1] ));
-		    
-   // Loop on the largest distance to be sure to cover all the image 
-   // whatever the position of the origin u	
+
+   // Loop on the largest distance to be sure to cover all the image
+   // whatever the position of the origin u
    for(int i=static_cast<int>(-diag); i<static_cast<int>(diag); i++)
       {
-		       
+
       previousIndex[0] = static_cast<long>(u[0]+(i-1)*v[0]);
       previousIndex[1] = static_cast<long>(u[1]+(i-1)*v[1]);
-		       
+
       localIndex[0] = static_cast<long>(u[0]+i*v[0]);
       localIndex[1] = static_cast<long>(u[1]+i*v[1]);
-		       
+
       nextIndex[0] = static_cast<long>(u[0]+(i+1)*v[0]);
-      nextIndex[1] = static_cast<long>(u[1]+(i+1)*v[1]);	       
-		
+      nextIndex[1] = static_cast<long>(u[1]+(i+1)*v[1]);
+
 
       // Check if the local index is inside the image and the previous
       // index is outside or if the local index is inside the image and
       // the next index is outside
-	
-	      
+
+
       if( ((region.IsInside( localIndex )) && (!region.IsInside( previousIndex ))) ||
           ((region.IsInside( localIndex )) && (!region.IsInside( nextIndex ))) )
          {
-   
+
          point.SetPosition(localIndex[0]+origin[0],localIndex[1]+origin[1]);
          ptList.push_back(point);
-   
+
          }
-	
+
       }
-	      
-   // Check if the line is well defined by two points	               
+
+   // Check if the line is well defined by two points
    LinePointer line = LineType::New();
-	    
-	  
+
+
    if ( ptList.size() == 2 )
-      {         
+      {
       line->SetId(0);
       line->SetPoints(ptList);
       line->ComputeBoundingBox();
       }
-	        
-   ptList.clear(); 
 
- 
-   return( line);  
-   	
-	
+   ptList.clear();
+
+
+   return( line);
+
+
 }
 
 
@@ -137,32 +137,32 @@ LocalHoughFilter<TInputImage>
 {
 
    typename InputImageType::ConstPointer 	input  = this->GetInput();
-   
-   typename LinesListType::Pointer 	 	list;   
+
+   typename LinesListType::Pointer 	 	list;
    list = this->GetOutput();
-   
+
    typename ROIFilterType::Pointer	ROIfilter = ROIFilterType::New();
-   
+
    typename HoughFilterType::LinesListType	lines;
-   
+
    typename HoughFilterType::Pointer	houghFilter = HoughFilterType::New();
-   
-   
+
+
    // Get image size
-   itk::Size<2> size = input->GetLargestPossibleRegion().GetSize();   
+   itk::Size<2> size = input->GetLargestPossibleRegion().GetSize();
 
    // Loop on the input image
-   
+
    // Direction X
    // x and y must be < size in order to avoid 0-sized regions
    for ( unsigned long x=0; x < size[0]-1; x += (m_Radius[0]-m_Overlap[0]) )
       {
 
-      // Initialize the extract ROI filter in the direction X	
+      // Initialize the extract ROI filter in the direction X
       ROIfilter->SetStartX(x);
-      
+
       // Number of pixels of the local region
-      if ( (x+m_Radius[0]) < size[0] ) 
+      if ( (x+m_Radius[0]) < size[0] )
       	 ROIfilter->SetSizeX(m_Radius[0]);
       else
       	 ROIfilter->SetSizeX(size[0]-x-1);
@@ -170,29 +170,29 @@ LocalHoughFilter<TInputImage>
 
       // Direction Y
       for ( unsigned long y=0; y < size[1]-1; y += (m_Radius[1]-m_Overlap[1]) )
-         {	
-	 
-  	 // Initialize the extract ROI filter in the direction Y	
+         {
+
+  	 // Initialize the extract ROI filter in the direction Y
       	 ROIfilter->SetStartY(y);
-      	 
-      	 if ( (y+m_Radius[1]) < size[1] ) 
+
+      	 if ( (y+m_Radius[1]) < size[1] )
       	    ROIfilter->SetSizeY(m_Radius[1]);
       	 else
-      	    ROIfilter->SetSizeY(size[1]-y-1);      	    
+      	    ROIfilter->SetSizeY(size[1]-y-1);
+
+
 
-	 
-      	
       	 // Extract the local region of the input image
       	 ROIfilter->SetInput( this->GetInput() );
-      	 
+
       	 // ----------------------------------------------------
       	 // Create a copy of the extract ROI filter output image
      	 // ----------------------------------------------------
-     	 
+
 	 typename InputImageType::Pointer 	localImage = InputImageType::New();
 	 typename InputImageType::Pointer     	filterImage = InputImageType::New();
-	
-	  
+
+
 	 ROIfilter->UpdateLargestPossibleRegion();
 	 ROIfilter->Update();
 
@@ -200,14 +200,14 @@ LocalHoughFilter<TInputImage>
 
 	 // Create a new image from the extracted region. The starting
 	 // index is the corner of the newly generated image (0,0)
-	   
+
 	 typename InputImageType::RegionType region;
-	  
+
 	 IndexType	index;
-	   
+
 	 index[0] = 0;
 	 index[1] = 0;
-	  	
+
 	 region.SetSize(filterImage->GetLargestPossibleRegion().GetSize());
 	 region.SetIndex(index);
 	 localImage->SetRegions( region );
@@ -215,20 +215,20 @@ LocalHoughFilter<TInputImage>
 	 localImage->SetSpacing(filterImage->GetSpacing());
 	 localImage->Allocate();
 
-	 typedef itk::ImageRegionIteratorWithIndex< InputImageType > LocalIteratorType; 
-	 typedef itk::ImageRegionConstIteratorWithIndex< InputImageType >  FilterIteratorType; 
-	    
+	 typedef itk::ImageRegionIteratorWithIndex< InputImageType > LocalIteratorType;
+	 typedef itk::ImageRegionConstIteratorWithIndex< InputImageType >  FilterIteratorType;
+
 	 LocalIteratorType    localIt( localImage, localImage->GetRequestedRegion() );
 	 FilterIteratorType   filterIt(  filterImage,  filterImage->GetRequestedRegion() );
-	
+
 	 localIt.GoToBegin();
 	 filterIt.GoToBegin();
-	
+
 
 	 // Copy the filter image in the new local image
 	 for ( localIt.GoToBegin(); !localIt.IsAtEnd(); ++localIt,++filterIt)
 	    localIt.Set( static_cast<InputPixelType>(filterIt.Get()) );
-	     
+
 
       	 // -------------------------------
       	 // Application of Hough filter
@@ -239,55 +239,55 @@ LocalHoughFilter<TInputImage>
        	 houghFilter->SetVariance( m_Variance );
        	 houghFilter->SetDiscRadius( m_DiscRadius );
 	 			 houghFilter->SetThreshold( m_Threshold );
-       	 
+
       	 houghFilter->Modified();
-      	    	 
+
       	 houghFilter->Update();
-      	 
 
-         // ---------------------------------------	 
+
+         // ---------------------------------------
       	 // Get the list of LineSpatialObject lines
       	 // ---------------------------------------
-      	 
+
       	 lines = houghFilter->GetLines(m_NumberOfLines);
 
 
          LineIterator itLines = lines.begin();
-         
+
          // Loop on the lines of hough filter list
          while( itLines != lines.end() )
             {
-            	
-            LinePointer line = LineType::New();	
-            
+
+            LinePointer line = LineType::New();
+
             IndexType	origin;
-            
+
             origin[0] = x;
             origin[1] = y;
-            
-	    // Call the private method that researchs the two points 
+
+	    // Call the private method that researchs the two points
 	    // used to define a line
 	    line = LinePointResearch(itLines, localImage, origin);
 
 	    if (line->GetNumberOfPoints() != 0)
   	       list->push_back(line);
-	    
+
 	    itLines++;
-	    
+
 	    }
-	    
+
 	 lines.clear();
-	    
+
          } // end of loop in y direction
-         
+
       } // end of loop in x direction
-   
-	
+
+
 }
 
 
 template <class TInputImage>
-void 
+void
 LocalHoughFilter<TInputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.h b/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.h
index c44254e217..d43b7f1de7 100644
--- a/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.h
+++ b/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,12 +30,12 @@ namespace otb
  *
  * This is the base class for alls class' generate an image dulus and
  * by using an modulus and a direction images intputs.
- * SetInput() method set the modulus image input and  
- * SetInputDirection() set the image direction input. 
- * 
+ * SetInput() method set the modulus image input and
+ * SetInputDirection() set the image direction input.
+ *
  */
 template <class TInputImage,
-	class TInputImageDirection, 
+	class TInputImageDirection,
 	class TOutputImage >
 class ITK_EXPORT ModulusAndDirectionImageToImageFilter :  public itk::ImageToImageFilter< TInputImage, TOutputImage >
 {
@@ -44,7 +44,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -63,7 +63,7 @@ public:
   typedef typename Superclass::InputImageType 	InputImageType;
   typedef TInputImageDirection 				    InputImageDirectionType;
   typedef typename Superclass::OutputImageType	OutputImageType;
- 
+
   /** Set/Get the image input of this process object.  */
   virtual void SetInput( const InputImageType *input);
   virtual void SetInputDirection( const InputImageDirectionType *direction);
@@ -86,5 +86,5 @@ private:
 #include "otbModulusAndDirectionImageToImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.txx b/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.txx
index 27a89489d4..c64d5f258d 100644
--- a/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.txx
+++ b/Code/FeatureExtraction/otbModulusAndDirectionImageToImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -46,7 +46,7 @@ ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutput
 SetInput( const InputImageType *input)
 {
   // Process object is not const-correct so the const_cast is required here
-  this->itk::ProcessObject::SetNthInput(0, 
+  this->itk::ProcessObject::SetNthInput(0,
                                    const_cast< InputImageType * >( input ) );
 }
 
@@ -56,11 +56,11 @@ ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutput
 SetInputDirection( const InputImageDirectionType *direction)
 {
   // Process object is not const-correct so the const_cast is required here
-  this->itk::ProcessObject::SetNthInput(1, 
+  this->itk::ProcessObject::SetNthInput(1,
                                    const_cast< InputImageDirectionType * >( direction ) );
 }
 
-/** Return the input image modulus */  
+/** Return the input image modulus */
 template <class TInputImage, class TInputImageDirection, class TOutputImage >
 const typename ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutputImage>::InputImageType *
 ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutputImage>::
@@ -70,12 +70,12 @@ GetInput(void)
     {
     return 0;
     }
-  
+
   return static_cast<const TInputImage * >
     (this->itk::ProcessObject::GetInput(0) );
 }
 
-/** Return the intput image direction */  
+/** Return the intput image direction */
 template <class TInputImage, class TInputImageDirection, class TOutputImage >
 const typename ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutputImage>::InputImageDirectionType *
 ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutputImage>::
@@ -85,7 +85,7 @@ GetInputDirection(void)
     {
     return 0;
     }
-  
+
   return static_cast<const TInputImageDirection * >
     (this->itk::ProcessObject::GetInput(1) );
 
@@ -95,12 +95,12 @@ GetInputDirection(void)
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TInputImageDirection, class TOutputImage >
-void 
+void
 ModulusAndDirectionImageToImageFilter<TInputImage, TInputImageDirection, TOutputImage>::
 PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
- 
+
 }
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbMultiplyByScalarImageFilter.h b/Code/FeatureExtraction/otbMultiplyByScalarImageFilter.h
index a30a7283f9..f1c4220748 100644
--- a/Code/FeatureExtraction/otbMultiplyByScalarImageFilter.h
+++ b/Code/FeatureExtraction/otbMultiplyByScalarImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,13 +22,13 @@
 
 namespace otb
 {
-  
+
 /** \class MultiplyByScalarImageFilter
- * 
+ *
  */
 
-namespace Functor {  
-  
+namespace Functor {
+
 template< class TInput, class TOutput >
 class MultiplyByScalar
 {
@@ -38,9 +38,9 @@ public:
   inline TOutput operator()( const TInput & value )
   {
     TOutput result;
-       
+
     result = static_cast<TOutput>( m_Coef * value );
-    
+
     return result;
   }
 
@@ -50,12 +50,12 @@ public:
   }
   double GetCoef(void)const
   {
-  	return (  m_Coef ); 
+  	return (  m_Coef );
   }
 
 private:
-  double  m_Coef;  
-}; 
+  double  m_Coef;
+};
 }
 
 template <class TInputImage, class TOutputImage>
@@ -63,7 +63,7 @@ class ITK_EXPORT MultiplyByScalarImageFilter :
     public itk::UnaryFunctorImageFilter<
             TInputImage,TOutputImage,
             Functor::MultiplyByScalar<
-                   ITK_TYPENAME TInputImage::PixelType, 
+                   ITK_TYPENAME TInputImage::PixelType,
 		   ITK_TYPENAME TOutputImage::PixelType>   >
 {
 public:
@@ -71,25 +71,25 @@ public:
   typedef MultiplyByScalarImageFilter                                      Self;
   typedef typename itk::UnaryFunctorImageFilter<
                              TInputImage,
-		             TOutputImage, 
-                             Functor::MultiplyByScalar< 
-				       ITK_TYPENAME TInputImage::PixelType, 
+		             TOutputImage,
+                             Functor::MultiplyByScalar<
+				       ITK_TYPENAME TInputImage::PixelType,
 		                       ITK_TYPENAME TOutputImage::PixelType> > Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   void SetCoef(double Coef)
   {
 	this->GetFunctor().SetCoef( Coef );
 	this->Modified();
-  }  
+  }
   double GetCoef(void)const
   {
 	return( this->GetFunctor().GetCoef() );
-  }  
+  }
 protected:
   MultiplyByScalarImageFilter() {}
   virtual ~MultiplyByScalarImageFilter() {}
@@ -98,7 +98,7 @@ private:
   MultiplyByScalarImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.h b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.h
index d1a49bf2f3..8c1732cf07 100644
--- a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.h
+++ b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,14 +25,14 @@ namespace otb
 /** \class NeighborhoodScalarProductFilter
  *  \brief This filter is designed to be part of a pipeline aiming at linear feature extraction, such as roads.
  *
- *  This filter takes as input a two-band image resulting from a gradient operator. The first channel contains 
+ *  This filter takes as input a two-band image resulting from a gradient operator. The first channel contains
  *  the gradient value in the first image direction, the second contains the gradient value in the second image direction.
  *
  *  Assuming that the linear feature we want to detect is darker than its surrounding environnement, we can deduce that
- *  the gradient direction will be opposite on each side of the road. Therefore, we compute for each pixel to compute the scalar 
+ *  the gradient direction will be opposite on each side of the road. Therefore, we compute for each pixel to compute the scalar
  *  product of the gradient vector for each opposite pixels in the neighborhood of radius 1 of the pixel to compute.
- * 
- * The lower negativ scalar product value along these four pairs of pixel gives us the direction in which there is most 
+ *
+ * The lower negativ scalar product value along these four pairs of pixel gives us the direction in which there is most
  * likely a linear feature.
  *
  * This filters has two outputs :
@@ -40,7 +40,7 @@ namespace otb
  * - The second output (from the GetOutputDirection() method) gives the direction in radian of this linear feature.
  *
  * Please note that there are only 8 possible values for the direction image, corresponding to two directions for each pair of opposite
- * pixels. In our conventions, negatives angle values represent opposite gradient vectors, whereas positive angle values represent convergent 
+ * pixels. In our conventions, negatives angle values represent opposite gradient vectors, whereas positive angle values represent convergent
  * gradient vectors.
  *  \ingroup Streamed
  *  \ingroup Threaded
@@ -55,13 +55,13 @@ class ITK_EXPORT NeighborhoodScalarProductFilter
   typedef ImageToModulusAndDirectionImageFilter<TInputImage,TOutputModulus,TOutputDirection> Superclass;
   typedef itk::SmartPointer<Self>                                                            Pointer;
   typedef itk::SmartPointer<const Self>                                                      ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(NeighborhoodScalarProductFilter,ImageToModulusAndDirectionImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::ConstPointer InputImageConstPointerType;
@@ -74,7 +74,7 @@ class ITK_EXPORT NeighborhoodScalarProductFilter
   typedef TOutputDirection OutputDirectionType;
   typedef typename OutputDirectionType::Pointer OutputDirectionPointerType;
   typedef typename OutputDirectionType::RegionType OutputImageRegionType;
- 
+
 protected:
   /** Constructor */
   NeighborhoodScalarProductFilter();
diff --git a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx
index 741ff13371..981a2dd9b7 100644
--- a/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx
+++ b/Code/FeatureExtraction/otbNeighborhoodScalarProductFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "itkNeighborhoodAlgorithm.h"
 #include "itkProgressReporter.h"
 
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -51,12 +51,12 @@ NeighborhoodScalarProductFilter<TInputImage,TOutputModulus,TOutputDirection>
   typedef itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType> BoundaryFacesCalculatorType;
   typedef typename BoundaryFacesCalculatorType::FaceListType FaceListType;
   typedef typename FaceListType::iterator FaceListIteratorType;
-  
-  // Pointers on inputs/outputs 
+
+  // Pointers on inputs/outputs
   InputImageType * inputPtr = const_cast<InputImageType *>(this->GetInput());
   OutputModulusPointerType outputPtr = this->GetOutput();
   OutputDirectionPointerType outputDirPtr = this->GetOutputDirection();
-  
+
   // Neighborhood radius
   RadiusType r;
   r.Fill(1);
@@ -68,25 +68,25 @@ NeighborhoodScalarProductFilter<TInputImage,TOutputModulus,TOutputDirection>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-    { 
+    {
       NeighborhoodIteratorType neighInputIt(r, inputPtr, *fit);
       OutputIteratorType outputIt(outputPtr,*fit);
       OutputDirectionIteratorType outputDirIt(outputDirPtr,*fit);
       neighInputIt.GoToBegin();
       outputIt.GoToBegin();
       outputDirIt.GoToBegin();
-    
+
       while ((!neighInputIt.IsAtEnd()) && (!outputIt.IsAtEnd()) && (!outputDirIt.IsAtEnd()) )
 	{
 	  // local variable intialisation
 	  int neighborhoodNumberMax = 0;
 	  double scalarMaxValue= 0.0;
 	  int flagPosNegDirection = 0;
-	 
+
 	  // walk through each case
 	  for (int neighborhoodNumber = 0;  neighborhoodNumber<4; ++neighborhoodNumber)
 	    {
@@ -117,42 +117,42 @@ NeighborhoodScalarProductFilter<TInputImage,TOutputModulus,TOutputDirection>
 	      offset1[1]=1;
 	      offset2[0]=0;
 	      offset2[1]=-1;
-	      break;                
-	    }  
+	      break;
+	    }
 	    // Get the gradient values
 	    InputPixelType pixel1 = neighInputIt.GetPixel(offset1);
 	    InputPixelType pixel2 = neighInputIt.GetPixel(offset2);
-	    
+
 	    // Compute the scalar product
 	    scalarCurrentValue = -(pixel1[0]*pixel2[0]+pixel1[1]*pixel2[1]);
-	    
+
 	    // If the value is upper than the current max value
 	    if (scalarCurrentValue > scalarMaxValue)
 	      {
 		// keep this configuration
 		scalarMaxValue = scalarCurrentValue;
 		neighborhoodNumberMax = neighborhoodNumber;
-		
+
 		// Also keep the direction
-		if (pixel1[0] <0) 
+		if (pixel1[0] <0)
 		  {
 		    flagPosNegDirection = 1;
-		  } 
-		else 
+		  }
+		else
 		  {
 		  flagPosNegDirection = 0;
 		  }
-		
+
 	      }
 	    }
-	  // Compute the direction 
+	  // Compute the direction
     double angle = (1+neighborhoodNumberMax) * M_PI_4;
-	  if (flagPosNegDirection) 
+	  if (flagPosNegDirection)
 	    {
 	      angle -= M_PI;
 	    }
 
-	  // Set the ouptut values	  
+	  // Set the ouptut values
 	  outputIt.Set(scalarMaxValue);
 	  outputDirIt.Set(angle);
 	  ++neighInputIt;
diff --git a/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h b/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h
index c0f8d585d2..46d162948a 100644
--- a/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h
+++ b/Code/FeatureExtraction/otbNonMaxRemovalByDirectionFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -21,14 +21,14 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbModulusAndDirectionImageToImageFilter.h"
 #include "otbBinaryFunctorNeighborhoodImageFilter.h"
 
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
 namespace Functor
   {
     /** \class NonMaxRemovalByDirectionFunctor
-     *  \brief This functor is used by the NonMaxRemovalByDirectionFilter 
+     *  \brief This functor is used by the NonMaxRemovalByDirectionFilter
      *  \sa NonMaxRemovalByDirectionFilter
      *  \ingroup Functor
      */
@@ -41,21 +41,21 @@ namespace Functor
 	inline TOutput operator()(const TInput1 & itA, const TInput2 &itB)
 	  {
 	    TOutput resp = 0;
-	    if (itA.GetCenterPixel() != 0) 
+	    if (itA.GetCenterPixel() != 0)
 	      {
 		typename TInput1::OffsetType offset1,offset2;
 		int neighborhoodNumber;
 		if (itB.GetCenterPixel() > 0)
 		  {
 		    neighborhoodNumber = static_cast<int>(itB.GetCenterPixel()/(M_PI/4)-1);
-		  } 
-		else 
+		  }
+		else
 		  {
 		    neighborhoodNumber = static_cast<int>((itB.GetCenterPixel()+M_PI)/(M_PI/4)-1);
 		  }
-		switch( neighborhoodNumber ) 
+		switch( neighborhoodNumber )
 		  {
-		case 0: 
+		case 0:
 		  offset1[0] =  1;
 		  offset1[1] = -1;
 		  offset2[0] = -1;
@@ -78,10 +78,10 @@ namespace Functor
 		  offset1[1] =  1;
 		  offset2[0] =  0;
 		  offset2[1] = -1;
-		  break;                
+		  break;
 		}
-		if ((itA.GetCenterPixel() > itA.GetPixel(offset1)) 
-		    && (itA.GetCenterPixel() > itA.GetPixel(offset2))) 
+		if ((itA.GetCenterPixel() > itA.GetPixel(offset1))
+		    && (itA.GetCenterPixel() > itA.GetPixel(offset2)))
 		  {
 		    resp =  itA.GetCenterPixel();
 		  }
@@ -91,7 +91,7 @@ namespace Functor
       };
   }
 /** \class NonMaxRemovalByDirectionFilter
- *  \brief This filters removes (sets to null intensity) pixels which are not the maxima of the 
+ *  \brief This filters removes (sets to null intensity) pixels which are not the maxima of the
  *  scalar product modulus value in the given direction.
  *
  * \ingroup Streamed
@@ -107,21 +107,21 @@ class ITK_EXPORT NonMaxRemovalByDirectionFilter
   typedef ModulusAndDirectionImageToImageFilter<TInputModulus, TInputDirection, TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>                                                             Pointer;
   typedef itk::SmartPointer<const Self>                                                       ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(NonMaxRemovalByDirectionFilter,ModulusAndDirectionImageToImageFilter);
-  
+
   /** typedef of the computing filter (this allows us to derive from ModulusAndDirectionToImageFilter as well as
       using the BinaryFunctorNeighBorhoodImageFilter, which is appropriate here */
   typedef Functor::NonMaxRemovalByDirectionFunctor<
-    typename itk::ConstNeighborhoodIterator<TInputModulus>, 
+    typename itk::ConstNeighborhoodIterator<TInputModulus>,
     typename itk::ConstNeighborhoodIterator<TInputDirection>,
     typename TOutputImage::PixelType>  FunctorType;
   typedef otb::BinaryFunctorNeighborhoodImageFilter<TInputModulus, TInputDirection,TOutputImage,FunctorType> ComputingFilterType;
-        
+
 protected:
   /** Constructor */
   NonMaxRemovalByDirectionFilter(){};
diff --git a/Code/FeatureExtraction/otbOrientationPathFunction.h b/Code/FeatureExtraction/otbOrientationPathFunction.h
index 784fb5afd7..0b7a7f7eef 100644
--- a/Code/FeatureExtraction/otbOrientationPathFunction.h
+++ b/Code/FeatureExtraction/otbOrientationPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,11 +28,11 @@ namespace otb
  * \class OrientationPathFunction
  * \brief Calculate the orientation angle of a path defined by 2 points.
  * The result value is in radian.
- * 
+ *
  * \ingroup PathFunctions
  */
 
-template < class TInputPath,    
+template < class TInputPath,
            class TOutput      = double>
 class ITK_EXPORT OrientationPathFunction :
   public PathFunction< TInputPath, TOutput >
@@ -43,7 +43,7 @@ public:
   typedef PathFunction<TInputPath, TOutput>             Superclass;
   typedef itk::SmartPointer<Self>                       Pointer;
   typedef itk::SmartPointer<const Self>                 ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(OrientationPathFunction, PathFunction);
 
@@ -59,8 +59,8 @@ public:
   typedef TOutput                                       OutputType;
 
   typedef double                                        RealType;
-   
-  			
+
+
   /** Evaluate the function at non-integer positions */
   virtual OutputType Evaluate( const PathType& path) const;
   virtual OutputType Evaluate( ) const;
diff --git a/Code/FeatureExtraction/otbOrientationPathFunction.txx b/Code/FeatureExtraction/otbOrientationPathFunction.txx
index 3a312e70d1..ea292ff9e5 100644
--- a/Code/FeatureExtraction/otbOrientationPathFunction.txx
+++ b/Code/FeatureExtraction/otbOrientationPathFunction.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,16 +43,16 @@ OrientationPathFunction<TInputPath,TOutput>
 ::Evaluate(const PathType& path) const
 {
   typedef double                      RealType;
-  
+
   VertexListPointer                   vertexList;
   VertexType                          cindex;
   VertexType                          IndexOut;
   int                                 nbPath;
   RealType  	     		      Theta;
-  
+
   vertexList = path.GetVertexList();
   nbPath = vertexList->Size();
-   
+
   if(nbPath ==2)
      {
        cindex = vertexList->GetElement(0);
@@ -61,12 +61,12 @@ OrientationPathFunction<TInputPath,TOutput>
        cindex = vertexList->GetElement(1);
        RealType x2 = cindex[0];
        RealType y2 = cindex[1];
-              
+
        Theta = vcl_atan2(y2-y1,x2-x1);
      } // IF loop
      else
      {
-        itkExceptionMacro(<<"OrientationPathFunction::Evaluate() FAILED -- path must have 2 points"); 
+        itkExceptionMacro(<<"OrientationPathFunction::Evaluate() FAILED -- path must have 2 points");
      }
   return (static_cast<OutputType>(Theta) );
 
@@ -85,7 +85,7 @@ OrientationPathFunction<TInputPath,TOutput>
     }
 
   OutputType Result =  Evaluate( *(this->GetInputPath()) );
-  
+
   return Result;
 }
 
diff --git a/Code/FeatureExtraction/otbParallelLinePathListFilter.h b/Code/FeatureExtraction/otbParallelLinePathListFilter.h
index 7ec50024fe..50c01fc882 100644
--- a/Code/FeatureExtraction/otbParallelLinePathListFilter.h
+++ b/Code/FeatureExtraction/otbParallelLinePathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,24 +26,24 @@ namespace otb
 /** \class ParallelLinePathListFilter
  *  \brief otbParallelLinePathListFilter detects parallel lines in imagery. The required input data are a pathlist object.
  *
- * The class consists of three basic functions that determine the angle between two lines, 
- * the distance between the lines and the common part of the lines. First, all input lines 
- * are checked if there is a second line running in the same direction. Thereafter, all line 
- * pairs that already fulfilled the angular criterion are checked whether they are close to 
- * each other or not, i.e. the orthogonal distance between them is calculated. Finally, it 
- * has to be verified if the two lines have a common part since lines may fulfil the two 
- * first criteria but be located in different parts of the image. In order to adapt the 
- * detection algorithm to the user’s needs, the thresholds AngularThreshold, DistanceThreshold 
+ * The class consists of three basic functions that determine the angle between two lines,
+ * the distance between the lines and the common part of the lines. First, all input lines
+ * are checked if there is a second line running in the same direction. Thereafter, all line
+ * pairs that already fulfilled the angular criterion are checked whether they are close to
+ * each other or not, i.e. the orthogonal distance between them is calculated. Finally, it
+ * has to be verified if the two lines have a common part since lines may fulfil the two
+ * first criteria but be located in different parts of the image. In order to adapt the
+ * detection algorithm to the user’s needs, the thresholds AngularThreshold, DistanceThreshold
  * and CommonDistanceThreshold can be set.
- * 
- * A possible processing chain would be to extract lines with a line detector, to convert the 
- * result to pathlist objects, to link short line segments with the otbLinkPathListFilter to 
- * longer lines and to finally detect all parallel long lines. 
  *
-   * \sa LinkPathListFilter 
- * 
+ * A possible processing chain would be to extract lines with a line detector, to convert the
+ * result to pathlist objects, to link short line segments with the otbLinkPathListFilter to
+ * longer lines and to finally detect all parallel long lines.
+ *
+   * \sa LinkPathListFilter
+ *
    * \ingroup PathFilters
- * 
+ *
  */
 template <class TPath>
 class ITK_EXPORT ParallelLinePathListFilter
@@ -55,13 +55,13 @@ class ITK_EXPORT ParallelLinePathListFilter
   typedef PathListToPathListFilter<TPath>       Superclass;
   typedef itk::SmartPointer<Self>               Pointer;
   typedef itk::SmartPointer<const Self>         ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ParallelLinePathListFilter, PathListToPathListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::PathType         PathType;
   typedef typename Superclass::PathListType     PathListType;
@@ -72,7 +72,7 @@ class ITK_EXPORT ParallelLinePathListFilter
   typedef typename PathType::VertexListType VertexListType;
   typedef typename VertexListType::ConstIterator VertexIteratorType;
   typedef double 								RealType;
-  
+
   itkSetMacro(AngularThreshold,RealType);
   itkGetMacro(AngularThreshold,RealType);
   itkSetMacro(DistanceThreshold,RealType);
@@ -93,11 +93,11 @@ protected:
 
   /**
  * Verify the angular condition to find parallel lines.
- * This function verifies if two lines are parallel by 
+ * This function verifies if two lines are parallel by
  * computing the angle in relation to the y-axis.
- * First line segment: v1 is the first vertex, v2 the second one 
+ * First line segment: v1 is the first vertex, v2 the second one
  * (not necessarily the path ending).
- * Second line segment: v3 is the first vertex, v4 the second one 
+ * Second line segment: v3 is the first vertex, v4 the second one
  * (not necessarily the path ending).
  * Return true if the condition is verified.
  *
@@ -108,14 +108,14 @@ protected:
   /**
  * Verify the maximum distance condition to find parallel lines.
  * The orthogonal distance between two parallel lines is calculated.
- * First line segment: v1 is the first vertex, v2 the second one 
+ * First line segment: v1 is the first vertex, v2 the second one
  * (not necessarily the path ending).
- * Second line segment: v3 is the first vertex, v4 the second one 
+ * Second line segment: v3 is the first vertex, v4 the second one
  * (not necessarily the path ending).
  * Return true if the condition is verified.
  *
  * This is the second criteria to be fullfilled.
- **/ 
+ **/
   bool VerifyMaxDistanceCondition(VertexType v1, VertexType v2, VertexType v3, VertexType v4);
 
  /**
@@ -123,9 +123,9 @@ protected:
  * The overlapping part of the parallel lines is computed. In case
  * no overlapping part exists or the value is below the specified
  * threshold, false is returned.
- * First line segment: v1 is the first vertex, v2 the second one 
+ * First line segment: v1 is the first vertex, v2 the second one
  * (not necessarily the path ending).
- * Second line segment: v3 is the first vertex, v4 the second one 
+ * Second line segment: v3 is the first vertex, v4 the second one
  * (not necessarily the path ending).
  * Return true if the condition is verified.
  *
@@ -146,7 +146,7 @@ private:
   RealType m_AngularThreshold;
   RealType m_DistanceThreshold;
   RealType m_CommonDistanceThreshold;
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/FeatureExtraction/otbParallelLinePathListFilter.txx b/Code/FeatureExtraction/otbParallelLinePathListFilter.txx
index 82bdcf8d09..0f88cd8160 100644
--- a/Code/FeatureExtraction/otbParallelLinePathListFilter.txx
+++ b/Code/FeatureExtraction/otbParallelLinePathListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -19,7 +19,7 @@ PURPOSE.  See the above copyright notices for more information.
 #define _otbParallelLinePathListFilter_txx
 
 #include "otbParallelLinePathListFilter.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -43,18 +43,18 @@ ParallelLinePathListFilter<TPath>
   // IO
   const PathListType *  inputPtr  = this->GetInput();
   PathListType *  outputPtr = this->GetOutput();
- 
+
   // Input iterator
   IteratorType inputIt = inputPtr->Begin();
-  
+
   std::vector<bool> eraseFlagVector1;
   std::vector<unsigned int> parallelLineIndex;
-  
+
   // First we copy all input path to output
   while( inputIt != inputPtr->End())
     {
-      // Write the next input path always to the 
-      // last element of the list. This last element is 
+      // Write the next input path always to the
+      // last element of the list. This last element is
       // newly created.
       outputPtr->PushBack(inputIt.Get());
 
@@ -65,42 +65,42 @@ ParallelLinePathListFilter<TPath>
 
       ++inputIt;
     }
-  
+
   int VectorSize = eraseFlagVector1.size();
   std::cout<<" Number of Lines: "<< VectorSize <<std::endl;
-  
+
   IteratorType outputIt1 = outputPtr->Begin();
   unsigned int index1 = 0;
   unsigned int firstLineCounter = 0, parallelLineCounter = 0;
   unsigned int commonDistCounter = 0, maxDistCounter = 0;
 
-// Iterate through all lines of the pathlist  
+// Iterate through all lines of the pathlist
 while(firstLineCounter < VectorSize)
     {
       if(!eraseFlagVector1[index1])
 		{
 		  IteratorType outputIt2 = outputIt1;
-		  ++outputIt2;		  
+		  ++outputIt2;
 		  unsigned int index2 = index1+1;
-          
-          // Check if any of the following lines are parallel 
+
+          // Check if any of the following lines are parallel
 		  while(outputIt2!=outputPtr->End())
 			{
-			 
+
 			 if(!eraseFlagVector1[index2])
 			  { // Read the first and the last vertex of each line pair that is checked
 			    VertexIteratorType vSourceIt = outputIt1.Get()->GetVertexList()->Begin();
-				VertexType v1 = vSourceIt.Value();  
+				VertexType v1 = vSourceIt.Value();
 				vSourceIt = outputIt1.Get()->GetVertexList()->End();
 				--vSourceIt;
-		        VertexType v2 = vSourceIt.Value();				     
-				 
+		        VertexType v2 = vSourceIt.Value();
+
 		        VertexIteratorType vTargetIt = outputIt2.Get()->GetVertexList()->Begin();
-		        VertexType v3 = vTargetIt.Value();		        
+		        VertexType v3 = vTargetIt.Value();
 	            vTargetIt = outputIt2.Get()->GetVertexList()->End();
 	            --vTargetIt;
 		        VertexType v4 = vTargetIt.Value();
-			 
+
 			    // Check for parallel lines
 				if(VerifyAngularCondition(v1,v2,v3,v4))
 			     {
@@ -111,40 +111,40 @@ while(firstLineCounter < VectorSize)
 						 if(VerifyCommonDistanceCondition(v1,v2,v3,v4))
 						  {
 						     ++commonDistCounter;
-							 // Write index of first parallel path						 
+							 // Write index of first parallel path
 							 parallelLineIndex.push_back(index1);
 
 							 // Write index of second parallel path
-							 parallelLineIndex.push_back(index2);						
-						  }						
-					  }	
+							 parallelLineIndex.push_back(index2);
+						  }
+					  }
 			     }
 			  }
-			  
+
 			 ++index2;
 			 ++outputIt2;
-			}		  
+			}
 		}
-		
-	  // mark the old path as erased 
-	  eraseFlagVector1[index1]=true;  
+
+	  // mark the old path as erased
+	  eraseFlagVector1[index1]=true;
 	  ++firstLineCounter;
       ++index1;
-      ++outputIt1;    
+      ++outputIt1;
     }// end of for loop
-  
+
   std::cout<< "Number of line pairs that pass the angular condition:          " << parallelLineCounter <<std::endl;
   std::cout<< "Number of line pairs that pass the maximum distance condition: " << maxDistCounter <<std::endl;
   std::cout<< "Number of line pairs that pass the common distance condition:  " << commonDistCounter <<std::endl;
-  
+
   // Write all parallel lines and set the non-erase flagg.
   typename std::vector<unsigned int>::iterator lineIt1 = parallelLineIndex.begin();
   unsigned int sortLineIndex = 0;
   while(lineIt1!=parallelLineIndex.end())
-    {  
+    {
       IteratorType outputIt3 = outputPtr->Begin() + parallelLineIndex[sortLineIndex];
 
-	  PathPointerType newPath1 = this->WriteParallelPath(outputIt3.Get());	  
+	  PathPointerType newPath1 = this->WriteParallelPath(outputIt3.Get());
 	  outputPtr->PushBack(newPath1);
 	  // add a non-erase flag for the new path
 	  eraseFlagVector1.push_back(false);
@@ -152,8 +152,8 @@ while(firstLineCounter < VectorSize)
 	  std::cout<<"Number of lines written in the path list: "<< sortLineIndex<<std::endl;
       ++lineIt1;
     }
-     
-			
+
+
   // Search ended, now removing the erased path from the first line pointer
   typename std::vector<bool>::reverse_iterator it1 = eraseFlagVector1.rbegin();
   index1 = eraseFlagVector1.size()-1;
@@ -161,19 +161,19 @@ while(firstLineCounter < VectorSize)
     {
       if(eraseFlagVector1[index1])
 		{ outputPtr->Erase(index1); }
-		
+
       --index1;
       ++it1;
     }
-  
+
 }
 /**
  * Verify the angular condition to find parallel lines.
- * This function verifies if two lines are parallel by 
+ * This function verifies if two lines are parallel by
  * computing the angle in relation to the y-axis.
- * First line segment: v1 is the first vertex, v2 the second one 
+ * First line segment: v1 is the first vertex, v2 the second one
  * (not necessarily the path ending).
- * Second line segment: v3 is the first vertex, v4 the second one 
+ * Second line segment: v3 is the first vertex, v4 the second one
  * (not necessarily the path ending).
  * Return true if the condition is verified.
  *
@@ -189,9 +189,9 @@ ParallelLinePathListFilter<TPath>
 
   alpha1 = (alpha1 >= 0)?alpha1:(alpha1+M_PI);
   alpha2 = (alpha2 >= 0)?alpha2:(alpha2+M_PI);
-   
+
   // Return true if the angle between the two lines is smaller than
-  // the specified threshold.  
+  // the specified threshold.
   bool angle = (vcl_abs(alpha1-alpha2) < static_cast<double>(m_AngularThreshold));
 
   return angle;
@@ -200,9 +200,9 @@ ParallelLinePathListFilter<TPath>
 /**
  * Verify the maximum distance condition to find parallel lines.
  * The orthogonal distance between two parallel lines is calculated.
- * First line segment: v1 is the first vertex, v2 the second one 
+ * First line segment: v1 is the first vertex, v2 the second one
  * (not necessarily the path ending).
- * Second line segment: v3 is the first vertex, v4 the second one 
+ * Second line segment: v3 is the first vertex, v4 the second one
  * (not necessarily the path ending).
  * Return true if the condition is verified.
  *
@@ -215,10 +215,10 @@ ParallelLinePathListFilter<TPath>
 {
   // Compute the direction vector of the first line
   VertexType vectorDir12;
-  
+
   vectorDir12[0] = v2[0]-v1[0];
   vectorDir12[1] = v2[1]-v1[1];
-	
+
   // Compute the orthogonal distance between the two parallel lines
   // with equation d = |(v3 - v1)X(v2 - v1)|/|v2 - v1|
   double distance = 0., denominator =0., nominator = 0.;
@@ -226,11 +226,11 @@ ParallelLinePathListFilter<TPath>
   nominator = sqrt(pow(vectorDir12[0],2) + pow(vectorDir12[1],2));
   distance = denominator/nominator;
   //std::cout<< "Distance between two parallel lines: " << distance <<std::endl;
-  
-  // Check if the orthogonal distance between the lines 
+
+  // Check if the orthogonal distance between the lines
   // is beneath the chosen threshold.
   bool dist = (distance <= static_cast<double>(m_DistanceThreshold));
- 
+
   return dist;
 }
 
@@ -239,9 +239,9 @@ ParallelLinePathListFilter<TPath>
  * The overlapping part of the parallel lines is computed. In case
  * no overlapping part exists or the value is below the specified
  * threshold, false is returned.
- * First line segment: v1 is the first vertex, v2 the second one 
+ * First line segment: v1 is the first vertex, v2 the second one
  * (not necessarily the path ending).
- * Second line segment: v3 is the first vertex, v4 the second one 
+ * Second line segment: v3 is the first vertex, v4 the second one
  * (not necessarily the path ending).
  * Return true if the condition is verified.
  *
@@ -253,65 +253,65 @@ ParallelLinePathListFilter<TPath>
 ::VerifyCommonDistanceCondition(VertexType v1, VertexType v2, VertexType v3, VertexType v4)
 {
  // Compute the length of each line
-  double length12 = 0., length34 = 0.; 
+  double length12 = 0., length34 = 0.;
   length12 = sqrt( pow((v2[0]-v1[0]),2) + pow((v2[1]-v1[1]),2) );
   length34 = sqrt( pow((v4[0]-v3[0]),2) + pow((v4[1]-v3[1]),2) );
-  
+
   // Set v1[0] to zero and align the y-axis of
   // the new coordinate system with line one (v1 and v2).
   // Compute the coordinates of the first and of the
   // second line in the new coordinate system.
   VertexType tempv1, tempv2, tempv3, tempv4;
-  
+
   if (v1[1] == v2[1])
   {
 	if (v1[0] < v2[0])
 	{
 	  tempv1[0] = 0., tempv1[1] = 0.;
 	  tempv2[0] = 0., tempv2[1] = length12;
-	  tempv3[0] = v3[0]-v1[0], tempv3[1] = v3[1]-v1[1]; 
-	  tempv4[0] = v4[0]-v1[0], tempv4[1] = v4[1]-v1[1]; 			
+	  tempv3[0] = v3[0]-v1[0], tempv3[1] = v3[1]-v1[1];
+	  tempv4[0] = v4[0]-v1[0], tempv4[1] = v4[1]-v1[1];
 	}
-	else 
+	else
 	{
 	  tempv2[0] = 0., tempv2[1] = 0.;
 	  tempv1[0] = 0., tempv1[1] = length12;
-	  tempv3[0] = v3[0]-v2[0], tempv3[1] = v3[1]-v2[1]; 
-	  tempv4[0] = v4[0]-v2[0], tempv4[1] = v4[1]-v2[1]; 
+	  tempv3[0] = v3[0]-v2[0], tempv3[1] = v3[1]-v2[1];
+	  tempv4[0] = v4[0]-v2[0], tempv4[1] = v4[1]-v2[1];
 	}
   }
   // Check the direction of the line (vector).
-  // The origin of the new coordinate system is 
+  // The origin of the new coordinate system is
   // set to the smaller of the two vertices.
-  // Then, a rotation and translation of the vertices 
+  // Then, a rotation and translation of the vertices
   // of the second line (v3 and v4) to the new coordinate
-  // system is performed. 
-  
+  // system is performed.
+
   VertexType temptransv3, temptransv4;
-  
+
   if (v1[1] < v2[1])
   {
 	 if (v1[0] == v2[0])
-	  {				
+	  {
 		tempv1[0] = 0., tempv1[1] = 0.;
 		tempv2[0] = 0., tempv2[1] = length12;
-		tempv3[0] = v3[0]-v1[0], tempv3[1] = v3[1]-v1[1]; 
-		tempv4[0] = v4[0]-v1[0], tempv4[1] = v4[1]-v1[1]; 			  	
+		tempv3[0] = v3[0]-v1[0], tempv3[1] = v3[1]-v1[1];
+		tempv4[0] = v4[0]-v1[0], tempv4[1] = v4[1]-v1[1];
 	  }
-  
+
     else
       {
-		// Coordinates of the first line in the new coordinate system 
+		// Coordinates of the first line in the new coordinate system
         tempv1[0] = 0.;
         tempv1[1] = 0.;
         tempv2[0] = 0.;
         tempv2[1] = length12;
-    
+
      	// Rotate the system clockwise
 	    double sinealpha;
 		if (v2[0] > v1[0])
 		{ sinealpha = (v2[0]-v1[0])/length12; }
-		else 
+		else
 		{ sinealpha = (v1[0]-v2[0])/length12; }
         double alpha1 = vcl_asin(sinealpha);
 
@@ -336,31 +336,31 @@ ParallelLinePathListFilter<TPath>
 		std::cout<< "Original length of line 1:       " << length12 <<std::endl;
       }
   }
-  
+
   if (v2[1] < v1[1])
   {
-  
+
 	 if (v1[0] == v2[0])
-	  {	
+	  {
 	    tempv2[0] = 0., tempv2[1] = 0.;
 		tempv1[0] = 0., tempv1[1] = length12;
-		tempv3[0] = v3[0]-v2[0], tempv3[1] = v3[1]-v2[1]; 
-		tempv4[0] = v4[0]-v2[0], tempv4[1] = v4[1]-v2[1]; 
+		tempv3[0] = v3[0]-v2[0], tempv3[1] = v3[1]-v2[1];
+		tempv4[0] = v4[0]-v2[0], tempv4[1] = v4[1]-v2[1];
 	  }
-	  else 
+	  else
 	  {
 		tempv1[0] = 0.;
 		tempv1[1] = 0.;
 		tempv2[0] = 0.;
 		tempv2[1] = length12;
-	
+
 		// Rotate the system clockwise
 		double sinealpha;
 		if (v2[0] > v1[0])
 		{ sinealpha = (v2[0]-v1[0])/length12; }
-		else 
+		else
 		{ sinealpha = (v1[0]-v2[0])/length12; }
-	
+
 		double alpha1 = vcl_asin(sinealpha);
 
 		// Translation
@@ -368,7 +368,7 @@ ParallelLinePathListFilter<TPath>
         temptransv3[1] = v3[1] - v2[1];
         temptransv4[0] = v4[0] - v2[0];
         temptransv4[1] = v4[1] - v2[1];
-    
+
         // Rotation
 	    tempv3[0] = temptransv3[0]*cos(alpha1)+temptransv3[1]*sin(alpha1);
         tempv3[1] = temptransv3[1]*cos(alpha1)-temptransv3[0]*sin(alpha1);
@@ -384,21 +384,21 @@ ParallelLinePathListFilter<TPath>
 	    std::cout<< "Original length of line 1:       " << length12 <<std::endl;
       }
   }
-  
+
   // Compute the length of the overlapping part
-  // of the two lines. This is done by simply 
+  // of the two lines. This is done by simply
   // comparing the y-values of the lines (remember
   // that both lines are parallel and also parallel
   // to the new y-axis).
   double commonDist = 0.;
-  
+
   if (tempv3[1] >= tempv4[1])
   {
 	if (tempv3[1] >=0 && tempv3[1] <= tempv2[1])
 	{
 		if (tempv4[1] >=0)
 		{commonDist = vcl_abs(tempv4[1]-tempv3[1]);}
-	
+
 		else if (tempv4[1] < 0)
 		{commonDist = tempv3[1];}
 	}
@@ -406,10 +406,10 @@ ParallelLinePathListFilter<TPath>
 	{
 		if (tempv4[1] >=0)
 		{commonDist = tempv2[1]-tempv4[1];}
-	
+
 		else if (tempv4[1] < 0)
-		{commonDist = tempv2[1];}	
-		
+		{commonDist = tempv2[1];}
+
 	}
 	else if (tempv4[1] >= tempv2[1])
 	{	// No overlapping parts exist. The (negative) distance
@@ -422,14 +422,14 @@ ParallelLinePathListFilter<TPath>
 		commonDist = tempv3[1];
 	}
   }
-  
+
   else
   {
 	 if (tempv4[1] >=0 && tempv4[1] <= tempv2[1])
 	 {
 		if (tempv3[1] >=0)
 		{commonDist = vcl_abs(tempv3[1]-tempv4[1]);}
-	
+
 		else if (tempv3[1] < 0)
 		{commonDist = tempv4[1];}
 	 }
@@ -437,10 +437,10 @@ ParallelLinePathListFilter<TPath>
 	 {
 		if (tempv3[1] >=0)
 		{commonDist = tempv2[1]-tempv3[1];}
-	
+
 		else if (tempv3[1] < 0)
-		{commonDist = tempv2[1];}	
-		
+		{commonDist = tempv2[1];}
+
 	 }
 	 else if (tempv3[1] >= tempv2[1])
 	 {	// No overlapping parts exist. The (negative) distance
@@ -453,11 +453,11 @@ ParallelLinePathListFilter<TPath>
 	 	commonDist = tempv4[1];
 	 }
   }
-  // The common parallel parts of the two lines have to be greater than 
-  // the provided threshold. 
+  // The common parallel parts of the two lines have to be greater than
+  // the provided threshold.
   std::cout<< "Calculated common distance of the parallel lines: " << commonDist <<std::endl;
   bool common = (commonDist >= static_cast<double>(m_CommonDistanceThreshold));
-  
+
   return common;
 }
 
@@ -467,17 +467,17 @@ ParallelLinePathListFilter<TPath>
  */
 template <class TPath>
 typename ParallelLinePathListFilter<TPath>
-::PathPointerType 
+::PathPointerType
 ParallelLinePathListFilter<TPath>
 ::WriteParallelPath(PathPointerType p1)
 {
    PathPointerType resp = PathType::New();
-  
+
   VertexIteratorType it;
- 
+
   for(it=p1->GetVertexList()->Begin();it!=p1->GetVertexList()->End();++it)
 	{ resp->AddVertex((it).Value()); }
- 
+
   return resp;
 }
 
diff --git a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.h b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.h
index cd9f246566..ff0f00c855 100644
--- a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.h
+++ b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@
 #define TRANSITION_MATRIX(_x,_y,_theta,_xout,_yout) \
     (_xout) = (_x)*vcl_cos(_theta) + (_y)*vcl_sin(_theta); \
     (_yout) = - (_x)*vcl_sin(_theta) + (_y)*vcl_cos(_theta)
-    
+
 
 namespace otb
 {
@@ -42,7 +42,7 @@ namespace otb
  *
  * This filter is the first step to generate an image of segments
  * primitives. It starts from the two output images of the line detector
- * image filters which are the image of intensity of detection and 
+ * image filters which are the image of intensity of detection and
  * the image of direction.
  *
  */
@@ -55,7 +55,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -74,13 +74,13 @@ public:
 
   /** Return the nale of the class. */
   itkTypeMacro(PixelSuppressionByDirectionImageFilter, ImageToImageFilter);
-  
+
   /** Definition of the input and output images */
   typedef typename InputImageType::PixelType InputPixelType;
   typedef typename OutputImageType::PixelType OutputPixelType;
 
   typedef typename itk::NumericTraits<InputPixelType>::RealType InputRealType;
-  
+
   typedef typename InputImageType::RegionType InputImageRegionType;
   typedef typename OutputImageType::RegionType OutputImageRegionType;
 
@@ -90,20 +90,20 @@ public:
   itkSetMacro(Radius, SizeType);
   /** Get the radius of one zone. */
   itkGetConstReferenceMacro(Radius, SizeType);
-  
+
   /** Set the angular beam. */
   itkSetMacro(AngularBeam, InputRealType);
   /** Get the angular beam. */
   itkGetConstReferenceMacro(AngularBeam, InputRealType);
-  
+
   /** Set/Get the image input of this process object.  */
   void SetInputImage( const InputImageType *image);
-  const InputImageType * GetInputImage(void);  
-  
+  const InputImageType * GetInputImage(void);
+
   void SetInputImageDirection( const InputImageType *image);
   const InputImageType * GetInputImageDirection(void);
 
-  
+
   virtual void GenerateInputRequestedRegion() throw(itk::InvalidRequestedRegionError);
 
 protected:
@@ -130,5 +130,5 @@ private:
 #include "otbPixelSuppressionByDirectionImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx
index 7d4eefef01..0ccb750e36 100644
--- a/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx
+++ b/Code/FeatureExtraction/otbPixelSuppressionByDirectionImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@
 #include "itkConstantBoundaryCondition.h"
 #include "itkOffset.h"
 #include "itkProgressReporter.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -40,30 +40,30 @@ namespace otb
 template <class TInputImage, class TOutputImage>
 PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::PixelSuppressionByDirectionImageFilter()
 {
-	
+
   m_Radius.Fill(1);
   m_AngularBeam = static_cast<double>(0.);
 
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>
 ::SetInputImage(const InputImageType *input)
 {
-  this->SetInput(0,input);	
+  this->SetInput(0,input);
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>
 ::SetInputImageDirection(const InputImageType *input)
 {
-  this->SetInput(1,input);	
+  this->SetInput(1,input);
 }
 
 template <class TInputImage, class TOutputImage>
-const 
+const
 typename PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::InputImageType *
 PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>
 ::GetInputImage(void)
@@ -78,7 +78,7 @@ PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-const 
+const
 typename PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::InputImageType *
 PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>
 ::GetInputImageDirection(void)
@@ -97,11 +97,11 @@ void PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::Generate
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
   typename Superclass::InputImagePointer inputPtr   =  const_cast< TInputImage * >( this->GetInputImageDirection() );
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -128,7 +128,7 @@ void PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::Generate
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     itk::OStringStream msg;
@@ -143,7 +143,7 @@ void PixelSuppressionByDirectionImageFilter<TInputImage, TOutputImage>::Generate
 
 
 template< class TInputImage, class TOutputImage>
-void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(	
+void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::ThreadedGenerateData(
 			const 	OutputImageRegionType& 		outputRegionForThread,
                        	int 	threadId
 				)
@@ -152,17 +152,17 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade
   itk::ConstantBoundaryCondition<InputImageType> 		cbc;
   const InputPixelType cvalue = 255;
   cbc.SetConstant(cvalue);
-   
-  itk::ConstNeighborhoodIterator<InputImageType> 		bit; 
+
+  itk::ConstNeighborhoodIterator<InputImageType> 		bit;
   itk::ImageRegionConstIterator<InputImageType> 		itin;
   itk::ImageRegionIterator<OutputImageType> 			itout;
-  
-  
+
+
   // Allocate output
   typename OutputImageType::Pointer     output = this->GetOutput();
   typename InputImageType::ConstPointer input  = this->GetInputImage();
   typename InputImageType::ConstPointer inputDirection  = this->GetInputImageDirection();
-  
+
   // Find the data-set boundary "faces"
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType 		faceList;
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType::iterator 	fit;
@@ -174,55 +174,55 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   //typename TInputImage::IndexType     bitIndex;
-  
+
   //---------------------------------------------------------------------------
 
   InputPixelType PixelValue;
-    
+
   // Location of the central pixel in the input image
 //  int Xc, Yc;
 
-  // Pixel location in the system axis of the region  
+  // Pixel location in the system axis of the region
   int x, y;
-  
+
   // Pixel location in the system axis of the region after rotation of theta
-  // where theta is the direction of the cantral pixel  
-  
+  // where theta is the direction of the cantral pixel
 
-  // Pixel Direction  
+
+  // Pixel Direction
   double ThetaXcYc, Thetaxtyt ;
-  
+
 
   //---------------------------------------------------------------------------
-  
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
     {
     bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius, inputDirection, *fit);
-      
-    itin = itk::ImageRegionConstIterator<InputImageType>(input, *fit);  
+
+    itin = itk::ImageRegionConstIterator<InputImageType>(input, *fit);
     itout = itk::ImageRegionIterator<OutputImageType>(output, *fit);
-    
+
     bit.OverrideBoundaryCondition(&cbc);
     bit.GoToBegin();
- 
- 
+
+
     while ( ! bit.IsAtEnd() )
       {
-      	
+
       /*// Location of the central pixel of the region in the input image
       bitIndex = bit.GetIndex();
-      
+
       Xc = bitIndex[0];
       Yc = bitIndex[1];
     */
       // Get Pixel Direction from the image of directions
       ThetaXcYc = static_cast<double>( bit.GetCenterPixel() );
 
-      // Pixel intensity in the input image      
+      // Pixel intensity in the input image
       PixelValue = itin.Get();
 
       bool IsLine = false;
@@ -235,13 +235,13 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade
 
 	off[0]=i-m_Radius[0];
 	off[1]=j-m_Radius[1];
-	
+
         x = off[0];
         y = off[1];
 
-        
-        // No calculation on the central pixel  
-        if (( x == 0 ) && ( y == 0 )) 
+
+        // No calculation on the central pixel
+        if (( x == 0 ) && ( y == 0 ))
            continue;
 
 	Thetaxtyt = vcl_atan2( static_cast<double>(y), static_cast<double>(x) ); //result is [-PI,PI]
@@ -269,13 +269,13 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade
 	  IsLine = true;
 	  continue;
 	  }
-		
-	
+
+
 	}
-      
-      // end of the loop on the pixels of the region 
-      
-      
+
+      // end of the loop on the pixels of the region
+
+
       // Assignment of this value to the output pixel
       if (IsLine == true)
 	{
@@ -285,15 +285,15 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade
 	{
 	itout.Set( static_cast<OutputPixelType>(0.) );
 	}
-                 
-      
+
+
       ++bit;
       ++itin;
       ++itout;
-      progress.CompletedPixel();  
-      
+      progress.CompletedPixel();
+
       }
-      
+
     }
 }
 
@@ -301,7 +301,7 @@ void PixelSuppressionByDirectionImageFilter< TInputImage, TOutputImage>::Threade
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutput>
-void 
+void
 PixelSuppressionByDirectionImageFilter<TInputImage, TOutput>::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf( os, indent );
diff --git a/Code/FeatureExtraction/otbRealMomentImageFunction.h b/Code/FeatureExtraction/otbRealMomentImageFunction.h
index c66c67ddfd..e1e6b5b99a 100644
--- a/Code/FeatureExtraction/otbRealMomentImageFunction.h
+++ b/Code/FeatureExtraction/otbRealMomentImageFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
  * \ingroup ImageFunctions
  */
 
-template < class TInput, 
+template < class TInput,
            class TOutput = float,
            class TPrecision = double,
 	   class TCoordRep = float >
@@ -44,7 +44,7 @@ public:
   typedef GeometricMomentImageFunction< TInput, TOutput, TPrecision, TCoordRep >   Superclass;
   typedef itk::SmartPointer<Self>                                     Pointer;
   typedef itk::SmartPointer<const Self>                               ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(RealMomentImageFunction, GeometricMomentImageFunction);
 
@@ -54,7 +54,7 @@ public:
   typedef typename Superclass::IndexType            IndexType;
   typedef typename Superclass::ContinuousIndexType  ContinuousIndexType;
   typedef typename Superclass::PointType            PointType;
- 
+
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType        PrecisionType;
 
@@ -62,16 +62,16 @@ public:
   typedef OutputType                                RealType;
 
 
-  
+
 
 protected:
   RealMomentImageFunction() {};
   ~RealMomentImageFunction(){};
-  void PrintSelf(std::ostream& os, itk::Indent indent) const 
+  void PrintSelf(std::ostream& os, itk::Indent indent) const
      {
       Superclass::PrintSelf( os, indent );
      }
-     
+
 private:
   RealMomentImageFunction( const Self& ); //purposely not implemented
   void operator=( const Self& );               //purposely not implemented
diff --git a/Code/FeatureExtraction/otbRealMomentPathFunction.h b/Code/FeatureExtraction/otbRealMomentPathFunction.h
index 3fc3ef854a..98554f3623 100644
--- a/Code/FeatureExtraction/otbRealMomentPathFunction.h
+++ b/Code/FeatureExtraction/otbRealMomentPathFunction.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ namespace otb
  * \ingroup PathFunctions
  */
 
-template < class TInputPath,    
+template < class TInputPath,
            class TOutput      = double,
        	   class TPrecision   = double>
 class ITK_EXPORT RealMomentPathFunction :
@@ -44,20 +44,20 @@ public:
   typedef GeometricMomentPathFunction< TInputPath, TOutput, TPrecision> Superclass;
   typedef itk::SmartPointer<Self>                                     Pointer;
   typedef itk::SmartPointer<const Self>                               ConstPointer;
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(RealMomentPathFunction, GeometricMomentPathFunction);
 
   /** InputPathType typedef support. */
   typedef typename Superclass::PathType                 PathType;
-  typedef typename Superclass::PathConstPointer         PathConstPointer;  
+  typedef typename Superclass::PathConstPointer         PathConstPointer;
   typedef typename PathType::ContinuousIndexType        VertexType;
   typedef itk::VectorContainer< unsigned,VertexType >   VertexListType;
   typedef typename VertexListType::ConstPointer         VertexListPointer;
- 
+
   /** Type for calculation precision */
   typedef typename Superclass::PrecisionType            PrecisionType;
-   
+
   /** OutputType typedef support. */
   typedef typename Superclass::OutputType               RealType;
 
@@ -68,11 +68,11 @@ public:
 protected:
   RealMomentPathFunction() {m_Step = 1.0;}
   ~RealMomentPathFunction(){};
-  void PrintSelf(std::ostream& os, itk::Indent indent) const 
+  void PrintSelf(std::ostream& os, itk::Indent indent) const
      {
       Superclass::PrintSelf( os, indent );
      }
-     
+
 private:
   RealMomentPathFunction( const Self& ); //purposely not implemented
   void operator=( const Self& );               //purposely not implemented
diff --git a/Code/FeatureExtraction/otbRemoveCarvingPathFilter.h b/Code/FeatureExtraction/otbRemoveCarvingPathFilter.h
index f065eae5cc..53cacc1ba2 100644
--- a/Code/FeatureExtraction/otbRemoveCarvingPathFilter.h
+++ b/Code/FeatureExtraction/otbRemoveCarvingPathFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,32 +26,32 @@ namespace otb
 {
 /** \class RemoveCarvingPathFilter
  * \brief This class remove pixels given in one path
- * 
- * 
- * 
- * This filter remove pixels found by the otb::ImageToCarvingPathFilter 
+ *
+ *
+ *
+ * This filter remove pixels found by the otb::ImageToCarvingPathFilter
  * thus decreasing the image size.
-  * the image (if Direction is set to 0) or from left to right 
+  * the image (if Direction is set to 0) or from left to right
   * (if direction is set to 1).
-  * 
+  *
   * This is one component necessary to apply the seam carving algorithm
   * published by Shai Avidan, Ariel Shamir,
   * Seam Carving for Content-Aware Image Resizing,
-  * ACM Transactions on Graphics, Volume 26, Number 3,  
+  * ACM Transactions on Graphics, Volume 26, Number 3,
   * SIGGRAPH 2007
-  * 
+  *
   * \par INPUTS
-   * The first input is an image, usually, the same one provided to the 
+   * The first input is an image, usually, the same one provided to the
  * otb::ImageToCarvingPathFilter
-   * The second input is a path, typically the output of otb::ImageToCarvingPathFilter. 
-  * 
+   * The second input is a path, typically the output of otb::ImageToCarvingPathFilter.
+  *
   * \par OUTPUTS
   * The output is an image with a smaller size than the input image. There is one less
  * column if direction is 0 and one less line if direction is 1.
-  * 
+  *
   * \sa ImageToCarvingPathFilter
-  * 
-  * 
+  *
+  *
   * \ingroup PathFilters
   * \ingroup ImageFilters
   */
@@ -69,7 +69,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(RemoveCarvingPathFilter, itk::ImageAndPathToImageFilter);
 
@@ -77,8 +77,8 @@ public:
   typedef          TInputImage                    InputImageType;
   typedef typename InputImageType::Pointer        InputImagePointer;
   typedef typename InputImageType::ConstPointer   InputImageConstPointer;
-  typedef typename InputImageType::RegionType     InputImageRegionType; 
-  typedef typename InputImageType::PixelType      InputImagePixelType; 
+  typedef typename InputImageType::RegionType     InputImageRegionType;
+  typedef typename InputImageType::PixelType      InputImagePixelType;
   typedef          TInputPath                     InputPathType;
   typedef typename InputPathType::Pointer         InputPathPointer;
   typedef typename InputPathType::ConstPointer    InputPathConstPointer;
@@ -89,39 +89,39 @@ public:
   typedef          TOutputImage                   OutputImageType;
   typedef typename OutputImageType::Pointer       OutputImagePointer;
   typedef typename OutputImageType::ConstPointer  OutputImageConstPointer;
-  
-  typedef typename OutputImageType::RegionType    OutputImageRegionType; 
-  typedef typename OutputImageType::PixelType     OutputImagePixelType; 
-  typedef typename OutputImageType::ValueType     OutputImageValueType; 
-  
+
+  typedef typename OutputImageType::RegionType    OutputImageRegionType;
+  typedef typename OutputImageType::PixelType     OutputImagePixelType;
+  typedef typename OutputImageType::ValueType     OutputImageValueType;
+
 //   typedef typename itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
 //   typedef typename itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
   typedef typename itk::ImageSliceConstIteratorWithIndex<InputImageType> InputIteratorType;
   typedef typename itk::ImageSliceIteratorWithIndex<OutputImageType> OutputIteratorType;
-  
+
   /** Set/Get the path input of this process object.
       Note: these methods are adding to get the proper name */
   void SetInputPath( const TInputPath * path);
-  
+
   const TInputPath * GetInputPath(void);
 
 
   itkSetMacro(Value, OutputImagePixelType);
   itkGetConstReferenceMacro(Value, OutputImagePixelType);
-  
+
   /** Set and Get direction value */
   itkSetMacro(Direction ,unsigned int);
   itkGetConstMacro(Direction ,unsigned int);
-  
+
   virtual void GenerateOutputInformation();
-  
+
 protected:
   RemoveCarvingPathFilter();
   virtual ~RemoveCarvingPathFilter() {};
 
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
   virtual void GenerateData();
- 
+
 private:
   RemoveCarvingPathFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -137,4 +137,4 @@ private:
 #endif
 
 #endif
- 
+
diff --git a/Code/FeatureExtraction/otbRemoveCarvingPathFilter.txx b/Code/FeatureExtraction/otbRemoveCarvingPathFilter.txx
index c127b0a041..6635eff277 100644
--- a/Code/FeatureExtraction/otbRemoveCarvingPathFilter.txx
+++ b/Code/FeatureExtraction/otbRemoveCarvingPathFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -58,24 +58,24 @@ template <class TInputImage, class TInputPath,class TOutputImage>
 void
 RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
 ::GenerateData(void)
-{  
-  
+{
+
   const InputImageType * inputImage = this->GetImageInput();
   const InputPathType * inputPath = this->GetPathInput();
   OutputImageType * outputImage = this->GetOutput();
-  
+
   outputImage->SetBufferedRegion( outputImage->GetRequestedRegion() );
   outputImage->Allocate();
-  
-  
-  InputIteratorType inputIterator(inputImage, 
+
+
+  InputIteratorType inputIterator(inputImage,
                                   inputImage->GetLargestPossibleRegion());
-  OutputIteratorType outputIterator(outputImage, 
+  OutputIteratorType outputIterator(outputImage,
                                   outputImage->GetLargestPossibleRegion());
-  
+
   unsigned int dir0;
   unsigned int dir1;
-  
+
   if (m_Direction == 0)
   {
     dir0=0;
@@ -86,20 +86,20 @@ RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
     dir0=1;
     dir1=0;
   }
-  
+
   inputIterator.SetFirstDirection( dir0 );
   inputIterator.SetSecondDirection( dir1 );
   inputIterator.GoToBegin();
   outputIterator.SetFirstDirection( dir0 );
   outputIterator.SetSecondDirection( dir1 );
   outputIterator.GoToBegin();
-  
+
   int line=-1;
   typename InputImageType::IndexType index;
   typename InputPathType::VertexListType::ConstPointer vertexList = inputPath->GetVertexList();
   typename InputPathType::VertexListType::ConstIterator pathIterator;
   typename InputImageType::IndexType indexToRemove;
-  
+
   //go to the end of the path
   pathIterator = vertexList->Begin();
   while(pathIterator != vertexList->End())
@@ -107,7 +107,7 @@ RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
     ++pathIterator;
   }
   --pathIterator;
-  
+
   while (!inputIterator.IsAtEnd())
   {
     while (!inputIterator.IsAtEndOfSlice())
@@ -115,7 +115,7 @@ RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
       while(!inputIterator.IsAtEndOfLine())
       {
         index = inputIterator.GetIndex();
-        
+
         if(index[dir1] != line)
         {
           line = index[dir1];
@@ -131,7 +131,7 @@ RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
           {
             itkExceptionMacro(<< "Error!!!");
           }
-        } 
+        }
         if (index[dir0] != indexToRemove[dir0])
         {
           outputIterator.Set(inputIterator.Get());
@@ -145,8 +145,8 @@ RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
     inputIterator.NextSlice();
     outputIterator.NextSlice();
   }
-  
-  
+
+
 }
 
 
@@ -163,7 +163,7 @@ RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
 }
 
 template <class TInputImage, class TInputPath,class TOutputImage>
-    void 
+    void
         RemoveCarvingPathFilter<TInputImage,TInputPath,TOutputImage>
   ::GenerateOutputInformation()
 {
@@ -173,10 +173,10 @@ template <class TInputImage, class TInputPath,class TOutputImage>
   // get pointers to the input and output
   typename Superclass::InputImageConstPointer inputPtr = this->GetInput();
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   unsigned int dir0;
   unsigned int dir1;
-  
+
   if (m_Direction == 0)
   {
     dir0=0;
@@ -187,7 +187,7 @@ template <class TInputImage, class TInputPath,class TOutputImage>
     dir0=1;
     dir1=0;
   }
-  
+
   // we need to compute the output spacing, the output image size, and the
   // output image start index
   const typename TInputImage::SpacingType&
@@ -200,7 +200,7 @@ template <class TInputImage, class TInputPath,class TOutputImage>
   typename TOutputImage::SpacingType      outputSpacing;
   typename TOutputImage::SizeType         outputSize;
   typename TOutputImage::IndexType        outputStartIndex;
-  
+
   for (unsigned int i = 0; i < TOutputImage::ImageDimension; i++)
   {
     outputSpacing[i] = inputSpacing[i];
@@ -209,7 +209,7 @@ template <class TInputImage, class TInputPath,class TOutputImage>
   }
   // we remove one column of the image
   outputSize[dir0] = inputSize[dir0] - 1;
-  
+
 
   outputPtr->SetSpacing( outputSpacing );
 
@@ -225,4 +225,4 @@ template <class TInputImage, class TInputPath,class TOutputImage>
 } // end namespace otb
 
 #endif
- 
+
diff --git a/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.h b/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.h
index c87c13683c..35ef63ed4d 100644
--- a/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.h
+++ b/Code/FeatureExtraction/otbRemoveIsolatedByDirectionFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -66,7 +66,7 @@ namespace Functor
  *  For a given pixel, the filter walk through its neighborhood in direction image, counting pixels having
  *  the same direction as the center pixel. If there is no such a pixel, the center pixel is considered to be
  *  isolated in direction, and thus will be removed (set to 0). If the pixel is not isolated in direction, the output
- *  value is the value of the pixel in the modulus image. 
+ *  value is the value of the pixel in the modulus image.
  *  Of course this filter requires the direction to be discrete, in order to be able to count the directions.
  *
  * \ingroup Streamed
@@ -82,21 +82,21 @@ class ITK_EXPORT RemoveIsolatedByDirectionFilter
   typedef ModulusAndDirectionImageToImageFilter<TInputModulus, TInputDirection, TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>                                                             Pointer;
   typedef itk::SmartPointer<const Self>                                                       ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(RemoveIsolatedByDirectionFilter,ModulusAndDirectionImageToImageFilter);
-  
+
   /** typedef of the computing filter (this allows us to derive from ModulusAndDirectionToImageFilter as well as
       using the BinaryFunctorNeighBorhoodImageFilter, which is appropriate here */
   typedef Functor::RemoveIsolatedByDirectionFunctor<
-    typename itk::ConstNeighborhoodIterator<TInputModulus>, 
+    typename itk::ConstNeighborhoodIterator<TInputModulus>,
     typename itk::ConstNeighborhoodIterator<TInputDirection>,
     typename TOutputImage::PixelType>  FunctorType;
   typedef otb::BinaryFunctorNeighborhoodImageFilter<TInputModulus, TInputDirection,TOutputImage,FunctorType> ComputingFilterType;
-        
+
 protected:
   /** Constructor */
   RemoveIsolatedByDirectionFilter(){};
diff --git a/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.h b/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.h
index 37ff2c12ac..b36eb5ed90 100644
--- a/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.h
+++ b/Code/FeatureExtraction/otbRemoveTortuousPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,13 +30,13 @@ namespace otb
    *  A path is considered to be tortuous if the mean distance between each consecutive vertices
    *  is strictly lower than the user provided threshold.
    *
-   * This class is just a shortcut to the UnaryFunctorObjectListBooleanFilter with 
+   * This class is just a shortcut to the UnaryFunctorObjectListBooleanFilter with
    * the PathMeanDistanceFunctor.
    *
    *<b>Recent API changes:</b>
    * Now part of the UnaryFunctorObjectListBooleanFilter hierachy, replace call to SetMeanDistanceThreshold()
    * by GetFunctor().SetThreshold().
-   * 
+   *
    * The inequality is now a strict one.
    *
    * \sa BreakAngularPathListFilter
@@ -50,10 +50,10 @@ namespace otb
 
 //   template <class TPath>
   template <class TPath>
-      class ITK_EXPORT RemoveTortuousPathListFilter : 
+      class ITK_EXPORT RemoveTortuousPathListFilter :
       public UnaryFunctorObjectListBooleanFilter<
-       ObjectList<TPath>, 
-       ObjectList<TPath>, 
+       ObjectList<TPath>,
+       ObjectList<TPath>,
        PathMeanDistanceFunctor<typename TPath::Pointer> >
        {};
 
diff --git a/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.h b/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.h
index 18c3098ca6..5d082f9a4a 100644
--- a/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.h
+++ b/Code/FeatureExtraction/otbRemoveWrongDirectionFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbModulusAndDirectionImageToImageFilter.h"
 #include "itkBinaryFunctorImageFilter.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -58,7 +58,7 @@ namespace Functor
  *  \brief This filter removes (sets to null intensity) pixels with wrong direction.
  *
  *  This filter is part of the road extraction framework. By using the Spectral Angle filter,
- *  we can assume that the direction of a road on our scalar product image is positive (greater 
+ *  we can assume that the direction of a road on our scalar product image is positive (greater
  *  than \f$ \pi/8 \f$).
  *  Therefore in the input modulus and direction images, pixels whose direction is lower than
  *  this threshold are supressed
@@ -78,21 +78,21 @@ class ITK_EXPORT RemoveWrongDirectionFilter
   typedef ModulusAndDirectionImageToImageFilter<TInputModulus, TInputDirection, TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>                                                             Pointer;
   typedef itk::SmartPointer<const Self>                                                       ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(RemoveWrongDirectionFilter,ModulusAndDirectionImageToImageFilter);
-  
+
   /** typedef of the computing filter (this allows us to derive from ModulusAndDirectionToImageFilter as well as
       using the BinaryFunctorImageFilter, which is appropriate here */
   typedef Functor::RemoveWrongDirectionFunctor<
-    typename TInputModulus::PixelType, 
+    typename TInputModulus::PixelType,
     typename TInputDirection::PixelType,
     typename TOutputImage::PixelType>  FunctorType;
   typedef itk::BinaryFunctorImageFilter<TInputModulus, TInputDirection,TOutputImage,FunctorType> ComputingFilterType;
-        
+
 protected:
   /** Constructor */
   RemoveWrongDirectionFilter(){};
diff --git a/Code/FeatureExtraction/otbRoadExtractionFilter.h b/Code/FeatureExtraction/otbRoadExtractionFilter.h
index 7cdfe4ac71..4f31b6332e 100644
--- a/Code/FeatureExtraction/otbRoadExtractionFilter.h
+++ b/Code/FeatureExtraction/otbRoadExtractionFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,23 +32,23 @@ namespace otb
 /**
  * \class RoadExtractionFilter
  * \brief This class performs the extraction of roads from an image.
- * 
+ *
  * This composite filter implements a fast and robust road extraction
- * for high resolution satellite images. This is a composite filter using the 
+ * for high resolution satellite images. This is a composite filter using the
  * SpectralAngleDistanceImageFilter and the GenericRoadExtractionFilter and is
- * intended to be used with optical high resolution data. The full method is 
- * described in E. Christophe and J. Inglada, "Robust Road Extraction for High 
- * Resolution Satellite Images," in IEEE International Conference on 
+ * intended to be used with optical high resolution data. The full method is
+ * described in E. Christophe and J. Inglada, "Robust Road Extraction for High
+ * Resolution Satellite Images," in IEEE International Conference on
  * Image Processing, ICIP 2007.
- * 
+ *
  * The algorithm uses all spectral
- * bands based on the spectral angle with a reference pixel. Then, the line 
+ * bands based on the spectral angle with a reference pixel. Then, the line
  * detection is done using a Gaussian gradient with a scalar product to find
- * the road directions. Finally, extracted roads are vectorized and 
- * processed to improve the results removing some occultations and false 
+ * the road directions. Finally, extracted roads are vectorized and
+ * processed to improve the results removing some occultations and false
  * detections.
  *
- * This filter is fast, as the detection typically takes 3 seconds for a 
+ * This filter is fast, as the detection typically takes 3 seconds for a
  * 1000 \f$ \times \f$ 1000 images with four spectral bands. Results can be
  * used as an initialization for more complex algorithms.
  *
@@ -63,7 +63,7 @@ template <class TInputImage, class TOutputPath>
   : public ImageToPathListFilter<TInputImage,TOutputPath>
   {
     public :
-    /** Standard typedefs */ 
+    /** Standard typedefs */
     typedef RoadExtractionFilter                                Self;
     typedef ImageToPathListFilter<TInputImage,TOutputPath>      Superclass;
     typedef itk::SmartPointer<Self>                             Pointer;
@@ -78,13 +78,13 @@ template <class TInputImage, class TOutputPath>
     typedef typename Superclass::OutputPathListType                     OutputPathListType;
     typedef typename InputImageType::PixelType 				InputPixelType;
     typedef double                                                      InternalPixelType;
-    
+
     typedef otb::VectorImage<InternalPixelType,InputImageType::ImageDimension>  VectorImageType;
     typedef otb::Image<InternalPixelType,InputImageType::ImageDimension>        SpectralAngleType;
     typedef otb::Image<InternalPixelType,InputImageType::ImageDimension>        ModulusType;
     typedef otb::Image<InternalPixelType,InputImageType::ImageDimension>        DirectionType;
-    
-    typedef itk::CovariantVector<InternalPixelType,InputImageType::ImageDimension> 
+
+    typedef itk::CovariantVector<InternalPixelType,InputImageType::ImageDimension>
                                                                         VectorPixelType;
     typedef otb::Image<VectorPixelType,InputImageType::ImageDimension>  CovariantVectorImageType;
 
@@ -95,16 +95,16 @@ template <class TInputImage, class TOutputPath>
 
     typedef GenericRoadExtractionFilter<SpectralAngleType, OutputPathType>
         GenericRoadExtractionFilterType;
-                        
-    
+
+
     /** Template parameters typedefs for internals filters */
         typedef typename GenericRoadExtractionFilterType::SigmaType SigmaType;
         typedef typename GenericRoadExtractionFilterType::AmplitudeThresholdType AmplitudeThresholdType;
         typedef typename GenericRoadExtractionFilterType::ToleranceType ToleranceType;
         typedef typename GenericRoadExtractionFilterType::MaxAngleType MaxAngleType;
-        typedef typename GenericRoadExtractionFilterType::MeanDistanceThresholdType MeanDistanceThresholdType; 
+        typedef typename GenericRoadExtractionFilterType::MeanDistanceThresholdType MeanDistanceThresholdType;
         typedef typename GenericRoadExtractionFilterType::LinkRealType LinkRealType;
-     
+
   /** Get/Set the reference pixel (use by the SpectralAngleDistanceImageFilter)*/
   otbGetObjectMemberConstReferenceMacro(SpectralAngleDistanceImageFilter,ReferencePixel,InputPixelType);
   otbSetObjectMemberMacro(SpectralAngleDistanceImageFilter,ReferencePixel,InputPixelType);
@@ -130,14 +130,14 @@ template <class TInputImage, class TOutputPath>
   otbSetObjectMemberMacro(GenericRoadExtractionFilter,FirstMeanDistanceThreshold,MeanDistanceThresholdType);
   otbGetObjectMemberMacro(GenericRoadExtractionFilter,SecondMeanDistanceThreshold,MeanDistanceThresholdType);
   otbSetObjectMemberMacro(GenericRoadExtractionFilter,SecondMeanDistanceThreshold,MeanDistanceThresholdType);
- 
+
   /** Get/Set the angular threshold (use by LinkPathFilter)*/
   otbSetObjectMemberMacro(GenericRoadExtractionFilter,AngularThreshold,LinkRealType);
   otbGetObjectMemberMacro(GenericRoadExtractionFilter,AngularThreshold,LinkRealType);
   /** Get/Set the distance threshold (use by LinkPathFilter)*/
   otbSetObjectMemberMacro(GenericRoadExtractionFilter,DistanceThreshold,LinkRealType);
   otbGetObjectMemberMacro(GenericRoadExtractionFilter,DistanceThreshold,LinkRealType);
-  
+
   protected:
     /** Constructor */
     RoadExtractionFilter();
@@ -153,7 +153,7 @@ template <class TInputImage, class TOutputPath>
     void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   private :
-    
+
     RoadExtractionFilter(const Self&); // purposely not implemented
     void operator=(const Self&); // purposely not implemented
 
diff --git a/Code/FeatureExtraction/otbRoadExtractionFilter.txx b/Code/FeatureExtraction/otbRoadExtractionFilter.txx
index 7a7f572867..b5c1c106a9 100644
--- a/Code/FeatureExtraction/otbRoadExtractionFilter.txx
+++ b/Code/FeatureExtraction/otbRoadExtractionFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,7 +35,7 @@ RoadExtractionFilter<TInputImage, TOutputPath>
 
         m_SpectralAngleDistanceImageFilter = SpectralAngleDistanceImageFilterType::New();
         m_GenericRoadExtractionFilter = GenericRoadExtractionFilterType::New();
-        
+
 }
 
 
@@ -51,14 +51,14 @@ RoadExtractionFilter<TInputImage, TOutputPath>
    typename InputImageType::ConstPointer inputImage     = this->GetInput();
    typename OutputPathListType::Pointer outputPathList  = this->GetOutput();
 
-  // 
+  //
   m_SpectralAngleDistanceImageFilter->SetInput(inputImage);
 //   m_SpectralAngleDistanceImageFilter->SetReferencePixel(m_ReferencePixel);
 
   m_GenericRoadExtractionFilter->SetInput(m_SpectralAngleDistanceImageFilter->GetOutput());
-  
+
   m_GenericRoadExtractionFilter->Update();
-  for(typename GenericRoadExtractionFilterType::OutputPathListType::ConstIterator it 
+  for(typename GenericRoadExtractionFilterType::OutputPathListType::ConstIterator it
         = m_GenericRoadExtractionFilter->GetOutput()->Begin();
         it!=m_GenericRoadExtractionFilter->GetOutput()->End();
       ++it)
diff --git a/Code/FeatureExtraction/otbShape.h b/Code/FeatureExtraction/otbShape.h
index de4f73eda1..dd38e534ab 100644
--- a/Code/FeatureExtraction/otbShape.h
+++ b/Code/FeatureExtraction/otbShape.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,14 +35,14 @@ namespace otb
 {
 
 /** \class Point_plane
- * 
+ *
  *  Point in the plane
  */
 class Point_plane
 {
 public:
   short x;  /* coordinates of the point */
-  short y;  
+  short y;
 
   Point_plane()
        {
@@ -58,7 +58,7 @@ private:
 };
 
 /** \class shape
- * 
+ *
  *  A shape  : a connected component of a level set, with filled holes
  */
 class Shape
@@ -73,9 +73,9 @@ public:
   Shape    *parent;
   Shape    *next_sibling;
   Shape    *child;
-  /* Data to include it in a tree. It has a parent (the smallest containing 
-     shape), children (the largest contained shapes, whose first is pChild 
-     and the others are its siblings), and siblings (the other children of 
+  /* Data to include it in a tree. It has a parent (the smallest containing
+     shape), children (the largest contained shapes, whose first is pChild
+     and the others are its siblings), and siblings (the other children of
      its parent) */
   Shape* mw_get_not_removed_shape(Shape *sh);
   Shape* mw_get_parent_shape(Shape *sh);
@@ -110,8 +110,8 @@ private:
 };
 
 /** \class Shapes
- * 
- * A set of shapes (complete representation of an image) 
+ *
+ * A set of shapes (complete representation of an image)
  */
 
 class Shapes
@@ -120,7 +120,7 @@ public:
   typedef itk::PolyLineParametricPath<2>    PathType;
   typedef PathType::Pointer        PathPointer;
   typedef PathType::VertexType     VertexType;
-  
+
   int nrow;               /* Number of rows (dy) of the image */
   int ncol;               /* Number of columns (dx) of the image */
   int interpolation;      /* Interpolation used for the level lines:
@@ -134,7 +134,7 @@ public:
 
 //  Shapes* mw_new_shapes();
   void   mw_alloc_shapes( int inrow, int incol, float value);
-  void   mw_change_shapes(int inrow, int incol, float value);     
+  void   mw_change_shapes(int inrow, int incol, float value);
   Shape* mw_get_smallest_shape(int iX,int iY);
 
 
@@ -144,8 +144,8 @@ public:
 /* Allocate the array of pixels of each shape. Thanks to the tree structure,
 we allocate only memory for the pixels of the root, and other arrays are
 just pointers */
-  void  allocate_pixels(int* tabNbOfProperPixels);  
-  
+  void  allocate_pixels(int* tabNbOfProperPixels);
+
 /* Associate to each shape its array of pixels. Fills the field PIXELS of
 the tree structure. From the command line, this function has no interest,
 since that field is not saved to the file. It is meant to be called from
@@ -153,7 +153,7 @@ another module, when this field is needed */
   void  flst_pixels();
 
 
-  static const int EAST; 
+  static const int EAST;
   static const int NORTH;
   static const int WEST;
   static const int SOUTH;
@@ -168,9 +168,9 @@ another module, when this field is needed */
   int find_closed_boundary(Shape *pShape,PathPointer pBoundary);
 /* Find an initial point (to follow the boundary) at the border of the image */
   void initial_point_border(Point_plane *pDualPoint,
-   			    int *cDirection,Shape *pShape);		    
+   			    int *cDirection,Shape *pShape);
 /* Find an open boundary */
-  void find_open_boundary(Shape *pShape,PathPointer pBoundary);    
+  void find_open_boundary(Shape *pShape,PathPointer pBoundary);
   PathPointer flst_shape_boundary(Shape *pShape);
   Shapes()
     {
@@ -182,7 +182,7 @@ another module, when this field is needed */
     interpolation  = 0;
     }
 
-  ~Shapes() 
+  ~Shapes()
     {
      if((the_shapes != NULL) && (nb_shapes > 0))
          delete[] (the_shapes[0].pixels);
@@ -204,5 +204,5 @@ private:
 #include "otbShape.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbShape.txx b/Code/FeatureExtraction/otbShape.txx
index 1918a80fd4..64902cefab 100644
--- a/Code/FeatureExtraction/otbShape.txx
+++ b/Code/FeatureExtraction/otbShape.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@ MegaWave2 is a "soft-publication" for the scientific community. It has
 been developed for research purposes and it comes without any warranty.
 The last version is available at http://www.cmla.ens-cachan.fr/Cmla/Megawave
 CMLA, Ecole Normale Superieure de Cachan, 61 av. du President Wilson,
-      94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr 
+      94235 Cachan cedex, France. Email: megawave@cmla.ens-cachan.fr
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
 #ifndef __otbShape_txx
@@ -39,7 +39,7 @@ namespace otb
 
 /* Get in the subtree of root sh a shape that is not removed, NULL if all shapes are removed */
 
-Shape* 
+Shape*
 Shape::mw_get_not_removed_shape(Shape *sh)
 {
   Shape *NotSup = NULL;
@@ -53,7 +53,7 @@ Shape::mw_get_not_removed_shape(Shape *sh)
 
 /* Get the true parent, that is the greatest non removed ancestor */
 
-Shape* 
+Shape*
 Shape::mw_get_parent_shape(Shape *sh)
 {
   if(sh == NULL)
@@ -67,7 +67,7 @@ Shape::mw_get_parent_shape(Shape *sh)
   do
     if((sh = sh->parent) == NULL)
       {
-	std::cerr << "[mw_get_parent_shape] the root of the shapes is removed" << std::endl; 
+	std::cerr << "[mw_get_parent_shape] the root of the shapes is removed" << std::endl;
 	return(NULL);
       }
   while(sh->removed);
@@ -76,39 +76,39 @@ Shape::mw_get_parent_shape(Shape *sh)
 
 /* Get the first child, taking into account that some shapes are removed */
 
-Shape* 
+Shape*
 Shape::mw_get_first_child_shape(Shape *sh)
 {
   Shape *NotSup = NULL;
   if(sh == NULL)
     {
-      std::cerr << "[mw_get_first_child_shape] input shape is NULL" << std::endl; 
+      std::cerr << "[mw_get_first_child_shape] input shape is NULL" << std::endl;
       return(NULL);
     }
   for(sh = sh->child; sh != NULL; sh = sh->next_sibling)
     if((NotSup = mw_get_not_removed_shape(sh)) != NULL)
       break;
-  return(NotSup);  
+  return(NotSup);
 }
 
 
 /* Get the next sibling, taking into account that some shapes are removed */
 
-Shape* 
+Shape*
 Shape::mw_get_next_sibling_shape(Shape *sh)
 {
   Shape *sh1 = NULL;
   Shape *sh2 = NULL;
   if(sh == NULL)
     {
-      std::cerr <<"[mw_get_next_sibling_shape] input shape is NULL"; 
+      std::cerr <<"[mw_get_next_sibling_shape] input shape is NULL";
       return(NULL);
     }
   /* First look at the siblings in the original tree */
   for(sh1 = sh->next_sibling; sh1 != NULL; sh1 = sh1->next_sibling)
     if((sh2 = mw_get_not_removed_shape(sh1)) != NULL)
       return(sh2);
-  if(sh->parent == NULL || ! sh->parent->removed) 
+  if(sh->parent == NULL || ! sh->parent->removed)
     return(NULL); /* The parent in the original tree is also the parent in the true tree, nothing more to do */
   /* If not found, find the node in the original tree just before the true parent */
   do
@@ -163,7 +163,7 @@ Shapes::mw_alloc_shapes( int inrow, int  incol, float value)
 
   nb_shapes = 1;
   nrow      = inrow;
-  ncol      = incol;  
+  ncol      = incol;
 
 
   typedef Shape* ShapePtr;
@@ -192,7 +192,7 @@ Shapes::mw_change_shapes(int inrow,int incol,float value)
     delete[] the_shapes[0].pixels;
   if (the_shapes != NULL) delete[] the_shapes;
  if (smallest_shape != NULL) delete[] smallest_shape;
- 
+
   mw_alloc_shapes(inrow, incol, value);
 }
 
@@ -200,29 +200,29 @@ Shapes::mw_change_shapes(int inrow,int incol,float value)
 
 /* Return the smallest shape containing the given pixel */
 
-Shape* 
+Shape*
 Shapes::mw_get_smallest_shape(int iX,int iY)
 {
   Shape *sh;
-  
+
   sh = smallest_shape[iY*ncol+iX];
   if (sh == NULL)
     {
-      std::cerr << "[mw_get_smallest_shape] smallest shape is NULL" << std::endl; 
+      std::cerr << "[mw_get_smallest_shape] smallest shape is NULL" << std::endl;
       return(NULL);
-    }  
+    }
   if(sh->removed)
     sh = sh->mw_get_parent_shape(sh);
   return(sh);
 }
 
-void 
+void
 Shapes::compute_proper_pixels(int *tabNbOfProperPixels)
 {
   Shape *pShape;
   int   *pNbOfProperPixels;
   int   i;
-  
+
   /* 1) Initialize by the area */
   pShape = the_shapes + nb_shapes-1;
   pNbOfProperPixels = tabNbOfProperPixels + nb_shapes-1;
@@ -235,7 +235,7 @@ Shapes::compute_proper_pixels(int *tabNbOfProperPixels)
 
 }
 
-void 
+void
 Shapes::allocate_pixels(int* tabNbOfProperPixels)
 {
   Point_plane  *tabPixelsOfRoot;
@@ -255,7 +255,7 @@ Shapes::allocate_pixels(int* tabNbOfProperPixels)
 
   /* 2) Enumeration of the tree in preorder, using the stack */
   pShape = &the_shapes[0];
-  iSizeOfStack = 0; 
+  iSizeOfStack = 0;
   i = 0;
   while(1)
     if(pShape != NULL) {
@@ -275,14 +275,14 @@ Shapes::allocate_pixels(int* tabNbOfProperPixels)
 }
 
 
-void 
+void
 Shapes::flst_pixels()
 {
   Shape        **ppShape;
   int          *tabNbOfProperPixels; /* For each shape, its number of proper pixels */
   Point_plane  *pCurrentPoint;
   int          i;
-  int          j; 
+  int          j;
   int          iIndex;
 
   /* 1) Compute nb of proper pixels in each shape */
@@ -330,29 +330,29 @@ Shapes::TURN_RIGHT(int *dir)
 
 
 /* Is the point in the shape? */
-char 
+char
 Shapes::point_in_shape(int x,int y,Shape *pShape)
 {
   char result;
-   
+
   Shape *pShapePoint = smallest_shape[y*ncol+x];
   result = (pShape->pixels <= pShapePoint->pixels &&
 	  pShapePoint->pixels < pShape->pixels+pShape->area);
 
   otbMsgDevMacro( << "PointInShape() -->"<<x<<" "<<y<<" " << pShape->value << " Result : "<< int(result));
-	  
+
   return (pShape->pixels <= pShapePoint->pixels &&
 	  pShapePoint->pixels < pShape->pixels+pShape->area);
 }
 
 /* Find the dual point following pDualPoint as we follow the shape boundary */
-void 
+void
 Shapes::find_next_dual_point(Point_plane *pDualPoint,int *cDirection,Shape *pShape)
 {
   char bLeftIn, bRightIn;
   otbMsgDevMacro( << "Shapes::find_next_dual_point()" );
   otbMsgDevMacro( << " pDualPoint : ( "<<pDualPoint->x << " , " << pDualPoint->y << " Direction :" << cDirection );
-  
+
   switch(*cDirection) {
   case NORTH:
     bLeftIn  = point_in_shape(pDualPoint->x-1, pDualPoint->y-1, pShape);
@@ -409,7 +409,7 @@ Shapes::find_next_dual_point(Point_plane *pDualPoint,int *cDirection,Shape *pSha
   }
 }
 
-int 
+int
 Shapes::find_closed_boundary(Shape *pShape,PathPointer pBoundary)
 {
   short int                      x0;
@@ -419,12 +419,12 @@ Shapes::find_closed_boundary(Shape *pShape,PathPointer pBoundary)
   short int                      iWidth = (short int)ncol;
   short int                      iHeight = (short int)nrow;
   PathType::ContinuousIndexType  cindex;
-  
+
   otbMsgDevMacro( << " find_closed_boundary 0" );
   /* 1) Find initial point, with NORTH direction */
   otbMsgDevMacro( << "pixel : " << pShape->pixels );
-  
-  dualPoint.x = pShape->pixels[0].x; 
+
+  dualPoint.x = pShape->pixels[0].x;
   dualPoint.y = pShape->pixels[0].y;
   cDirection  = NORTH;
 
@@ -434,24 +434,24 @@ Shapes::find_closed_boundary(Shape *pShape,PathPointer pBoundary)
   while(point_in_shape(dualPoint.x, dualPoint.y, pShape));
 
   otbMsgDevMacro( << " find_closed_boundary 2" );
-  
+
   /* 2) Follow the boundary */
-  x0 = dualPoint.x; 
+  x0 = dualPoint.x;
   y0 = dualPoint.y;
   do {
       otbMsgDevMacro( << " find_closed_boundary 3" );
       cindex[0] = dualPoint.x;
       cindex[1] = dualPoint.y;
-      
+
       pBoundary->AddVertex(cindex);
-     
+
       find_next_dual_point(&dualPoint,&cDirection, pShape);
   } while(dualPoint.x != x0 || dualPoint.y != y0 || cDirection != NORTH);
   /* Close the boundary */
 
   cindex[0] = dualPoint.x;
   cindex[1] = dualPoint.y;
-      
+
   pBoundary->AddVertex(cindex);
 
   otbMsgDevMacro( << " find_closed_boundary 4" );
@@ -460,20 +460,20 @@ Shapes::find_closed_boundary(Shape *pShape,PathPointer pBoundary)
 
 
 /* Find an initial point (to follow the boundary) at the border of the image */
-void 
+void
 Shapes::initial_point_border(Point_plane *pDualPoint,int *cDirection,Shape *pShape)
 {
   short int iWidth  = (short int)ncol;
   short int iHeight = (short int)nrow;
   short int x, y;
 
-  otbMsgDevMacro( << "initial_point_border() --> "  ); 
+  otbMsgDevMacro( << "initial_point_border() --> "  );
   otbMsgDevMacro( << " pDualPoint x: " <<pDualPoint->x << " pDualPoint y: " <<pDualPoint->y << " Direction   :" << int(*cDirection)  );
 
   /* Right border */
   *cDirection = WEST;
   otbMsgDevMacro( << " Direction  (WEST) :" << int(*cDirection)  );
-  x = iWidth-1; 
+  x = iWidth-1;
   y = 0;
   if(point_in_shape(x, y++, pShape))
     while(y < iHeight && point_in_shape(x, y++, pShape));
@@ -486,7 +486,7 @@ Shapes::initial_point_border(Point_plane *pDualPoint,int *cDirection,Shape *pSha
   }
   /* Top border */
   *cDirection = SOUTH;
-  x = 0; 
+  x = 0;
   y = 0;
   if(point_in_shape(x++, y, pShape))
     while(x < iWidth && point_in_shape(x++, y, pShape));
@@ -499,7 +499,7 @@ Shapes::initial_point_border(Point_plane *pDualPoint,int *cDirection,Shape *pSha
   }
   /* Left border */
   *cDirection = EAST;
-  x = 0; 
+  x = 0;
   y = iHeight-1;
   if(point_in_shape(x, y--, pShape))
     while(y >= 0 && point_in_shape(x, y--, pShape));
@@ -512,7 +512,7 @@ Shapes::initial_point_border(Point_plane *pDualPoint,int *cDirection,Shape *pSha
   }
   /* Bottom border */
   *cDirection = NORTH;
-  x = iWidth-1; 
+  x = iWidth-1;
   y = iHeight-1;
   if(point_in_shape(x--, y, pShape))
     while(x >= 0 && point_in_shape(x--, y, pShape));
@@ -527,7 +527,7 @@ Shapes::initial_point_border(Point_plane *pDualPoint,int *cDirection,Shape *pSha
 }
 
 /* Find an open boundary */
-void 
+void
 Shapes::find_open_boundary(Shape *pShape,PathPointer pBoundary)
 {
   Point_plane                    dualPoint;
@@ -542,21 +542,21 @@ Shapes::find_open_boundary(Shape *pShape,PathPointer pBoundary)
   do {
       cindex[0] = dualPoint.x;
       cindex[1] = dualPoint.y;
-      
+
       pBoundary->AddVertex(cindex);
 
     otbMsgDevMacro( << "Shapes::find_open_boundary() DO WHILE" );
     find_next_dual_point(&dualPoint, &cDirection,pShape);
   } while(0 < dualPoint.x && dualPoint.x < iWidth &&
 	  0 < dualPoint.y && dualPoint.y < iHeight);
- 
+
  /* We store the exit */
- 
+
   cindex[0] = dualPoint.x;
   cindex[1] = dualPoint.y;
-  
+
   pBoundary->AddVertex(cindex);
-      
+
   otbMsgDevMacro( << "Shapes::find_open_boundary() END" );
 
 }
@@ -568,11 +568,11 @@ Shapes::flst_shape_boundary(Shape *pShape)
 {
   otbMsgDevMacro( << " FLST Shape Boundary " );
   otbMsgDevMacro( << "Nb ncol : " << ncol );
-  
+
   PathPointer  pBoundary = PathType::New();
 
   otbMsgDevMacro( << " FLST Shape Boundary ....New" );
-     
+
   if(the_shapes[0].pixels == NULL)
     flst_pixels();
   otbMsgDevMacro( << " FLST Shape Boundary ....Pixel" );
diff --git a/Code/FeatureExtraction/otbSimplifyPathListFilter.h b/Code/FeatureExtraction/otbSimplifyPathListFilter.h
index 86a2a00133..e0f91b9baf 100644
--- a/Code/FeatureExtraction/otbSimplifyPathListFilter.h
+++ b/Code/FeatureExtraction/otbSimplifyPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,30 +26,30 @@ namespace otb
 {
 /** \class SimplifyPathListFilter
    *  \brief This filter performs a simplification of the path in the input list.
-   * 
-   *  It reduces the number of vertices in each path, according to a tolerance criterion. It aims at 
+   *
+   *  It reduces the number of vertices in each path, according to a tolerance criterion. It aims at
    *  removing aligned vertices while keeping sharp angular points.
    *
-   *  In order to ensure the unicity of its output, each path is considered first from begin to end, then 
-   *  from begin to the first vertex before the end. At each step, the consistency of the path is checked : 
+   *  In order to ensure the unicity of its output, each path is considered first from begin to end, then
+   *  from begin to the first vertex before the end. At each step, the consistency of the path is checked :
    *  the equation of the line passing by the first and last vertices is computed. Then, for each
    *  vertices between them, the euclidean distance to this line is computed. If for one vertex, this distance
    *  is upper than the tolerance threshold, the path is considered to be inconsistent and no vertices can be removed.
    *
-   *  If the path is considered consistent (which will occure at least with a 2 vertices path), 
+   *  If the path is considered consistent (which will occure at least with a 2 vertices path),
    * only the beginning and ending
    *  vertices are kept and a new search iteration begin at its end.
    *
    *  This filter is part of the road extraction framework.
    *
-   * This class is just a shortcut to the UnaryFunctorObjectListFilter with 
+   * This class is just a shortcut to the UnaryFunctorObjectListFilter with
    * the SimplifyPathFunctor.
    *
    *   <b>Recent API changes:</b>
    * Now part of the UnaryFunctorObjectListFilter hierachy, replace call to SetTolerance()
    * by GetFunctor().SetTolerance().
-   * 
-   * 
+   *
+   *
    * \sa BreakAngularPathListFilter
    * \sa RemoveTortuousPathFilter.
    * \sa UnaryFunctorObjectListFilter
@@ -60,10 +60,10 @@ namespace otb
  */
 
   template <class TPath>
-      class ITK_EXPORT  SimplifyPathListFilter: 
+      class ITK_EXPORT  SimplifyPathListFilter:
       public UnaryFunctorObjectListFilter<
-      ObjectList<TPath>, 
-      ObjectList<TPath>, 
+      ObjectList<TPath>,
+      ObjectList<TPath>,
       SimplifyPathFunctor<typename TPath::Pointer, typename TPath::Pointer> >
       {};
 
diff --git a/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h b/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h
index 3d908f016f..9536f18dfe 100644
--- a/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h
+++ b/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,10 +28,10 @@ namespace otb
  *
  */
 
-template <class TInputImage, 
+template <class TInputImage,
 //          class TOutputPointSet>
          class TOutputPointSet = itk::PointSet<ITK_TYPENAME TInputImage::PixelType,2> >
-class ITK_EXPORT ThresholdImageToPointSetFilter :  
+class ITK_EXPORT ThresholdImageToPointSetFilter :
            public ImageToPointSetFilter< TInputImage,TOutputPointSet >
 {
 public:
@@ -51,7 +51,7 @@ public:
   itkNewMacro(Self);
 
   itkTypeMacro(ThresholdImageToPointSetFilter, ImageToPointSetFilter);
-  
+
   typedef typename Superclass::InputImagePixelType        InputPixelType;
   typedef typename Superclass::InputImagePointer          InputImagePointer;
   typedef typename Superclass::InputImageConstPointer     InputImageConstPointer;
@@ -72,7 +72,7 @@ protected:
   virtual ~ThresholdImageToPointSetFilter() {};
 
   virtual void GenerateData();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -88,5 +88,5 @@ private:
 #include "otbThresholdImageToPointSetFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx b/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx
index 949642bd3a..ad91bb3734 100644
--- a/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx
+++ b/Code/FeatureExtraction/otbThresholdImageToPointSetFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ ThresholdImageToPointSetFilter<TInputImage, TOutputPointSet>
 ::ThresholdImageToPointSetFilter()
 {
   m_LowerThreshold = itk::NumericTraits<InputPixelType>::NonpositiveMin();
-  m_UpperThreshold = itk::NumericTraits<InputPixelType>::max();  
+  m_UpperThreshold = itk::NumericTraits<InputPixelType>::max();
 }
 
 
@@ -53,19 +53,19 @@ ThresholdImageToPointSetFilter<TInputImage, TOutputPointSet>
   // walk the regions, threshold each pixel
   while( !inIt.IsAtEnd() )
     {
-    
+
     const InputPixelType value = inIt.Get();
     const IndexType index = inIt.GetIndex();
-    
+
     if ((value >= m_LowerThreshold) && (value <= m_UpperThreshold))
       {
        position[0] = index[0];
        position[1] = index[1];
 
-       outputPtr->SetPoint(pointId,position);    
+       outputPtr->SetPoint(pointId,position);
+
+       pointId++;
 
-       pointId++;    
-       
       }
     ++inIt;
     }
diff --git a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.h b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.h
index 1b03454e12..e8a2c90942 100644
--- a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.h
+++ b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@
 #include "otbImage.h"
 #include "itkNumericTraits.h"
 
-#define MINI(_A,_B) ((_A) < (_B) ? (_A) : (_B))   
+#define MINI(_A,_B) ((_A) < (_B) ? (_A) : (_B))
 #define MAXI(_A,_B) ((_A) > (_B) ? (_A) : (_B))
 
 
@@ -32,9 +32,9 @@ namespace otb
 /** \class TouziEdgeDetectorImageFilter
  * \brief Application of a filter of detection of contours.
  *
- * This class implements the Touzi's ratio edge detector used to detect 
- * contours. 
- * 
+ * This class implements the Touzi's ratio edge detector used to detect
+ * contours.
+ *
  * We define a square region of size 2n+1 that we devided in two regions.
  *
  * The response of the edge detector between two regions 1 and 2 in
@@ -42,9 +42,9 @@ namespace otb
  *	\f[R(\theta_{i}) = 1 - \min (\frac{\mu_{1}}{\mu_{2}};\frac{\mu_{2}}{\mu_{1}}) \f]
  * where \f$ \mu_{1} \f$ and  \f$ \mu_{2} \f$ are the mean of regions 1 and 2.
  *
- * The intensity of contour is calculated in four directions 
- * vertical , diagonal 1, horizontal and diagonal 2.   
- * 
+ * The intensity of contour is calculated in four directions
+ * vertical , diagonal 1, horizontal and diagonal 2.
+ *
  * The output is an image of intensity of the detection of contour R, the
  * maximum response of the ratio edge detector of \f$ R(\theta_{i}) \f$ :
  *	\f[R = \max ( R(\theta_{i}) ) \f]
@@ -53,7 +53,7 @@ namespace otb
  * 	\f[D = \frac{\sum_{i=1}^{4} s_{i}\theta_{i}R(\theta_{i})}{\sum_{i=1}^{4} R(\theta_{i}}  \f]
  * where if  \f[ \mu_{1}>\mu_{2} s_{i}=+1 \f]
  * else if \f[ \mu_{1}<\mu_{2} s_{i}=-1 \f]
- *  
+ *
  */
 
 template <class TInputImage, class TOutputImage, class TOutputImageDirection = TOutputImage >
@@ -64,7 +64,7 @@ public:
   itkStaticConstMacro(		InputImageDimension,
   				unsigned int,
                       		TInputImage::ImageDimension);
-  itkStaticConstMacro(		OutputImageDimension, 
+  itkStaticConstMacro(		OutputImageDimension,
   				unsigned int,
                       		TOutputImage::ImageDimension);
 
@@ -89,19 +89,19 @@ public:
   typedef typename OutputImageType::RegionType OutputImageRegionType;
   typedef typename OutputImageType::PixelType OutputPixelType;
   typedef typename OutputImageDirectionType::PixelType OutputPixelDirectionType;
-  
+
 
   /** Set/Get radius methods */
   itkSetMacro(Radius, SizeType);
   itkGetConstReferenceMacro(Radius, SizeType);
- 
 
-  /** To be allowed to use the pipeline method TouziEdgeDetectorImageFilter needs 
+
+  /** To be allowed to use the pipeline method TouziEdgeDetectorImageFilter needs
    * a treatment input area larger than the output one.
    *
    * \sa ImageToImageFilter::GenerateInputRequestedRegion() */
   virtual void GenerateInputRequestedRegion() throw(itk::InvalidRequestedRegionError);
-  
+
 protected:
   TouziEdgeDetectorImageFilter();
   virtual ~TouziEdgeDetectorImageFilter() {};
@@ -126,7 +126,7 @@ private:
 
   /** Radius declaration */
   SizeType m_Radius;
-  
+
 };
 
 } // end namespace otb
@@ -135,5 +135,5 @@ private:
 #include "otbTouziEdgeDetectorImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx
index 63fffd81ac..e472fb36af 100644
--- a/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx
+++ b/Code/FeatureExtraction/otbTouziEdgeDetectorImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@
 #include "itkZeroFluxNeumannBoundaryCondition.h"
 #include "itkProgressReporter.h"
 #include "otbMacro.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -48,11 +48,11 @@ void TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirecti
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the input and output
   typename Superclass::InputImagePointer inputPtr   =  const_cast< TInputImage * >( this->GetInput() );
   typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
-  
+
   if ( !inputPtr || !outputPtr )
     {
     return;
@@ -79,7 +79,7 @@ void TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirecti
 
     // store what we tried to request (prior to trying to crop)
     inputPtr->SetRequestedRegion( inputRequestedRegion );
-    
+
     // build an exception
     itk::InvalidRequestedRegionError e(__FILE__, __LINE__);
     itk::OStringStream msg;
@@ -98,12 +98,12 @@ void TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirecti
  * has to be set up before ThreadedGenerateData
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-void 
+void
 TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
 ::BeforeThreadedGenerateData()
 {
 
-  typename OutputImageDirectionType::RegionType region;    
+  typename OutputImageDirectionType::RegionType region;
   typename OutputImageType::Pointer     output = this->GetOutput();
 
   OutputImageDirectionType * direction = this->GetOutputDirection();
@@ -117,9 +117,9 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
 }
 
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-void 
+void
 TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
-::ThreadedGenerateData(	
+::ThreadedGenerateData(
 			const 	OutputImageRegionType& 		outputRegionForThread,
                        	int 	threadId
 		       )
@@ -129,13 +129,13 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
   itk::ConstNeighborhoodIterator<InputImageType> 		bit;
   itk::ImageRegionIterator<OutputImageType> 			it;
   itk::ImageRegionIterator<OutputImageType> 			it_dir;
-  
-  
+
+
   // Allocate output
   typename OutputImageType::Pointer     output = this->GetOutput();
   typename InputImageType::ConstPointer input  = this->GetInput();
   typename OutputImageDirectionType::Pointer     outputDir = this->GetOutputDirection();
-    
+
   // Find the data-set boundary "faces"
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType 		faceList;
   typename itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator<InputImageType>::FaceListType::iterator 	fit;
@@ -146,23 +146,23 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
 
   // support progress methods/callbacks
   itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-  
+
   typename TInputImage::IndexType     bitIndex;
 
   // Initializations
   // ---------------
   // Number of direction
   const int NB_DIR = 4;
-  // Number of region of the filter	  
-  const int NB_REGION = 2;  
+  // Number of region of the filter
+  const int NB_REGION = 2;
   // Definition of the 4 directions
   double Theta[NB_DIR];
-  
+
   Theta[0] = 0.;
   Theta[1] = M_PI_4 ;
   Theta[2] = M_PI_2 ;
   Theta[3] = 3*M_PI / 4. ;
-  
+
 
   // contains for the 4 directions the sum of the pixels belonging to each region
   double Sum[NB_DIR][NB_REGION];
@@ -174,9 +174,9 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
   double R_theta[NB_DIR];
   double Sum_R_theta = 0.;
   // Intensity of the contour
-  double R_contour; 
+  double R_contour;
   // Direction of the contour
-  double Dir_contour = 0.; 
+  double Dir_contour = 0.;
   // sign of the contour
   int sign;
 
@@ -188,20 +188,20 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
   int yc;
 
  int cpt=0;
-    
+
   // Process each of the boundary faces.  These are N-d regions which border
   // the edge of the buffer.
   for (fit=faceList.begin(); fit != faceList.end(); ++fit)
-    { 
-   
+    {
+
    cpt += 1;
-    
+
     bit = itk::ConstNeighborhoodIterator<InputImageType>(m_Radius, input, *fit);
     unsigned int neighborhoodSize = bit.Size();
-      
+
     it = itk::ImageRegionIterator<OutputImageType>(output, *fit);
     it_dir = itk::ImageRegionIterator<OutputImageDirectionType>(outputDir, *fit);
-    
+
     bit.OverrideBoundaryCondition(&nbc);
     bit.GoToBegin();
 
@@ -211,108 +211,108 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
 
       // Location of the pixel central
       bitIndex = bit.GetIndex();
-      
+
       xc = bitIndex[0];
       yc = bitIndex[1];
 
       // Initializations
       for (int dir=0; dir<NB_DIR; dir++)
         {
-        for (int m=0; m<NB_REGION; m++) 
+        for (int m=0; m<NB_REGION; m++)
           Sum[dir][m] = 0.;
         }
-      
-      R_contour = -1;  
+
+      R_contour = -1;
       Dir_contour = 0.;
       Sum_R_theta = 0.;
-      
-      
-      // Loop on pixels of the filter  
+
+
+      // Loop on pixels of the filter
       for (i = 0; i < neighborhoodSize; ++i)
         {
 
         bitIndex = bit.GetIndex(i);
         x = bitIndex[0];
         y = bitIndex[1];
-      
-        // We determine for each direction with which region the pixel belongs. 
+
+        // We determine for each direction with which region the pixel belongs.
 
          // Horizontal direction
         if ( y < yc )
       	  Sum[0][0] += static_cast<double>(bit.GetPixel(i));
         else if ( y > yc )
           Sum[0][1] += static_cast<double>(bit.GetPixel(i));
-               
+
         // Diagonal direction 1
         if ( (y-yc) < (x-xc) )
       	  Sum[1][0] += static_cast<double>(bit.GetPixel(i));
         else if ( (y-yc) > (x-xc) )
           Sum[1][1] += static_cast<double>(bit.GetPixel(i));
-                                  
-        // Vertical direction 
+
+        // Vertical direction
         if ( x > xc )
       	  Sum[2][0] += static_cast<double>(bit.GetPixel(i));
         else if ( x < xc )
           Sum[2][1] += static_cast<double>(bit.GetPixel(i));
-      
+
         // Diagonal direction 2
         if ( (y-yc) > -(x-xc) )
       	  Sum[3][0] += static_cast<double>(bit.GetPixel(i));
         else if ( (y-yc) < -(x-xc) )
           Sum[3][1] += static_cast<double>(bit.GetPixel(i));
-           
 
 
-        } // end of the loop on pixels of the filter           
-        
+
+        } // end of the loop on pixels of the filter
+
 
       // Loop on the 4 directions
       for ( int dir=0; dir<NB_DIR; dir++ )
         {
-        // Calculation of the mean of the 2 regions	
+        // Calculation of the mean of the 2 regions
         M1 = Sum[dir][0] / static_cast<double>(m_Radius[0]*(2*m_Radius[0]+1));
         M2 = Sum[dir][1] / static_cast<double>(m_Radius[0]*(2*m_Radius[0]+1));
-     	
+
         // Calculation of the intensity of the contour
-        if (( M1 != 0 ) && (M2 != 0)) 
+        if (( M1 != 0 ) && (M2 != 0))
           R_theta[dir] = static_cast<double>( 1 - MINI( (M1/M2), (M2/M1) ) );
         else
 	  R_theta[dir] = 0.;
-	  
+
 	// Determination of the maximum intensity of the contour
         R_contour = static_cast<double>( MAXI( R_contour, R_theta[dir] ) );
-	 
+
         // Determination of the sign of contour
-        if ( M2 > M1 ) 
+        if ( M2 > M1 )
           sign = +1;
         else
           sign = -1;
 
-        Dir_contour += sign * Theta[dir] * R_theta[dir];        
+        Dir_contour += sign * Theta[dir] * R_theta[dir];
         Sum_R_theta += R_theta[dir];
-	 
-      		
+
+
         } // end of the loop on the directions
-    
-        
+
+
        // Assignment of this value to the output pixel
-      it.Set( static_cast<OutputPixelType>(R_contour) );  
+      it.Set( static_cast<OutputPixelType>(R_contour) );
 
       // Determination of the direction of the contour
-      if ( Sum_R_theta != 0. )	
+      if ( Sum_R_theta != 0. )
         Dir_contour = Dir_contour / Sum_R_theta;
 
-      
+
       // Assignment of this value to the "outputdir" pixel
       it_dir.Set( static_cast<OutputPixelDirectionType>(Dir_contour) );
-                     
+
       ++bit;
       ++it;
       ++it_dir;
-      progress.CompletedPixel();  
-      
+      progress.CompletedPixel();
+
       }
-      
+
     }
 }
 
@@ -320,7 +320,7 @@ TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
  * Standard "PrintSelf" method
  */
 template <class TInputImage, class TOutputImage, class TOutputImageDirection >
-void 
+void
 TouziEdgeDetectorImageFilter<TInputImage, TOutputImage, TOutputImageDirection>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbTreeNeighborhood.h b/Code/FeatureExtraction/otbTreeNeighborhood.h
index c163f5cbe2..06815bfc5f 100644
--- a/Code/FeatureExtraction/otbTreeNeighborhood.h
+++ b/Code/FeatureExtraction/otbTreeNeighborhood.h
@@ -10,12 +10,12 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
- 
+
 #ifndef __otbTreeNeighborhood_h
 #define __otbTreeNeighborhood_h
 
@@ -79,7 +79,7 @@ public:
 
   Neighborhood() {};
   ~Neighborhood() {};
-		    
+
 protected:
 
 private:
@@ -99,7 +99,7 @@ protected:
 private:
 
 };
- 
+
 
 } // end namespace otb
 
@@ -108,4 +108,4 @@ private:
 #endif
 
 #endif
-  
+
diff --git a/Code/FeatureExtraction/otbTreeNeighborhood.txx b/Code/FeatureExtraction/otbTreeNeighborhood.txx
index 701c0892cf..6d3207570e 100644
--- a/Code/FeatureExtraction/otbTreeNeighborhood.txx
+++ b/Code/FeatureExtraction/otbTreeNeighborhood.txx
@@ -10,12 +10,12 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
- 
+
 
 #ifndef __otbTreeNeighborhood_txx
 #define __otbTreeNeighborhood_txx
@@ -30,7 +30,7 @@ namespace otb
  *
  */
 /* Reinitialise the neighborhood, so that it will be used for a new region */
-void 
+void
 Neighborhood::reinit_neighborhood(TypeOfTree type)
 {
   iNbPoints = 0;
@@ -38,7 +38,7 @@ Neighborhood::reinit_neighborhood(TypeOfTree type)
 }
 
 /* To allocate the structure representing the neighborhood of a region */
-void 
+void
 Neighborhood::init_neighborhood(int iMaxArea,
                                 int iWidth,int iHeight)
 {
@@ -53,7 +53,7 @@ Neighborhood::init_neighborhood(int iMaxArea,
 }
 
 /* Free the structure representing the neighborhood of a region */
-void 
+void
 Neighborhood::free_neighborhood()
 {
   delete[] tabPoints;
@@ -61,13 +61,13 @@ Neighborhood::free_neighborhood()
 
 
 /* Put the last neighbor at a position so that we fix the heap */
-void 
+void
 Neighborhood::fix_up()
 {
   Neighbor *tabPoints = tabPoints;
   int k = iNbPoints;
   int l;
-  
+
   if(type == MAX)
     while(k > 1 && ORDER_MAX(k, l=k>>1))
       {
@@ -83,7 +83,7 @@ Neighborhood::fix_up()
 }
 
 /* Put the first neighbor at a position so that we fix the heap */
-void 
+void
 Neighborhood::fix_down()
 {
   Neighbor *tabPoints = tabPoints;
@@ -112,7 +112,7 @@ Neighborhood::fix_down()
 }
 
 
-void 
+void
 Neighborhood::print_neighborhood()
 {
   otbMsgDevMacro( << "pNeighborhood : " );
@@ -121,7 +121,7 @@ Neighborhood::print_neighborhood()
     {
     otbMsgDevMacro( << "tabPoints["<<i <<"] =" << tabPoints[i].value << " Position: (" <<  tabPoints[i].point.x << " , " <<  tabPoints[i].point.y << ")" );
     }
-  
+
 }
 
 
diff --git a/Code/FeatureExtraction/otbTreeSource.h b/Code/FeatureExtraction/otbTreeSource.h
index e903756b91..e47e323c34 100644
--- a/Code/FeatureExtraction/otbTreeSource.h
+++ b/Code/FeatureExtraction/otbTreeSource.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -46,9 +46,9 @@ public:
   typedef itk::ProcessObject             Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Method for creation through the object factory. */
-  itkNewMacro(Self);  
+  itkNewMacro(Self);
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(TreeSource,itk::ProcessObject);
@@ -59,11 +59,11 @@ public:
   typedef TOutputTree                           OutputTreeType;
   typedef typename OutputTreeType::Pointer      OutputTreePointer;
   typedef typename OutputTreeType::ConstPointer OutputTreeConstPointer;
-  
+
   /** Get the mesh output of this process object.  */
   OutputTreeType * GetOutput(void);
   OutputTreeType * GetOutput(unsigned int idx);
-  
+
   void SetOutput(TOutputTree *output);
 
   virtual void GraftOutput(DataObject *output);
@@ -75,9 +75,9 @@ protected:
   TreeSource();
   virtual ~TreeSource() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   void GenerateInputRequestedRegion();
-  
+
 private:
   TreeSource(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/FeatureExtraction/otbTreeSource.txx b/Code/FeatureExtraction/otbTreeSource.txx
index d41e9e9e64..9a2f14dae9 100644
--- a/Code/FeatureExtraction/otbTreeSource.txx
+++ b/Code/FeatureExtraction/otbTreeSource.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ TreeSource<TOutputTree>
   // Create the output. We use static_cast<> here because we know the default
   // output must be of type TOutputMesh
   OutputTreePointer output
-    = static_cast<TOutputTree*>(this->MakeOutput(0).GetPointer()); 
+    = static_cast<TOutputTree*>(this->MakeOutput(0).GetPointer());
 
   this->itk::ProcessObject::SetNumberOfRequiredOutputs(1);
   this->itk::ProcessObject::SetNthOutput( 0, output.GetPointer() );
@@ -65,12 +65,12 @@ TreeSource<TOutputTree>
     {
     return 0;
     }
-  
+
   return static_cast<TOutputTree*>
     (this->itk::ProcessObject::GetOutput(0));
 }
 
-  
+
 /**
  *
  */
@@ -88,7 +88,7 @@ TreeSource<TOutputTree>
  *
  */
 template<class TOutputTree>
-void 
+void
 TreeSource<TOutputTree>
 ::SetOutput(TOutputTree *output)
 {
@@ -101,7 +101,7 @@ TreeSource<TOutputTree>
  *
  */
 template<class TOutputTree>
-void 
+void
 TreeSource<TOutputTree>
 ::GenerateInputRequestedRegion()
 {
@@ -110,7 +110,7 @@ TreeSource<TOutputTree>
 
 
 /**
- * 
+ *
  */
 template<class TOutputTree>
 void
@@ -122,7 +122,7 @@ TreeSource<TOutputTree>
 
 
 /**
- * 
+ *
  */
 template<class TOutputTree>
 void
@@ -131,9 +131,9 @@ TreeSource<TOutputTree>
 {
   if ( idx >= this->GetNumberOfOutputs() )
     {
-    itkExceptionMacro(<<"Requested to graft output " << idx << 
+    itkExceptionMacro(<<"Requested to graft output " << idx <<
         " but this filter only has " << this->GetNumberOfOutputs() << " Outputs.");
-    }  
+    }
 
   if ( !graft )
     {
@@ -151,7 +151,7 @@ TreeSource<TOutputTree>
  *
  */
 template<class TOutputTree>
-void 
+void
 TreeSource<TOutputTree>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/FeatureExtraction/otbVectorizationPathListFilter.h b/Code/FeatureExtraction/otbVectorizationPathListFilter.h
index 5139f310f5..7593a93ad3 100644
--- a/Code/FeatureExtraction/otbVectorizationPathListFilter.h
+++ b/Code/FeatureExtraction/otbVectorizationPathListFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -49,20 +49,20 @@ class ITK_EXPORT VectorizationPathListFilter
   typedef PathListSource<TOutputPath>    Superclass;
   typedef itk::SmartPointer<Self>        Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(VectorizationPathListFilter, PathListSource);
-  
+
   /** 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;
@@ -71,7 +71,7 @@ class ITK_EXPORT VectorizationPathListFilter
 
   /** Derived typedefs */
   typedef typename Superclass::OutputPathListType OutputPathListType;
-  typedef typename Superclass::OutputPathListPointerType OutputPathListPointerType;  
+  typedef typename Superclass::OutputPathListPointerType OutputPathListPointerType;
 
   /** Set/get the input modulus */
   void SetInput(InputModulusType * inputModulus);
@@ -89,13 +89,13 @@ protected:
   /** Other internal useful typedefs */
   typedef otb::Image<bool,InputModulusType::ImageDimension> FlagImageType;
   typedef typename FlagImageType::Pointer FlagImagePointerType;
-  
+
   typedef itk::ImageRegionConstIterator<InputModulusType>   ModRegionIteratorType;
   typedef itk::ImageRegionConstIterator<InputDirectionType> DirRegionIteratorType;
   typedef itk::ImageRegionIterator<FlagImageType>           FlagRegionIteratorType;
 
   typedef itk::ConstantBoundaryCondition<InputModulusType>   ModBCType;
-  typedef itk::ConstantBoundaryCondition<InputDirectionType> DirBCType; 
+  typedef itk::ConstantBoundaryCondition<InputDirectionType> DirBCType;
   typedef itk::ConstantBoundaryCondition<FlagImageType>      FlagBCType;
 
   typedef itk::ConstNeighborhoodIterator<InputModulusType,ModBCType>   ModNeighborhoodIteratorType;
diff --git a/Code/FeatureExtraction/otbVectorizationPathListFilter.txx b/Code/FeatureExtraction/otbVectorizationPathListFilter.txx
index 9ad355efc1..55c0a58e30 100644
--- a/Code/FeatureExtraction/otbVectorizationPathListFilter.txx
+++ b/Code/FeatureExtraction/otbVectorizationPathListFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbVectorizationPathListFilter.h"
 #include "otbMacro.h"
-#include "otbMath.h" 
+#include "otbMath.h"
 
 namespace otb
 {
@@ -44,7 +44,7 @@ namespace otb
   }
   template <class TInputModulus, class TInputDirection, class TOutputPath>
   const typename VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
-  ::InputModulusType * 
+  ::InputModulusType *
   VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   ::GetInput(void)
   {
@@ -63,7 +63,7 @@ namespace otb
   }
   template <class TInputModulus, class TInputDirection, class TOutputPath>
   const typename VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
-  ::InputDirectionType * 
+  ::InputDirectionType *
   VectorizationPathListFilter<TInputModulus, TInputDirection, TOutputPath>
   ::GetInputDirection(void)
   {
@@ -84,7 +84,7 @@ namespace otb
     InputModulusConstPointerType modPtr = this->GetInput();
     InputDirectionConstPointerType dirPtr = this->GetInputDirection();
     OutputPathListPointerType outPtr = this->GetOutput();
-  
+
     typedef typename OffsetVectorType::iterator OffsetIteratorType;
 
     RadiusType radius;
@@ -101,7 +101,7 @@ namespace otb
     ModRegionIteratorType modIt(modPtr,modPtr->GetLargestPossibleRegion());
     DirRegionIteratorType dirIt(dirPtr,dirPtr->GetLargestPossibleRegion());
     FlagRegionIteratorType flagIt(flagImage,flagImage->GetLargestPossibleRegion());
-  
+
     for(modIt.GoToBegin(),dirIt.GoToBegin(),flagIt.GoToBegin();
 	(!modIt.IsAtEnd()) && (!dirIt.IsAtEnd()) && (!flagIt.IsAtEnd());
 	++modIt,++dirIt,++flagIt)
@@ -112,15 +112,15 @@ namespace otb
 	    OutputPathPointerType pathTempDirect = OutputPathType::New();
 	    OutputPathPointerType pathTempReverse = OutputPathType::New();
 	    OutputPathPointerType path = OutputPathType::New();
-	
+
 	    bool flagFinish;
 	    int  flagReverse = 0;
 	    double totalAmplitude = 0;
-	
+
 	    ModNeighborhoodIteratorType nModIt(radius,modPtr,modPtr->GetLargestPossibleRegion());
 	    DirNeighborhoodIteratorType nDirIt(radius,dirPtr,dirPtr->GetLargestPossibleRegion());
 	    FlagNeighborhoodIteratorType nFlagIt(radius,flagImage,flagImage->GetLargestPossibleRegion());
-	
+
 	    for (flagReverse=0; flagReverse < 2; ++flagReverse)
 	      {
 		nModIt.SetLocation(modIt.GetIndex());
@@ -147,7 +147,7 @@ namespace otb
 		    bool flagFound=false;
 		    while(vecIt!=offsetVector.end()&&!flagFound)
 		      {
-			flagFound = nModIt.GetPixel(*vecIt) > 0 
+			flagFound = nModIt.GetPixel(*vecIt) > 0
 			  && !nFlagIt.GetPixel(*vecIt);
 			++vecIt;
 		      }
@@ -188,7 +188,7 @@ namespace otb
 			    nModIt.SetLocation(newIndex);
 			    nDirIt.SetLocation(newIndex);
 			    nFlagIt.SetLocation(newIndex);
-			
+
 			    if(nModIt.GetCenterPixel()==0)
 			      {
 				//we need to check that in case the barycenter is out...
@@ -209,12 +209,12 @@ namespace otb
 		    else
 		      {
 			flagFinish=true;
-		      }    
+		      }
 		  }
 	      }
 	    VertexListPointerType vertexDirect = pathTempDirect->GetVertexList();
 	    VertexListPointerType vertexReverse = pathTempReverse->GetVertexList();
-	
+
 	    unsigned int numberVertex = 0;
 
 	    VertexIteratorType vertexReverseIt = vertexReverse->End();
@@ -227,14 +227,14 @@ namespace otb
 	      }
 	      path->AddVertex(vertexReverseIt.Value());
 	    }
-	
-	
+
+
 	    VertexIteratorType vertexDirectIt = vertexDirect->Begin();
 	    while ( vertexDirectIt != vertexDirect->End()){
 	      path->AddVertex(vertexDirectIt.Value());
 	      ++vertexDirectIt;
 	      ++numberVertex;
-	    }	
+	    }
 
 	    // otbMsgDebugMacro(<<"Path number of vertices: "<<numberVertex);
 
@@ -263,22 +263,22 @@ namespace otb
       {
 	//find the direction in terms of 0,1,2,3
 	neighborhoodNumber = (int) (direction/(M_PI/4)-1);
-      } 
-    else 
+      }
+    else
       {
 	neighborhoodNumber = (int) ((direction+M_PI)/(M_PI/4)-1);
-	neighborhoodNumber = (neighborhoodNumber + 4); 
+	neighborhoodNumber = (neighborhoodNumber + 4);
 	//if the direction was <0 need to convert to 4,5,6,7
       }
-    if (flagReverse) 
+    if (flagReverse)
       {
 	//if the reverse flag is activated we need to look on the other side
 	neighborhoodNumber = (neighborhoodNumber + 4) % 8;
       }
     OffsetType tmpOffset;
-    switch( neighborhoodNumber ) 
+    switch( neighborhoodNumber )
       {
-      case 0: 
+      case 0:
 	tmpOffset[0]=1;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
@@ -288,7 +288,7 @@ namespace otb
 	tmpOffset[0]=0;
 	tmpOffset[1]=1;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]=2;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
@@ -304,9 +304,9 @@ namespace otb
 	tmpOffset[0]=0;
 	tmpOffset[1]=2;
 	offset.push_back(tmpOffset);
-       
+
 	break;
-     
+
       case 1:
 	tmpOffset[0]=1;
 	tmpOffset[1]=1;
@@ -317,7 +317,7 @@ namespace otb
 	tmpOffset[0]=-1;
 	tmpOffset[1]=1;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]=2;
 	tmpOffset[1]=2;
 	offset.push_back(tmpOffset);
@@ -332,9 +332,9 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]=-2;
 	tmpOffset[1]=2;
-	offset.push_back(tmpOffset);     
+	offset.push_back(tmpOffset);
 	break;
-     
+
       case 2:
 	tmpOffset[0]=0;
 	tmpOffset[1]=1;
@@ -345,7 +345,7 @@ namespace otb
 	tmpOffset[0]=-1;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]=0;
 	tmpOffset[1]=2;
 	offset.push_back(tmpOffset);
@@ -360,9 +360,9 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]=-2;
 	tmpOffset[1]=0;
-	offset.push_back(tmpOffset);            
+	offset.push_back(tmpOffset);
 	break;
-     
+
       case 3:
 	tmpOffset[0]=-1;
 	tmpOffset[1]=1;
@@ -373,7 +373,7 @@ namespace otb
 	tmpOffset[0]=-1;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]=-2;
 	tmpOffset[1]=2;
 	offset.push_back(tmpOffset);
@@ -388,10 +388,10 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]=-2;
 	tmpOffset[1]=-2;
-	offset.push_back(tmpOffset);          
+	offset.push_back(tmpOffset);
 	break;
-     
-      case 4: 
+
+      case 4:
 	tmpOffset[0]=-1;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
@@ -401,7 +401,7 @@ namespace otb
 	tmpOffset[0]=0;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]=-2;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
@@ -416,9 +416,9 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]=0;
 	tmpOffset[1]=-2;
-	offset.push_back(tmpOffset);              
+	offset.push_back(tmpOffset);
 	break;
-     
+
       case 5:
 	tmpOffset[0]=-1;
 	tmpOffset[1]=-1;
@@ -429,7 +429,7 @@ namespace otb
 	tmpOffset[0]=1;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]=-2;
 	tmpOffset[1]=-2;
 	offset.push_back(tmpOffset);
@@ -444,9 +444,9 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]=2;
 	tmpOffset[1]=-2;
-	offset.push_back(tmpOffset);             
+	offset.push_back(tmpOffset);
 	break;
-     
+
       case 6:
 	tmpOffset[0]= 0;
 	tmpOffset[1]=-1;
@@ -457,7 +457,7 @@ namespace otb
 	tmpOffset[0]= 1;
 	tmpOffset[1]= 0;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]= 0;
 	tmpOffset[1]=-2;
 	offset.push_back(tmpOffset);
@@ -472,10 +472,10 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]= 2;
 	tmpOffset[1]= 0;
-	offset.push_back(tmpOffset);   
+	offset.push_back(tmpOffset);
 	break;
-     
-      case 7:	
+
+      case 7:
 	tmpOffset[0]= 1;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
@@ -485,7 +485,7 @@ namespace otb
 	tmpOffset[0]= 1;
 	tmpOffset[1]= 1;
 	offset.push_back(tmpOffset);
-       
+
 	tmpOffset[0]= 2;
 	tmpOffset[1]=-2;
 	offset.push_back(tmpOffset);
@@ -500,8 +500,8 @@ namespace otb
 	offset.push_back(tmpOffset);
 	tmpOffset[0]= 2;
 	tmpOffset[1]= 2;
-	offset.push_back(tmpOffset);        
-	break;                  
+	offset.push_back(tmpOffset);
+	break;
       }
     return offset;
   }/**
@@ -523,22 +523,22 @@ namespace otb
       {
 	//find the direction in terms of 0,1,2,3
 	neighborhoodNumber = (int) (direction/(M_PI/4)-1);
-      } 
-    else 
+      }
+    else
       {
 	neighborhoodNumber = (int) ((direction+M_PI)/(M_PI/4)-1);
-	neighborhoodNumber = (neighborhoodNumber + 4); 
+	neighborhoodNumber = (neighborhoodNumber + 4);
 	//if the direction was <0 need to convert to 4,5,6,7
       }
-    if (flagReverse) 
+    if (flagReverse)
       {
 	//if the reverse flag is activated we need to look on the other side
 	neighborhoodNumber = (neighborhoodNumber + 4) % 8;
       }
     OffsetType tmpOffset;
-    switch( neighborhoodNumber ) 
+    switch( neighborhoodNumber )
       {
-          case 0: 
+          case 0:
 	tmpOffset[0]=1;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
@@ -548,9 +548,9 @@ namespace otb
 	tmpOffset[0]=0;
 	tmpOffset[1]=1;
 	offset.push_back(tmpOffset);
-       
+
 	break;
-     
+
       case 1:
 	tmpOffset[0]=1;
 	tmpOffset[1]=1;
@@ -561,9 +561,9 @@ namespace otb
 	tmpOffset[0]=-1;
 	tmpOffset[1]=1;
 	offset.push_back(tmpOffset);
-         
+
 	break;
-     
+
       case 2:
 	tmpOffset[0]=0;
 	tmpOffset[1]=1;
@@ -574,9 +574,9 @@ namespace otb
 	tmpOffset[0]=-1;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
-       
+
 	break;
-     
+
       case 3:
 	tmpOffset[0]=-1;
 	tmpOffset[1]=1;
@@ -587,10 +587,10 @@ namespace otb
 	tmpOffset[0]=-1;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
-       
+
 	break;
-     
-      case 4: 
+
+      case 4:
 	tmpOffset[0]=-1;
 	tmpOffset[1]=0;
 	offset.push_back(tmpOffset);
@@ -600,9 +600,9 @@ namespace otb
 	tmpOffset[0]=0;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
-       
+
 	break;
-     
+
       case 5:
 	tmpOffset[0]=-1;
 	tmpOffset[1]=-1;
@@ -613,9 +613,9 @@ namespace otb
 	tmpOffset[0]=1;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
-                   
+
 	break;
-     
+
       case 6:
 	tmpOffset[0]= 0;
 	tmpOffset[1]=-1;
@@ -626,10 +626,10 @@ namespace otb
 	tmpOffset[0]= 1;
 	tmpOffset[1]= 0;
 	offset.push_back(tmpOffset);
-       
+
 	break;
-     
-      case 7:	
+
+      case 7:
 	tmpOffset[0]= 1;
 	tmpOffset[1]=-1;
 	offset.push_back(tmpOffset);
@@ -639,8 +639,8 @@ namespace otb
 	tmpOffset[0]= 1;
 	tmpOffset[1]= 1;
 	offset.push_back(tmpOffset);
-       
-	break;          
+
+	break;
       }
     return offset;
   }
diff --git a/Code/Fusion/otbBayesianFusionFilter.h b/Code/Fusion/otbBayesianFusionFilter.h
index edb660ca4a..2faba1895d 100644
--- a/Code/Fusion/otbBayesianFusionFilter.h
+++ b/Code/Fusion/otbBayesianFusionFilter.h
@@ -10,7 +10,7 @@
   See OTBCopyright.txt for details.
 
   This code is from a Julien Radoux contribution.
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -42,9 +42,9 @@ namespace otb
        * \brief Functor for the bayesian fusion filter. Please refer to BayesianFusionFilter.
        *
        */
-      template <class TInputMultiSpectral, 
-	        class TInputMultiSpectralInterp, 
-	        class TInputPanchro, 
+      template <class TInputMultiSpectral,
+	        class TInputMultiSpectralInterp,
+	        class TInputPanchro,
 	        class TOutput>
 	class BayesianFunctor
 	{
@@ -69,7 +69,7 @@ namespace otb
 
 
 
-	  inline TOutput operator() (const TInputMultiSpectral & ms, const TInputMultiSpectralInterp & msi, const TInputPanchro & p) 
+	  inline TOutput operator() (const TInputMultiSpectral & ms, const TInputMultiSpectralInterp & msi, const TInputPanchro & p)
 	    {
 	      TOutput obs;
 	      obs.SetSize(msi.GetSize());
@@ -92,22 +92,22 @@ namespace otb
 	       *  To modify using + method operator. If we use it now -> exceptionmacro (no GetClassName...)
 	       * obsMat += PanVect;
 	       **/
-	      if( (obsMat.Cols() != PanVect.Cols()) || (obsMat.Rows() != PanVect.Rows()) ) 
-		{ 
-		  itkGenericExceptionMacro( << "Matrix with size (" << obsMat.Rows() << "," << 
+	      if( (obsMat.Cols() != PanVect.Cols()) || (obsMat.Rows() != PanVect.Rows()) )
+		{
+		  itkGenericExceptionMacro( << "Matrix with size (" << obsMat.Rows() << "," <<
 				     obsMat.Cols() << ") cannot be subtracted from matrix with size (" <<
 				     PanVect.Rows() << "," << PanVect.Cols() << " )" );
 		}
-	      
-	      for( unsigned int r=0; r<obsMat.Rows(); r++) 
+
+	      for( unsigned int r=0; r<obsMat.Rows(); r++)
 		{
-		  for( unsigned int c=0; c<obsMat.Cols(); c++ ) 
+		  for( unsigned int c=0; c<obsMat.Cols(); c++ )
 		    {
 		      obsMat(r,c) += PanVect(r,c);
 		    }
 		}
 	      //**** END TODO ****/
-	      obsMat *= m_Vcondopt; 
+	      obsMat *= m_Vcondopt;
 	      for (unsigned int i=0; i<obs.GetSize();i++)
 		{
 		  obs[i] = static_cast<typename TOutput::ValueType>(obsMat(0U,i));
@@ -126,17 +126,17 @@ namespace otb
     }
 
   /***** TODO ***
-   * Complete the description with J. Radoux text 
+   * Complete the description with J. Radoux text
    */
    /***** END TODO ***/
 
-    
+
   /** \class BayesianFusionFilter
    * \brief Bayesian fusion filter. Contribution of Julien Radoux
    *
-   * Please refer to D. Fasbender, J. Radoux and P. Bogaert, 
+   * Please refer to D. Fasbender, J. Radoux and P. Bogaert,
    * Bayesian Data Fusion for Adaptable Image Pansharpening,
-   * Transactions on Geoscience and Remote Sensing, 
+   * Transactions on Geoscience and Remote Sensing,
    * vol. 46, n. 6, 2007, pp 1847-1857
    *
    * \sa FusionImageBase
@@ -145,27 +145,27 @@ namespace otb
    * \ingroup Streamed
    * \ingroup Multithreaded
    * \ingroup MathematicalStatisticsImageFilters
-   * 
+   *
    * \ingroup Fusion
-   * 
-   * 
+   *
+   *
    * \example Fusion/BayesianFusionImageFilter.cxx
-   * 
+   *
    *
    */
 
-template <class TInputMultiSpectralImage, 
-          class TInputMultiSpectralInterpImage, 
-          class TInputPanchroImage, 
+template <class TInputMultiSpectralImage,
+          class TInputMultiSpectralInterpImage,
+          class TInputPanchroImage,
           class TOutputImage>
-class ITK_EXPORT BayesianFusionFilter 
-  :  public FusionImageBase<TInputMultiSpectralImage, 
-                                 TInputMultiSpectralInterpImage, 
-                                 TInputPanchroImage, 
-                                 TOutputImage, 
+class ITK_EXPORT BayesianFusionFilter
+  :  public FusionImageBase<TInputMultiSpectralImage,
+                                 TInputMultiSpectralInterpImage,
+                                 TInputPanchroImage,
+                                 TOutputImage,
                                  Functor::BayesianFunctor<ITK_TYPENAME TInputMultiSpectralImage::PixelType,
                          	                          ITK_TYPENAME TInputMultiSpectralInterpImage::PixelType,
-	                                                  ITK_TYPENAME TInputPanchroImage::PixelType, 
+	                                                  ITK_TYPENAME TInputPanchroImage::PixelType,
 	                                                  ITK_TYPENAME TOutputImage::PixelType>                    >
 {
 public:
@@ -185,11 +185,11 @@ public:
   typedef BayesianFusionFilter Self;
   typedef FusionImageBase< InputMultiSpectralImageType,
                            InputMultiSpectralInterpImageType,
-                           InputPanchroImageType, 
-                           OutputImageType, 
+                           InputPanchroImageType,
+                           OutputImageType,
                            Functor::BayesianFunctor<ITK_TYPENAME InputMultiSpectralImageType::PixelType,
                          	                    ITK_TYPENAME InputMultiSpectralInterpImageType::PixelType,
-	                                            ITK_TYPENAME InputPanchroImageType::PixelType, 
+	                                            ITK_TYPENAME InputPanchroImageType::PixelType,
 	                                            ITK_TYPENAME OutputImageType::PixelType> > Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
@@ -199,7 +199,7 @@ public:
 
   /** return class name. */
   itkTypeMacro(BayesianFusionFilter, FusionImageBase);
-  
+
   /** Supported images definition. */
   typedef typename InputMultiSpectralImageType::PixelType                InputMultiSpectralPixelType;
   typedef typename InputMultiSpectralImageType::InternalPixelType        InputMultiSpectralInternalPixelType;
@@ -208,7 +208,7 @@ public:
   typedef typename InputPanchroImageType::PixelType                      InputPanchroPixelType;
   typedef typename OutputImageType::PixelType                            OutputPixelType;
   typedef typename OutputImageType::InternalPixelType                    OutputInternalPixelType;
- 
+
   /** Real class typedef definition. */
   typedef typename itk::NumericTraits<InputPanchroPixelType>::RealType                     InputPanchroRealType;
   typedef typename itk::NumericTraits<InputMultiSpectralInternalPixelType>::RealType       InputMultiSpectralRealType;
@@ -217,7 +217,7 @@ public:
   typedef typename InputMultiSpectralInterpImageType::RegionType                           InputMultiSpectralInterpImageRegionType;
   typedef typename InputPanchroImageType::RegionType                                       InputPanchroImageRegionType;
   typedef typename OutputImageType::RegionType                                             OutputImageRegionType;
-  
+
 
   /** Image size "typedef" definition. */
   typedef typename InputMultiSpectralImageType::SizeType SizeType;
@@ -259,7 +259,7 @@ public:
   itkSetMacro(S, float);
   /** Give the S coefficient. */
   itkGetConstReferenceMacro(S, float);
-  
+
 protected:
   BayesianFusionFilter();
   virtual ~BayesianFusionFilter();
@@ -270,7 +270,7 @@ protected:
   /** Call the superclass implementation and set the StatisticsHaveBeenGenerated
    * flag to false */
   virtual void Modified(void);
-   
+
 private:
   /** Ponderation declaration*/
   float m_Lambda;
diff --git a/Code/Fusion/otbBayesianFusionFilter.txx b/Code/Fusion/otbBayesianFusionFilter.txx
index f91cc96de9..17b5ec7fb1 100644
--- a/Code/Fusion/otbBayesianFusionFilter.txx
+++ b/Code/Fusion/otbBayesianFusionFilter.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -27,14 +27,14 @@
 
 namespace otb
 {
-  
-  template <class TInputMultiSpectralImage, 
-	    class TInputMultiSpectralInterpImage, 
-	    class TInputPanchroImage,  
+
+  template <class TInputMultiSpectralImage,
+	    class TInputMultiSpectralInterpImage,
+	    class TInputPanchroImage,
 	    class TOutputImage>
-  BayesianFusionFilter<TInputMultiSpectralImage, 
-		       TInputMultiSpectralInterpImage,  
-		       TInputPanchroImage, 
+  BayesianFusionFilter<TInputMultiSpectralImage,
+		       TInputMultiSpectralInterpImage,
+		       TInputPanchroImage,
 		       TOutputImage>
   ::BayesianFusionFilter()
   {
@@ -42,64 +42,64 @@ namespace otb
     m_S = 1;
      m_StatisticsHaveBeenGenerated = false;
   }
-  
-  
-  template <class TInputMultiSpectralImage, 
-	    class TInputMultiSpectralInterpImage, 
-	    class TInputPanchroImage,  
+
+
+  template <class TInputMultiSpectralImage,
+	    class TInputMultiSpectralInterpImage,
+	    class TInputPanchroImage,
 	    class TOutputImage>
-  BayesianFusionFilter<TInputMultiSpectralImage, 
-		       TInputMultiSpectralInterpImage,  
-		       TInputPanchroImage, 
+  BayesianFusionFilter<TInputMultiSpectralImage,
+		       TInputMultiSpectralInterpImage,
+		       TInputPanchroImage,
 		       TOutputImage>
   ::~BayesianFusionFilter()
   {
-    
+
   }
-  template <class TInputMultiSpectralImage, 
-  class TInputMultiSpectralInterpImage, 
-  class TInputPanchroImage,  
+  template <class TInputMultiSpectralImage,
+  class TInputMultiSpectralInterpImage,
+  class TInputPanchroImage,
   class TOutputImage>
       void
-      BayesianFusionFilter<TInputMultiSpectralImage, 
-      TInputMultiSpectralInterpImage,  
-      TInputPanchroImage, 
+      BayesianFusionFilter<TInputMultiSpectralImage,
+      TInputMultiSpectralInterpImage,
+      TInputPanchroImage,
       TOutputImage>
   ::Modified()
       {
        Superclass::Modified();
-        m_StatisticsHaveBeenGenerated = false; 
+        m_StatisticsHaveBeenGenerated = false;
       }
-  
-  template <class TInputMultiSpectralImage, 
-	    class TInputMultiSpectralInterpImage, 
-	    class TInputPanchroImage,  
+
+  template <class TInputMultiSpectralImage,
+	    class TInputMultiSpectralInterpImage,
+	    class TInputPanchroImage,
 	    class TOutputImage>
   void
-  BayesianFusionFilter<TInputMultiSpectralImage, 
-		       TInputMultiSpectralInterpImage,  
-		       TInputPanchroImage, 
+  BayesianFusionFilter<TInputMultiSpectralImage,
+		       TInputMultiSpectralInterpImage,
+		       TInputPanchroImage,
 		       TOutputImage>
   ::BeforeThreadedGenerateData ()
-  {	
+  {
     if(!m_StatisticsHaveBeenGenerated)
     {
      this->ComputeInternalStatistics();
      m_StatisticsHaveBeenGenerated = true;
     }
   }
-  
-  template <class TInputMultiSpectralImage, 
-  class TInputMultiSpectralInterpImage, 
-  class TInputPanchroImage,  
+
+  template <class TInputMultiSpectralImage,
+  class TInputMultiSpectralInterpImage,
+  class TInputPanchroImage,
   class TOutputImage>
       void
-      BayesianFusionFilter<TInputMultiSpectralImage, 
-      TInputMultiSpectralInterpImage,  
-      TInputPanchroImage, 
+      BayesianFusionFilter<TInputMultiSpectralImage,
+      TInputMultiSpectralInterpImage,
+      TInputPanchroImage,
       TOutputImage>
   ::ComputeInternalStatistics()
-        {	
+        {
       OutputImageRegionType msiRequestedRegion = this->GetMultiSpectInterp()->GetRequestedRegion();
     OutputImageRegionType msRequestedRegion = this->GetMultiSpect()->GetRequestedRegion();
     OutputImageRegionType panchroRequestedRegion = this->GetPanchro()->GetRequestedRegion();
@@ -116,10 +116,10 @@ namespace otb
 
     m_CovarianceMatrix.SetSize( multiSpecInterp->GetNumberOfComponentsPerPixel(), multiSpecInterp->GetNumberOfComponentsPerPixel() );
     m_CovarianceMatrix.Fill(itk::NumericTraits<InputMultiSpectralInterpRealType>::Zero);
-  
+
     m_CovarianceInvMatrix.SetSize( multiSpecInterp->GetNumberOfComponentsPerPixel(), multiSpecInterp->GetNumberOfComponentsPerPixel() );
     m_CovarianceInvMatrix.Fill(itk::NumericTraits<InputMultiSpectralInterpRealType>::Zero);
-  
+
     m_Vcondopt.SetSize( multiSpecInterp->GetNumberOfComponentsPerPixel(), multiSpecInterp->GetNumberOfComponentsPerPixel() );
     m_Vcondopt.Fill(itk::NumericTraits<InputMultiSpectralInterpRealType>::Zero);
     /** Compute the inverse of the multispectral interpolated image covariance matrix   */
@@ -127,8 +127,8 @@ namespace otb
 
     covComputefilter->SetInput(multiSpecInterp);
     covComputefilter->Update();
-    
-    
+
+
     MatrixType m_CovarianceMatrix = covComputefilter->GetCovariance();
     otbMsgDebugMacro(<<"Covariance: "<<m_CovarianceMatrix);
 
@@ -142,57 +142,57 @@ namespace otb
     typename MSTransposeMSType::Pointer  msTransposeMs  = MSTransposeMSType::New();
     // Compute the transpose multispectral image multiplied by the panchromatic one
     typename MSTransposeMSType::Pointer  msTransposePan  = MSTransposeMSType::New();
-    // Add a dimension filled with ones to the images 
+    // Add a dimension filled with ones to the images
     msTransposeMs->SetUsePadFirstInput(true);
     msTransposeMs->SetUsePadSecondInput(true);
     msTransposePan->SetUsePadFirstInput(true);
 
     msTransposeMs->SetFirstInput(multiSpec);
     msTransposeMs->SetSecondInput(multiSpec);
-    
+
     msTransposePan->SetFirstInput(multiSpec);
     msTransposePan->SetSecondInput( caster->GetOutput() );
-    
+
     msTransposeMs->Update();
     otbMsgDebugMacro(<<"MsTMs: "<<msTransposeMs->GetResultOutput()->Get());
     msTransposePan->Update();
-    otbMsgDebugMacro(<<"MsTPan: "<<msTransposePan->GetResultOutput()->Get()); 
-    
+    otbMsgDebugMacro(<<"MsTPan: "<<msTransposePan->GetResultOutput()->Get());
+
     MatrixType temp;
     temp = msTransposeMs->GetResultOutput()->Get().GetInverse();
     m_Beta = temp*msTransposePan->GetResultOutput()->Get();
-    
+
     // S computation : quadratique mean of the regression residue
     // Compute the transpose panchromatic image multiplied by itself
     typename MSTransposeMSType::Pointer  panTransposePan  = MSTransposeMSType::New();
     panTransposePan->SetFirstInput(caster->GetOutput());
     panTransposePan->SetSecondInput(caster->GetOutput());
     panTransposePan->Update();
-    otbMsgDebugMacro(<<"PanTPan: "<<msTransposePan->GetResultOutput()->Get()); 
+    otbMsgDebugMacro(<<"PanTPan: "<<msTransposePan->GetResultOutput()->Get());
     MatrixType S, tempS, tempS2;
     S = panTransposePan->GetResultOutput()->Get();
     tempS = msTransposePan->GetResultOutput()->Get().GetTranspose();
     tempS = tempS*m_Beta;
-    
+
     /** TODO
      *  To modify using - method operator. If we use it now -> exceptionmacro (no GetClassName...)
      *  S = S-tempS;
      **/
     if( (S.Rows() != tempS.Rows()) || (S.Cols() != tempS.Cols()))
-      { 
-	itkExceptionMacro( << "Matrix with size (" << S.Rows() << "," << 
+      {
+	itkExceptionMacro( << "Matrix with size (" << S.Rows() << "," <<
 			   S.Cols() << ") cannot be subtracted from matrix with size (" <<
 			   tempS.Rows() << "," << tempS.Cols() <<" )" );
       }
-    for( unsigned int r=0; r<S.Rows(); r++) 
+    for( unsigned int r=0; r<S.Rows(); r++)
       {
-	for( unsigned int c=0; c<S.Cols(); c++ ) 
+	for( unsigned int c=0; c<S.Cols(); c++ )
 	  {
 	    S(r,c) -= tempS(r,c);
 	  }
       }
     //**** END TODO ****/
-    
+
     tempS = m_Beta.GetTranspose();
     tempS2 =  msTransposePan->GetResultOutput()->Get();
     tempS = tempS*tempS2;
@@ -201,22 +201,22 @@ namespace otb
      *  S = S-tempS;
      **/
     if( (S.Rows() != tempS.Rows()) || (S.Cols() != tempS.Cols()) )
-      { 
-	itkExceptionMacro( << "Matrix with size (" << S.Rows() << "," << 
+      {
+	itkExceptionMacro( << "Matrix with size (" << S.Rows() << "," <<
 			   S.Cols() << ") cannot be subtracted from matrix with size (" <<
 			   tempS.Rows() << "," << tempS.Cols() << " )" );
-	
+
       }
-    for( unsigned int r=0; r<S.Rows(); r++) 
+    for( unsigned int r=0; r<S.Rows(); r++)
       {
-	for( unsigned int c=0; c<S.Cols(); c++ ) 
+	for( unsigned int c=0; c<S.Cols(); c++ )
 	  {
 	    S(r,c) -= tempS(r,c);
 	  }
       }
     //**** END TODO ****/
-    
-    
+
+
     MatrixType xxT, xxTb, xxTbT, xxTbTb;
     xxT = msTransposeMs->GetResultOutput()->Get().GetTranspose();
     xxTb = xxT*m_Beta;
@@ -226,22 +226,22 @@ namespace otb
      *  To modify using - method operator. If we use it now -> exceptionmacro (no GetClassName...)
      * S = S-xxTbTb;
      **/
-    if( (S.Cols() != xxTbTb.Cols()) || (S.Cols() != xxTbTb.Cols()) ) 
-      { 
-	itkExceptionMacro( << "Matrix with size (" << S.Rows() << "," << 
+    if( (S.Cols() != xxTbTb.Cols()) || (S.Cols() != xxTbTb.Cols()) )
+      {
+	itkExceptionMacro( << "Matrix with size (" << S.Rows() << "," <<
 			   S.Cols() << ") cannot be subtracted from matrix with size (" <<
 			   xxTbTb.Rows() << "," << xxTbTb.Cols() << " )" );
       }
-    
-    for( unsigned int r=0; r<S.Rows(); r++) 
+
+    for( unsigned int r=0; r<S.Rows(); r++)
       {
-	for( unsigned int c=0; c<S.Cols(); c++ ) 
+	for( unsigned int c=0; c<S.Cols(); c++ )
 	  {
 	    S(r,c) += xxTbTb(r,c);
 	  }
       }
     //**** END TODO ****/
-    
+
     unsigned int size1 = multiSpec->GetLargestPossibleRegion().GetSize()[0]*multiSpec->GetLargestPossibleRegion().GetSize()[1];
     unsigned int size2 = multiSpec->GetNumberOfComponentsPerPixel()+1;
     m_S = S(0,0);
@@ -255,7 +255,7 @@ namespace otb
     cutBeta.SetSize(multiSpecInterp->GetNumberOfComponentsPerPixel(), 1);
     cutBeta.Fill(itk::NumericTraits<InputMultiSpectralInterpRealType>::Zero);
     // Take the N-1 m_Beta last elements
-    for( unsigned int r=1; r<m_Beta.Rows(); r++ ) 
+    for( unsigned int r=1; r<m_Beta.Rows(); r++ )
       {
 	cutBeta(r-1,0) = m_Beta(r,0);
       }
@@ -270,7 +270,7 @@ namespace otb
     MatrixType eye;
     eye.SetSize(multiSpecInterp->GetNumberOfComponentsPerPixel(), multiSpecInterp->GetNumberOfComponentsPerPixel());
     eye.Fill(itk::NumericTraits<InputMultiSpectralInterpRealType>::Zero);
-    for( unsigned int r=1; r<eye.Rows(); r++) 
+    for( unsigned int r=1; r<eye.Rows(); r++)
       {
 	eye(r,r) = vcl_pow(10., -12.);
       }
@@ -279,17 +279,17 @@ namespace otb
      *  To modify using + method operator. If we use it now -> exceptionmacro (no GetClassName...)
      *  m_Vcondopt = 2 *m_Lambda*varPan+2*m_CovarianceInvMatrix*(1-m_Lambda)+eye;
      **/
-    if( (m_Vcondopt.Cols() != varPan.Cols()) || (m_Vcondopt.Cols() != varPan.Cols()) 
-	|| (m_Vcondopt.Cols() != m_CovarianceInvMatrix.Cols()) || (m_Vcondopt.Cols() != m_CovarianceInvMatrix.Cols())) 
-      { 
-	itkExceptionMacro( << "Matrix with size (" << m_Vcondopt.Rows() << "," << 
+    if( (m_Vcondopt.Cols() != varPan.Cols()) || (m_Vcondopt.Cols() != varPan.Cols())
+	|| (m_Vcondopt.Cols() != m_CovarianceInvMatrix.Cols()) || (m_Vcondopt.Cols() != m_CovarianceInvMatrix.Cols()))
+      {
+	itkExceptionMacro( << "Matrix with size (" << m_Vcondopt.Rows() << "," <<
 			 m_Vcondopt.Cols() << ") cannot be subtracted from matrix with size (" <<
-			   varPan.Rows() << "," << varPan.Cols() << " ) or ( " << 
+			   varPan.Rows() << "," << varPan.Cols() << " ) or ( " <<
 			 m_CovarianceInvMatrix.Rows() << "," << m_CovarianceInvMatrix.Cols()<<")"  );
       }
-    for( unsigned int r=0; r<m_Vcondopt.Rows(); r++) 
+    for( unsigned int r=0; r<m_Vcondopt.Rows(); r++)
       {
-	for( unsigned int c=0; c<m_Vcondopt.Cols(); c++ ) 
+	for( unsigned int c=0; c<m_Vcondopt.Cols(); c++ )
 	  {
 	    m_Vcondopt(r,c) = 2 *m_Lambda*varPan(r,c)
 	      +2*m_CovarianceInvMatrix(r,c)*(1-m_Lambda)
@@ -318,9 +318,9 @@ namespace otb
 
    panchro->SetRequestedRegion(panchroRequestedRegion);
    panchro->PropagateRequestedRegion();
-   panchro->UpdateOutputData(); 
-   
-  } 
+   panchro->UpdateOutputData();
+
+  }
 } // end namespace otb
 
 #endif
diff --git a/Code/Fusion/otbFusionImageBase.h b/Code/Fusion/otbFusionImageBase.h
index 147b606dfd..72e4c93776 100644
--- a/Code/Fusion/otbFusionImageBase.h
+++ b/Code/Fusion/otbFusionImageBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
   /** \class FusionImageBase
    * Basic class for every Fusion classes.
    * \sa TernaryFunctorImageFilter
-   */	
+   */
   template <class TInputMultiSpectralImage, class TInputMultiSpectralInterpImage, class TInputPanchroImage, class TOutputImage, class TFunctor>
     class ITK_EXPORT FusionImageBase :  public itk::TernaryFunctorImageFilter<TInputMultiSpectralImage, TInputMultiSpectralInterpImage, TInputPanchroImage, TOutputImage, TFunctor>
     {
@@ -35,30 +35,30 @@ namespace otb
       /** 	Extract input and output images dimensions.*/
       itkStaticConstMacro( InputImageDimension,unsigned int, TInputMultiSpectralImage::ImageDimension);
       itkStaticConstMacro( OutputImageDimension,unsigned int, TOutputImage::ImageDimension);
-      
+
       /** "typedef" to simplify the variables definition and the declaration. */
       typedef TInputMultiSpectralImage       InputMultiSpectralImageType;
       typedef TInputMultiSpectralInterpImage InputMultiSpectralInterpImageType;
       typedef TInputPanchroImage             InputPanchroImageType;
       typedef TOutputImage                   OutputImageType;
       typedef TFunctor                       FunctorType;
-      
+
       /** "typedef" for standard classes. */
       typedef FusionImageBase Self;
-      typedef itk::TernaryFunctorImageFilter< InputMultiSpectralImageType, 
-	                                      InputMultiSpectralInterpImageType, 
-                                              InputPanchroImageType, 
-                                              OutputImageType, 
+      typedef itk::TernaryFunctorImageFilter< InputMultiSpectralImageType,
+	                                      InputMultiSpectralInterpImageType,
+                                              InputPanchroImageType,
+                                              OutputImageType,
                                               FunctorType> Superclass;
       typedef itk::SmartPointer<Self> Pointer;
       typedef itk::SmartPointer<const Self>  ConstPointer;
-      
+
       /** object factory method. */
       itkNewMacro(Self);
-      
+
       /** return class name. */
       itkTypeMacro(FusionImageBase, TernaryFunctorImageFilter);
-      
+
       /** Supported images definition. */
       typedef typename InputMultiSpectralImageType::PixelType       InputMultiSpectralPixelType;
       typedef typename InputMultiSpectralInterpImageType::PixelType InputMultiSpectralInterpPixelType;
@@ -72,10 +72,10 @@ namespace otb
       typedef typename InputMultiSpectralInterpImageType::RegionType                    InputMultiSpectralInterpImageRegionType;
       typedef typename InputPanchroImageType::RegionType                                InputPanchroImageRegionType;
       typedef typename OutputImageType::RegionType                                      OutputImageRegionType;
-      
+
       /** Image size "typedef" definition. */
       typedef typename InputMultiSpectralImageType::SizeType SizeType;
-      
+
 
       void SetMultiSpect(const InputMultiSpectralImageType *multiSpect){ this->SetInput1( multiSpect ); };
       void SetMultiSpectInterp(const InputMultiSpectralInterpImageType *multiSpectInterp){ this->SetInput2( multiSpectInterp ); };
@@ -111,9 +111,9 @@ namespace otb
 	    return( static_cast<const InputPanchroImageType *>(this->itk::ProcessObject::GetInput(2)) );
 	}
 
-      
+
     };
-  
+
 } // end namespace otb
 
 
diff --git a/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.h b/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.h
index 73da045a95..547c93b3a2 100644
--- a/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.h
+++ b/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -25,16 +25,16 @@
 #include "otbConvolutionImageFilter.h"
 #include "itkDivideImageFilter.h"
 #include "itkMultiplyImageFilter.h"
-    
+
 namespace otb {
   /**
    * \class SimpleRcsPanSharpeningFusionImageFilter
    * \brief This class performs a simple Pan sharpening operation
-   * 
+   *
    * Given a Pan image and the corresponding Xs image (oversampled to have the
-   * same number of pixels), this filter realizes a simple Pan sharpening 
+   * same number of pixels), this filter realizes a simple Pan sharpening
    * operation:
-   * 
+   *
    * \f[ \frac{XS}{\mathrm{Filtered}(PAN)} PAN  \f]
    *
    * \ingroup Streamed
@@ -58,37 +58,37 @@ class ITK_EXPORT SimpleRcsPanSharpeningFusionImageFilter :
           typedef itk::SmartPointer<const Self>       ConstPointer;
           typedef otb::Image<double,2>                InternalImageType;
           typedef otb::VectorImage<double>            InternalVectorImageType;
-          
+
           typedef typename InternalImageType::PixelType InternalPixelType;
           typedef typename itk::NumericTraits<InternalPixelType>::RealType InternalRealType;
           typedef typename itk::Array<InternalRealType> ArrayType;
-          
+
           /** Method for creation through object factory */
           itkNewMacro(Self);
 
           /** Run-time type information */
-          itkTypeMacro(SimpleRcsPanSharpeningFusionImageFilter, 
+          itkTypeMacro(SimpleRcsPanSharpeningFusionImageFilter,
                        itk::ImageToImageFilter);
 
           /** Display */
           void PrintSelf( std::ostream& os, itk::Indent indent ) const;
-          
+
           typedef typename InternalImageType::SizeType RadiusType;
-          
+
           /** Set the filter radius  */
           itkGetMacro( Radius, RadiusType);
           itkSetMacro( Radius, RadiusType);
-          
+
           /** Set the input filter */
           itkSetMacro(Filter, ArrayType);
           itkGetConstReferenceMacro(Filter, ArrayType);
-          
+
           virtual void SetPanInput( const TPanImageType * image);
           const TPanImageType * GetPanInput(void) const;
-             
+
           virtual void SetXsInput( const TXsImageType * path);
           const TXsImageType * GetXsInput(void) const;
-          
+
         protected:
 
           SimpleRcsPanSharpeningFusionImageFilter();
@@ -100,7 +100,7 @@ class ITK_EXPORT SimpleRcsPanSharpeningFusionImageFilter :
               InternalVectorImageType> DivideFilterType;
           typedef itk::MultiplyImageFilter
               <InternalVectorImageType,TPanImageType,TOutputImageType> MultiplyFilterType;
-              
+
 
 //  Software Guide : EndCodeSnippet
 
@@ -117,9 +117,9 @@ class ITK_EXPORT SimpleRcsPanSharpeningFusionImageFilter :
 
           RadiusType m_Radius;
           ArrayType m_Filter;
-          
+
       };
-      
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx b/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx
index 210f736ef3..a83ad7e2fd 100644
--- a/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx
+++ b/Code/Fusion/otbSimpleRcsPanSharpeningFusionImageFilter.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -36,17 +36,17 @@ namespace otb
     m_ConvolutionFilter->NormalizeFilterOn();
     m_DivideFilter = DivideFilterType::New();
     m_MultiplyFilter = MultiplyFilterType::New();
-    
-     
+
+
     m_Radius.Fill(3);
     m_Filter.SetSize(7*7);
     m_Filter.Fill(1);
-    
+
     m_DivideFilter->SetInput2(m_ConvolutionFilter->GetOutput());
     m_MultiplyFilter->SetInput1(m_DivideFilter->GetOutput());
-    
+
   }
-  
+
   template <class TPanImageType, class TXsImageType, class TOutputImageType>
       void
           SimpleRcsPanSharpeningFusionImageFilter
@@ -56,7 +56,7 @@ namespace otb
   // We have 2 inputs:  an image and a vector image
 
   // Process object is not const-correct so the const_cast is required here
-    this->itk::ProcessObject::SetNthInput(1, 
+    this->itk::ProcessObject::SetNthInput(1,
                                      const_cast<  TPanImageType* >( image ) );
     this->Modified();
   }
@@ -71,11 +71,11 @@ namespace otb
     {
       return 0;
     }
-  
+
     return static_cast<const TPanImageType * >
         (this->itk::ProcessObject::GetInput(1) );
   }
-  
+
   template <class TPanImageType, class TXsImageType, class TOutputImageType>
       void
           SimpleRcsPanSharpeningFusionImageFilter
@@ -85,7 +85,7 @@ namespace otb
   // We have 2 inputs:  an image and a vector image
 
   // Process object is not const-correct so the const_cast is required here
-    this->itk::ProcessObject::SetNthInput(0, 
+    this->itk::ProcessObject::SetNthInput(0,
                          const_cast<  TXsImageType* >( image ) );
     this->Modified();
   }
@@ -100,19 +100,19 @@ namespace otb
     {
       return 0;
     }
-  
+
     return static_cast<const TXsImageType * >
         (this->itk::ProcessObject::GetInput(0) );
   }
-  
-  
+
+
   template <class TPanImageType,class TXsImageType,class TOutputImageType>
       void
       SimpleRcsPanSharpeningFusionImageFilter
           <TPanImageType, TXsImageType, TOutputImageType>
   ::GenerateData()
       {
-        
+
         //Check if size is correct
         typename InternalImageType::SizeType sizePan;
         typename InternalVectorImageType::SizeType sizeXs;
@@ -122,12 +122,12 @@ namespace otb
         {
           itkExceptionMacro(<<"SimpleRcsPanSharpeningFusionImageFilter: Wrong Pan/Xs size");
         }
-      
+
         //Process the fusion
         m_ConvolutionFilter->SetInput( this->GetPanInput() );
-        m_ConvolutionFilter->SetRadius( this->m_Radius); 
+        m_ConvolutionFilter->SetRadius( this->m_Radius);
         m_ConvolutionFilter->SetFilter( this->m_Filter);
-        
+
         m_DivideFilter->SetInput1(this->GetXsInput());
 
         m_MultiplyFilter->SetInput2(this->GetPanInput());
@@ -136,7 +136,7 @@ namespace otb
         m_MultiplyFilter->Update();
         this->GraftOutput( m_MultiplyFilter->GetOutput() );
       }
-      
+
   template <class TPanImageType,class TXsImageType,class TOutputImageType>
           void
       SimpleRcsPanSharpeningFusionImageFilter
@@ -149,7 +149,7 @@ namespace otb
                 << indent << "Radius:" << this->m_Radius
                 << std::endl;
           }
-          
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Gui/otbFltkFilterWatcher.cxx b/Code/Gui/otbFltkFilterWatcher.cxx
index c93ca07a79..1cbdf10de7 100644
--- a/Code/Gui/otbFltkFilterWatcher.cxx
+++ b/Code/Gui/otbFltkFilterWatcher.cxx
@@ -37,7 +37,7 @@ FltkFilterWatcher
   m_Progress->minimum(0);
   m_Progress->maximum(1);
   m_Window->end();
-  
+
 }
 
 FltkFilterWatcher
diff --git a/Code/Gui/otbFltkFilterWatcher.h b/Code/Gui/otbFltkFilterWatcher.h
index 5ec4bd7ac6..edb8a53223 100644
--- a/Code/Gui/otbFltkFilterWatcher.h
+++ b/Code/Gui/otbFltkFilterWatcher.h
@@ -46,7 +46,7 @@ public:
   FltkFilterWatcher(itk::ProcessObject* process,
 		    int x, int y, int w,int h,
 		    const char *comment="");
-  
+
   /** Destructor. */
   virtual ~FltkFilterWatcher();
 
@@ -76,10 +76,10 @@ protected:
     m_Progress->show();
   }
 
- 
+
 
 private:
-  
+
   Fl_Window * m_Window;
   Fl_Progress * m_Progress;
 };
diff --git a/Code/Gui/otbFltkWriterWatcher.h b/Code/Gui/otbFltkWriterWatcher.h
index 94402d5467..9bb69959ef 100644
--- a/Code/Gui/otbFltkWriterWatcher.h
+++ b/Code/Gui/otbFltkWriterWatcher.h
@@ -52,7 +52,7 @@ public:
 		    int x, int y, int w,int h,
 		    const char *comment="");
 
-  
+
   /** Destructor. */
   virtual ~FltkWriterWatcher();
 
@@ -103,11 +103,11 @@ protected:
     m_FilterProgress->show();
     m_WriterProgress->show();
   }
- 
+
   void BuildGUI(int x, int y, int w, int h,const char * comment);
 
 private:
-  
+
   Fl_Window * m_Window;
   Fl_Progress * m_WriterProgress;
   Fl_Progress * m_FilterProgress;
diff --git a/Code/IO/otbBSQImageIO.cxx b/Code/IO/otbBSQImageIO.cxx
index 71d2dcf179..b6ed502ef4 100644
--- a/Code/IO/otbBSQImageIO.cxx
+++ b/Code/IO/otbBSQImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -121,12 +121,12 @@ namespace otb
   {
   }
 
-// Read image 
+// Read image
   void BSQImageIO::Read(void* buffer)
   {
     unsigned long step = this->GetNumberOfComponents();
     char * p = static_cast<char *>(buffer);
-   
+
     int lNbLines   = this->GetIORegion().GetSize()[1];
     int lNbColumns = this->GetIORegion().GetSize()[0];
     int lFirstLine   = this->GetIORegion().GetIndex()[1] ; // [1... ]
@@ -141,12 +141,12 @@ namespace otb
     std::streamoff  numberOfBytesPerLines = static_cast<std::streamoff>(this->GetComponentSize() * m_Dimensions[0]);
     std::streamoff  offset;
     std::streamsize numberOfBytesToBeRead = this->GetComponentSize() * lNbColumns;
-    std::streamsize numberOfBytesRead;        
+    std::streamsize numberOfBytesRead;
     unsigned long cpt = 0;
 
         // Update the step variable
     step = step * (unsigned long)(this->GetComponentSize());
-        
+
     char * value = new char[numberOfBytesToBeRead];
     if(value==NULL)
     {
@@ -253,7 +253,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : the first line of the header file must be contains 'TYPE' caracters.");  
+        itkExceptionMacro(<< "BSQ : the first line of the header file must be contains 'TYPE' caracters.");
       }
       else
       {
@@ -262,7 +262,7 @@ namespace otb
     }
     file >> lStrCodePix;
     lStrCodePix = System::SetToUpper(lStrCodePix);
-    if(lStrCodePix == "OCT") 
+    if(lStrCodePix == "OCT")
     {
       SetComponentType(CHAR);
     }
@@ -298,7 +298,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : the value type '"<<lStrCodePix<<"' (second line) set in the header file is not reconized as correct value.");  
+        itkExceptionMacro(<< "BSQ : the value type '"<<lStrCodePix<<"' (second line) set in the header file is not reconized as correct value.");
       }
       else
       {
@@ -312,7 +312,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : the third line of the header file must be contains 'LABEL' caracters.");  
+        itkExceptionMacro(<< "BSQ : the third line of the header file must be contains 'LABEL' caracters.");
       }
       else
       {
@@ -328,7 +328,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : 'CHANNELS' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "BSQ : 'CHANNELS' keyword is not find in the header file.");
       }
       else
       {
@@ -346,7 +346,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : 'LINES' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "BSQ : 'LINES' keyword is not find in the header file.");
       }
       else
       {
@@ -361,7 +361,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : 'COLUMNS' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "BSQ : 'COLUMNS' keyword is not find in the header file.");
       }
       else
       {
@@ -369,7 +369,7 @@ namespace otb
       }
     }
     file >> m_Dimensions[0];
-        
+
         //Read "BITS PER PIXEL" informations
     file >> lString;
     std::string lStrBitsPerPixels(lString);
@@ -382,7 +382,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "BSQ : 'BITS PER PIXEL' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "BSQ : 'BITS PER PIXEL' keyword is not find in the header file.");
       }
       else
       {
@@ -413,7 +413,7 @@ namespace otb
         {
           if( reportError == true )
           {
-            itkExceptionMacro(<< "BSQ : the value SENSCODAGE '"<<lString<<"' set in the header file is not reconized as correct value. Possible values are INTEL or IEEE");  
+            itkExceptionMacro(<< "BSQ : the value SENSCODAGE '"<<lString<<"' set in the header file is not reconized as correct value. Possible values are INTEL or IEEE");
           }
           else
           {
@@ -435,7 +435,7 @@ namespace otb
     }
 
     m_ChannelsFile = new std::fstream[this->GetNumberOfComponents() ];
-        
+
         //Try to open channels file
     for (unsigned int channels = 0 ; channels<m_ChannelsFileName.size() ; channels++)
     {
@@ -444,7 +444,7 @@ namespace otb
       {
         if( reportError == true )
         {
-          itkExceptionMacro(<< "BSQ : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");  
+          itkExceptionMacro(<< "BSQ : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");
         }
         else
         {
@@ -521,7 +521,7 @@ namespace otb
         // Update the step variable
     step = step * (unsigned long)(this->GetComponentSize());
     const char * p = static_cast<const char *>(buffer);
-        
+
     char* value = new char[numberOfBytesToBeWrite];
     if(value==NULL)
     {
@@ -567,14 +567,14 @@ namespace otb
     {
       m_HeaderFile.close();
     }
-  
+
         // Open the new file for writing
         // Actually open the file
     m_HeaderFile.open( m_FileName.c_str(),  std::ios::out | std::ios::trunc );
     if( m_HeaderFile.fail() )
     {
       itkExceptionMacro(<< "Cannot write requested file "<<m_FileName.c_str()<<".");
-    } 
+    }
 
     if( 0 ) {}
     otbSetTypeBsqMacro( CHAR,   "OCT")
@@ -610,7 +610,7 @@ namespace otb
         //Write COLUMNS information
     m_HeaderFile <<  "COLUMNS" << std::endl;
     m_HeaderFile << m_Dimensions[0] << std::endl;
-        
+
         //Write "BITS PER PIXEL" informations
     m_HeaderFile <<  "BITS PER PIXEL" << std::endl;
     m_HeaderFile << this->GetComponentSize()*8 << std::endl;
@@ -629,7 +629,7 @@ namespace otb
     m_HeaderFile.close();
 
         //Create channels files
-        
+
         //Define channels file name
     std::string lRootName = System::GetRootName( m_FileName );
     m_ChannelsFileName.clear();
@@ -649,11 +649,11 @@ namespace otb
       m_ChannelsFile[channels].open( m_ChannelsFileName[channels].c_str(),  std::ios::out | std::ios::trunc | std::ios::binary );
       if( m_ChannelsFile[channels].fail() )
       {
-        itkExceptionMacro(<< "BSQ : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");  
+        itkExceptionMacro(<< "BSQ : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");
       }
     }
     this->SetFileTypeToBinary();
-    this->SetNumberOfDimensions(2);  
+    this->SetNumberOfDimensions(2);
 
     unsigned long headerLength = this->GetComponentSize() * m_Dimensions[0];
     char* value = new char[headerLength];
@@ -681,6 +681,6 @@ namespace otb
 
   }
 
-  
+
 } // end namespace otb
 
diff --git a/Code/IO/otbBSQImageIO.h b/Code/IO/otbBSQImageIO.h
index f1ffedee30..76ad3cfdd2 100644
--- a/Code/IO/otbBSQImageIO.h
+++ b/Code/IO/otbBSQImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ public:
 
   /** Byte order typedef */
   typedef Superclass::ByteOrder  ByteOrder;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -59,16 +59,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -91,7 +91,7 @@ public:
 
   // JULIEN: NOT USED, NOT IMPLEMENTED
   // void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
 protected:
   /** Construtor.*/
   BSQImageIO();
@@ -104,7 +104,7 @@ protected:
 
   bool OpenOneraDataFileForWriting(const char* filename);
   bool OpenOneraHeaderFileForWriting(const char* filename);
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -148,8 +148,8 @@ private:
   itk::ImageIOBase::ByteOrder m_FileByteOrder;
   std::fstream m_HeaderFile;
   std::string m_TypeBsq;
-  std::vector< std::string >  m_ChannelsFileName;    
-//  std::vector< std::fstream >  m_ChannelsFile;    
+  std::vector< std::string >  m_ChannelsFileName;
+//  std::vector< std::fstream >  m_ChannelsFile;
   std::fstream *  m_ChannelsFile;
 //std::fstream  file;
 //        char* value;
diff --git a/Code/IO/otbBSQImageIOFactory.cxx b/Code/IO/otbBSQImageIOFactory.cxx
index 055b118b10..e002517253 100644
--- a/Code/IO/otbBSQImageIOFactory.cxx
+++ b/Code/IO/otbBSQImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbBSQImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ BSQImageIOFactory::BSQImageIOFactory()
                          1,
                          itk::CreateObjectFunction<BSQImageIO>::New());
 }
-  
+
 BSQImageIOFactory::~BSQImageIOFactory()
 {
 }
 
-const char* 
+const char*
 BSQImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 BSQImageIOFactory::GetDescription() const
 {
   return "BSQ ImageIO Factory, permettant le chargement d'image au format BSQ dans l'OTB";
diff --git a/Code/IO/otbBSQImageIOFactory.h b/Code/IO/otbBSQImageIOFactory.h
index ef200ac867..62765d0497 100644
--- a/Code/IO/otbBSQImageIOFactory.h
+++ b/Code/IO/otbBSQImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT BSQImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef BSQImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbDEMHandler.cxx b/Code/IO/otbDEMHandler.cxx
index bfa5c3a323..1e1af710ee 100644
--- a/Code/IO/otbDEMHandler.cxx
+++ b/Code/IO/otbDEMHandler.cxx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -57,7 +57,7 @@ namespace otb
   }
 
 
-  double 
+  double
   DEMHandler
   ::GetHeightAboveMSL(const PointType& geoPoint)
   {
@@ -72,7 +72,7 @@ namespace otb
   }
 
 
-  void 
+  void
   DEMHandler
   ::PrintSelf(std::ostream& os, Indent indent) const
   {
diff --git a/Code/IO/otbDEMHandler.h b/Code/IO/otbDEMHandler.h
index 9827dcab93..eef15854b3 100644
--- a/Code/IO/otbDEMHandler.h
+++ b/Code/IO/otbDEMHandler.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,13 +36,13 @@ namespace otb
    *
    * \brief Class for Reading a DEM data
    *
-   * This class is based on ossimElevManager. 
+   * This class is based on ossimElevManager.
    * It allows to obtain height above MSL(Mean Sea Level) of a geographic point
    * Handle DTED and SRTM formats.
    * \ingroup Images
    *
    */
-  
+
   class ITK_EXPORT DEMHandler: public itk::Object
     {
       public :
@@ -52,33 +52,33 @@ namespace otb
       typedef itk::Object														Superclass;
       typedef itk::SmartPointer<Self>               Pointer;
       typedef itk::SmartPointer<const Self>         ConstPointer;
-      
+
       typedef itk::Point<double, 2> 		PointType;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro(DEMHandler,Object);
-      
+
       /** Try to open the DEM directory. */
-      virtual void OpenDEMDirectory(const char* DEMDirectory);         
-      
+      virtual void OpenDEMDirectory(const char* DEMDirectory);
+
       /** Compute the height above MSL(Mean Sea Level) of a geographic point. */
-      virtual double GetHeightAboveMSL(const PointType& geoPoint);     
-      
+      virtual double GetHeightAboveMSL(const PointType& geoPoint);
+
     protected:
       DEMHandler();
       ~DEMHandler();
-      
+
       void PrintSelf(std::ostream& os, Indent indent) const;
-      
+
       ossimElevManager* m_ElevManager;
 
       itk::SimpleFastMutexLock m_Mutex;
-      
+
     };
-  
+
 } // namespace otb
 
 
diff --git a/Code/IO/otbDEMToImageGenerator.h b/Code/IO/otbDEMToImageGenerator.h
index 89e86cf294..c0db11d34e 100644
--- a/Code/IO/otbDEMToImageGenerator.h
+++ b/Code/IO/otbDEMToImageGenerator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -46,7 +46,7 @@ namespace otb
    *
    */
   template <class TDEMImage>
-    class ITK_EXPORT DEMToImageGenerator: 
+    class ITK_EXPORT DEMToImageGenerator:
     	public itk::ImageSource<TDEMImage>
     {
       public :
@@ -55,13 +55,13 @@ namespace otb
       typedef TDEMImage					      		      DEMImageType;
       typedef typename DEMImageType::Pointer				      DEMImagePointerType;
       typedef typename DEMImageType::PixelType                 		      PixelType;
-      
+
       typedef DEMToImageGenerator                              	              Self;
       typedef itk::ImageSource<DEMImageType> Superclass;
       typedef itk::SmartPointer<Self>                    	      	      Pointer;
       typedef itk::SmartPointer<const Self>              	      	      ConstPointer;
-      typedef Image<PixelType,2>           				      OutputImageType; 
-      
+      typedef Image<PixelType,2>           				      OutputImageType;
+
       typedef typename Superclass::Pointer    				      OutputImagePointer;
       typedef typename OutputImageType::SpacingType   			      SpacingType;
       typedef typename OutputImageType::SizeType 			      SizeType;
@@ -74,49 +74,49 @@ namespace otb
 
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro(DEMToImageGenerator,ImageSource);
-      
+
       /** Set/Get the Output Origin coordinates. */
       itkSetMacro(OutputOrigin,PointType);
       itkGetConstReferenceMacro(OutputOrigin,PointType);
-      
+
       /** Set/Get the Output Size. */
       itkSetMacro(OutputSize,SizeType);
       itkGetConstReferenceMacro(OutputSize,SizeType);
-     
-      /** Set/Get the Output Spacing. */    
+
+      /** Set/Get the Output Spacing. */
       itkSetMacro(OutputSpacing,SpacingType);
       itkGetConstReferenceMacro(OutputSpacing,SpacingType);
 
-      /** Set/Get the Default Unknown Value. */    
+      /** Set/Get the Default Unknown Value. */
       itkSetMacro(DefaultUnknownValue,PixelType);
       itkGetConstReferenceMacro(DefaultUnknownValue,PixelType);
 
       /** Set the DEM directory. */
-      virtual void SetDEMDirectoryPath(const char* DEMDirectory);         
-     
-      
+      virtual void SetDEMDirectoryPath(const char* DEMDirectory);
+
+
     protected:
       DEMToImageGenerator();
       ~DEMToImageGenerator();
-      
+
       void PrintSelf(std::ostream& os, Indent indent) const;
       void GenerateData();
       virtual void GenerateOutputInformation();
-      
+
       DEMHandlerType::Pointer m_DEMHandler;
       PointType m_OutputOrigin;
       SpacingType  m_OutputSpacing;
       SizeType m_OutputSize;
       PixelType m_DefaultUnknownValue;
-    
+
     private:
       DEMToImageGenerator(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
     };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/IO/otbDEMToImageGenerator.txx b/Code/IO/otbDEMToImageGenerator.txx
index c7728fb8c5..f21e43fef1 100644
--- a/Code/IO/otbDEMToImageGenerator.txx
+++ b/Code/IO/otbDEMToImageGenerator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,40 +23,40 @@
 
 namespace otb
 {
-  
-  
-  template<class TDEMImage> 
+
+
+  template<class TDEMImage>
   DEMToImageGenerator<TDEMImage>
   ::DEMToImageGenerator()
   {
-    m_DEMHandler = DEMHandlerType::New(); 
+    m_DEMHandler = DEMHandlerType::New();
     m_OutputSpacing[0]=0.0001;
-    m_OutputSpacing[1]=-0.0001;	
+    m_OutputSpacing[1]=-0.0001;
     m_OutputSize[0]=1;
     m_OutputSize[1]=1;
     m_OutputOrigin[0]=0;
     m_OutputOrigin[1]=0;
     m_DefaultUnknownValue = static_cast<PixelType>(-32768); // Value defined in the norm for points strm doesn't have information.
   }
-  
+
   template<class TDEMImage>
   DEMToImageGenerator<TDEMImage>
   ::~DEMToImageGenerator()
   {
     // Nothing to be done...
   }
-  
-  // DEM folder specification method 
+
+  // DEM folder specification method
   template<class TDEMImage>
-  void 
+  void
   DEMToImageGenerator<TDEMImage>::
   SetDEMDirectoryPath(const char* DEMDirectory)
   {
     m_DEMHandler->OpenDEMDirectory(DEMDirectory);
   }
-  
+
   // GenerateOutputInformation method
-  template <class TDEMImage> 
+  template <class TDEMImage>
   void DEMToImageGenerator<TDEMImage>
   ::GenerateOutputInformation()
   {
@@ -64,34 +64,34 @@ namespace otb
     output = this->GetOutput(0);
 
     IndexType start;
-    start[0]=0;     
-    start[1]=0; 
+    start[0]=0;
+    start[1]=0;
 
     // Specify region parameters
     OutputImageRegionType largestPossibleRegion;
     largestPossibleRegion.SetSize( m_OutputSize );
     largestPossibleRegion.SetIndex( start );
-    
+
     output->SetLargestPossibleRegion( largestPossibleRegion );
     output->SetSpacing(m_OutputSpacing);
     output->SetOrigin(m_OutputOrigin);
   }
-  
+
   // GenerateData method
-  template <class TDEMImage> 
-  void 
+  template <class TDEMImage>
+  void
   DEMToImageGenerator<TDEMImage>
   ::GenerateData()
   {
     DEMImagePointerType  DEMImage = this->GetOutput();
-    
+
     // allocate the output buffer
     DEMImage->SetBufferedRegion( DEMImage->GetRequestedRegion() );
     DEMImage->Allocate();
     DEMImage->FillBuffer(0);
     // Create an iterator that will walk the output region
     ImageIteratorType outIt = ImageIteratorType(DEMImage,DEMImage->GetRequestedRegion());
-    
+
     // Walk the output image, evaluating the height at each pixel
     IndexType 			currentindex;
     PointType 			phyPoint;
@@ -112,27 +112,27 @@ namespace otb
 	  	{
 		    // Fill the image
 		    DEMImage->SetPixel(currentindex, static_cast<PixelType>(height) );
-		  } 
-			else 
+		  }
+			else
 	  	{
 	  	  // Back to the MNT default value
 	  	  DEMImage->SetPixel(currentindex, m_DefaultUnknownValue);
 	  	}
     }
   }
-  
-  template <class TDEMImage> 
-  void 
+
+  template <class TDEMImage>
+  void
   DEMToImageGenerator<TDEMImage>
   ::PrintSelf(std::ostream& os, Indent indent) const
   {
     Superclass::PrintSelf(os,indent);
-    
+
     os << indent << "Output Spacing:"<< m_OutputSpacing[0] << ","<< m_OutputSpacing[1] << std::endl;
     os << indent << "Output Origin:"<< m_OutputOrigin[0] << ","<< m_OutputOrigin[1] << std::endl;
     os << indent << "Output Size:"<< m_OutputSize[0] << ","<< m_OutputSize[1] << std::endl;
   }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/IO/otbDEMToOrthoImageGenerator.h b/Code/IO/otbDEMToOrthoImageGenerator.h
index a28e9d0324..4106018eb8 100644
--- a/Code/IO/otbDEMToOrthoImageGenerator.h
+++ b/Code/IO/otbDEMToOrthoImageGenerator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -42,7 +42,7 @@ namespace otb
    *
    */
   template <class TDEMImage, class TMapProjection>
-    class ITK_EXPORT DEMToOrthoImageGenerator: 
+    class ITK_EXPORT DEMToOrthoImageGenerator:
         public otb::DEMToImageGenerator<TDEMImage>
         {
           public :
@@ -51,16 +51,16 @@ namespace otb
             typedef TDEMImage					      		      DEMImageType;
             typedef typename DEMImageType::Pointer				      DEMImagePointerType;
             typedef typename DEMImageType::PixelType                 		      PixelType;
-      
+
             typedef TMapProjection                                                  MapProjectionType;
             typedef typename MapProjectionType::Pointer                             MapProjectionPointerType;
-      
+
             typedef DEMToOrthoImageGenerator                              	              Self;
             typedef otb::DEMToImageGenerator<DEMImageType> Superclass;
             typedef itk::SmartPointer<Self>                    	      	      Pointer;
             typedef itk::SmartPointer<const Self>              	      	      ConstPointer;
-            typedef Image<PixelType,2>           				      OutputImageType; 
-      
+            typedef Image<PixelType,2>           				      OutputImageType;
+
             typedef typename Superclass::Pointer    				      OutputImagePointer;
             typedef typename OutputImageType::SpacingType   			      SpacingType;
             typedef typename OutputImageType::SizeType 			      SizeType;
@@ -74,50 +74,50 @@ namespace otb
 
             /** Method for creation through the object factory. */
             itkNewMacro(Self);
-      
+
             /** Run-time type information (and related methods). */
             itkTypeMacro(DEMToOrthoImageGenerator,ImageSource);
-      
+
             /** Set/Get the Output Origin coordinates. */
             itkSetMacro(OutputOrigin,PointType);
             itkGetConstReferenceMacro(OutputOrigin,PointType);
-      
+
             /** Set/Get the Output Size. */
             itkSetMacro(OutputSize,SizeType);
             itkGetConstReferenceMacro(OutputSize,SizeType);
-     
-            /** Set/Get the Output Spacing. */    
+
+            /** Set/Get the Output Spacing. */
             itkSetMacro(OutputSpacing,SpacingType);
             itkGetConstReferenceMacro(OutputSpacing,SpacingType);
 
-            /** Set/Get the Default Unknown Value. */    
+            /** Set/Get the Default Unknown Value. */
             itkSetMacro(DefaultUnknownValue,PixelType);
             itkGetConstReferenceMacro(DefaultUnknownValue,PixelType);
 
             /** Set/Get the projection*/
             itkSetMacro(MapProjection, MapProjectionPointerType);
             itkGetMacro(MapProjection, MapProjectionPointerType);
-      
+
           protected:
             DEMToOrthoImageGenerator();
             ~DEMToOrthoImageGenerator();
-      
+
             void PrintSelf(std::ostream& os, Indent indent) const;
             void GenerateData();
             virtual void GenerateOutputInformation();
-      
+
             DEMHandlerPointerType m_DEMHandler;
             PointType m_OutputOrigin;
             SpacingType  m_OutputSpacing;
             SizeType m_OutputSize;
             PixelType m_DefaultUnknownValue;
             MapProjectionPointerType m_MapProjection;
-            
+
           private:
             DEMToOrthoImageGenerator(const Self&); //purposely not implemented
             void operator=(const Self&); //purposely not implemented
         };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/IO/otbDEMToOrthoImageGenerator.txx b/Code/IO/otbDEMToOrthoImageGenerator.txx
index cc997785fc..74f08daf2c 100644
--- a/Code/IO/otbDEMToOrthoImageGenerator.txx
+++ b/Code/IO/otbDEMToOrthoImageGenerator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,15 +23,15 @@
 
 namespace otb
 {
-  
-  
-  template<class TDEMImage, class TMapProjection> 
+
+
+  template<class TDEMImage, class TMapProjection>
       DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
   ::DEMToOrthoImageGenerator()
   {
-    m_DEMHandler = DEMHandlerType::New(); 
+    m_DEMHandler = DEMHandlerType::New();
     m_OutputSpacing[0]=0.0001;
-    m_OutputSpacing[1]=-0.0001;	
+    m_OutputSpacing[1]=-0.0001;
     m_OutputSize[0]=1;
     m_OutputSize[1]=1;
     m_OutputOrigin[0]=0;
@@ -39,17 +39,17 @@ namespace otb
     m_DefaultUnknownValue = static_cast<PixelType>(-32768); // Value defined in the norm for points strm doesn't have information.
     m_MapProjection = NULL;
   }
-  
+
   template<class TDEMImage, class TMapProjection>
       DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
   ::~DEMToOrthoImageGenerator()
   {
     // Nothing to be done...
   }
-  
-  
+
+
   // GenerateOutputInformation method
-          template <class TDEMImage, class TMapProjection> 
+          template <class TDEMImage, class TMapProjection>
               void DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
   ::GenerateOutputInformation()
   {
@@ -57,41 +57,41 @@ namespace otb
     output = this->GetOutput(0);
 
     IndexType start;
-    start[0]=0;     
-    start[1]=0; 
+    start[0]=0;
+    start[1]=0;
 
     // Specify region parameters
     OutputImageRegionType largestPossibleRegion;
     largestPossibleRegion.SetSize( m_OutputSize );
     largestPossibleRegion.SetIndex( start );
-    
+
     output->SetLargestPossibleRegion( largestPossibleRegion );
     output->SetSpacing(m_OutputSpacing);
     output->SetOrigin(m_OutputOrigin);
   }
-  
+
   // GenerateData method
-  template <class TDEMImage, class TMapProjection> 
-      void 
+  template <class TDEMImage, class TMapProjection>
+      void
           DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
   ::GenerateData()
   {
-    
+
     if(!m_MapProjection)
     {
-      itkExceptionMacro( << 
+      itkExceptionMacro( <<
           "Please set map projection!" );
     }
-    
+
     DEMImagePointerType  DEMImage = this->GetOutput();
-    
+
     // allocate the output buffer
     DEMImage->SetBufferedRegion( DEMImage->GetRequestedRegion() );
     DEMImage->Allocate();
     DEMImage->FillBuffer(0);
     // Create an iterator that will walk the output region
     ImageIteratorType outIt = ImageIteratorType(DEMImage,DEMImage->GetRequestedRegion());
-    
+
     // Walk the output image, evaluating the height at each pixel
     IndexType currentindex;
     PointType cartoPoint;
@@ -102,13 +102,13 @@ namespace otb
       currentindex=outIt.GetIndex();
 
       DEMImage->TransformIndexToPhysicalPoint(currentindex, cartoPoint);
-      
+
       otbMsgDevMacro(<< "CartoPoint : (" << cartoPoint[0] << "," << cartoPoint[1] << ")") ;
-                        
+
       geoPoint = m_MapProjection->TransformPoint(cartoPoint);
-                        
+
       otbMsgDevMacro(<< "CartoPoint : (" << geoPoint[0] << "," << geoPoint[1] << ")") ;
-                        
+
       height=m_DEMHandler->GetHeightAboveMSL(geoPoint); // Altitude calculation
       otbMsgDevMacro(<< "height" << height) ;
       // MNT sets a default value (-32768) at point where it doesn't have altitude information.
@@ -117,27 +117,27 @@ namespace otb
       {
 		    // Fill the image
         DEMImage->SetPixel(currentindex, static_cast<PixelType>(height) );
-      } 
-      else 
+      }
+      else
       {
 	  	  // Back to the MNT default value
         DEMImage->SetPixel(currentindex, m_DefaultUnknownValue);
       }
     }
   }
-  
-  template <class TDEMImage, class TMapProjection> 
-      void 
+
+  template <class TDEMImage, class TMapProjection>
+      void
           DEMToOrthoImageGenerator<TDEMImage, TMapProjection>
   ::PrintSelf(std::ostream& os, Indent indent) const
   {
     Superclass::PrintSelf(os,indent);
-    
+
     os << indent << "Output Spacing:"<< m_OutputSpacing[0] << ","<< m_OutputSpacing[1] << std::endl;
     os << indent << "Output Origin:"<< m_OutputOrigin[0] << ","<< m_OutputOrigin[1] << std::endl;
     os << indent << "Output Size:"<< m_OutputSize[0] << ","<< m_OutputSize[1] << std::endl;
   }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/IO/otbDXFToSpatialObjectGroupFilter.h b/Code/IO/otbDXFToSpatialObjectGroupFilter.h
index e52fc99c9c..69580b88c2 100644
--- a/Code/IO/otbDXFToSpatialObjectGroupFilter.h
+++ b/Code/IO/otbDXFToSpatialObjectGroupFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -38,7 +38,7 @@ namespace otb
    *
    */
 template <class TSpatialObject>
-class ITK_EXPORT DXFToSpatialObjectGroupFilter 
+class ITK_EXPORT DXFToSpatialObjectGroupFilter
   : public DL_CreationAdapter, public SpatialObjectSource<TSpatialObject>
 {
   public:
@@ -47,16 +47,16 @@ class ITK_EXPORT DXFToSpatialObjectGroupFilter
   typedef SpatialObjectSource< TSpatialObject > Superclass;
   typedef itk::SmartPointer<Self>                                    Pointer;
   typedef itk::SmartPointer<const Self>                              ConstPointer;
-  	
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(SpatialObjectReader,SpatialObjectSource);
 
   /** Spatial objects typedefs */
   typedef TSpatialObject                            GroupSpatialObjectType;
-  typedef typename GroupSpatialObjectType::Pointer  GroupPointer;		
+  typedef typename GroupSpatialObjectType::Pointer  GroupPointer;
   typedef itk::SpatialObjectPoint<TSpatialObject::ObjectDimension>       PointType;
   typedef itk::LandmarkSpatialObject<TSpatialObject::ObjectDimension>    LandmarkType;
   typedef typename LandmarkType::Pointer            LandmarkPointer;
@@ -70,12 +70,12 @@ class ITK_EXPORT DXFToSpatialObjectGroupFilter
   typedef itk::EllipseSpatialObject<TSpatialObject::ObjectDimension>     EllipseType;
   typedef typename EllipseType::Pointer             EllipsePointer;
   typedef std::vector< LinePointType >              PointListType;
-  
-  
+
+
   virtual void addLayer(const DL_LayerData& data);
   virtual void addPoint(const DL_PointData& data);
   virtual void addLine(const DL_LineData& data);
-  virtual void add3DFace(const DL_3DFaceData& data);	
+  virtual void add3DFace(const DL_3DFaceData& data);
   virtual void addArc(const DL_ArcData& data);
   virtual void addCircle(const DL_CircleData& data);
   virtual void addPolyline(const DL_PolylineData& data);
@@ -84,19 +84,19 @@ class ITK_EXPORT DXFToSpatialObjectGroupFilter
 
   /** Workaround while waiting for the SpatialObject bug to be fixed */
   virtual void Update(void);
-  
+
   protected:
   /** Constructor */
   DXFToSpatialObjectGroupFilter();
   /** Destructor */
-  virtual ~DXFToSpatialObjectGroupFilter() {}  
-  
+  virtual ~DXFToSpatialObjectGroupFilter() {}
+
   /** Main computation method */
   virtual void GenerateData(void);
-  
+
   /** PrintSelf method */
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   private:
   DXFToSpatialObjectGroupFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/IO/otbDXFToSpatialObjectGroupFilter.txx b/Code/IO/otbDXFToSpatialObjectGroupFilter.txx
index afd51624a1..049e99d35f 100644
--- a/Code/IO/otbDXFToSpatialObjectGroupFilter.txx
+++ b/Code/IO/otbDXFToSpatialObjectGroupFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -51,8 +51,8 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addLayer(const DL_LayerData& data) 
-  {  
+  ::addLayer(const DL_LayerData& data)
+  {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
     if (m_CurrentObjectType==6)
@@ -71,12 +71,12 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
     m_CurrentObjectType=0;
     otbMsgDebugMacro(<<"LAYER: "<< data.name <<" flags: "<<data.flags);
-    
+
   }
   /**
    * Sample implementation of the method which handles point entities.
@@ -84,7 +84,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addPoint(const DL_PointData& data) 
+  ::addPoint(const DL_PointData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -104,7 +104,7 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
     m_CurrentObjectType=1;
@@ -121,10 +121,10 @@ namespace otb
 	    grpPtr->AddSpatialObject(landmark);
 	  }
       }
-    else    
+    else
       grpPtr->AddSpatialObject(landmark);
     otbMsgDebugMacro(<<"POINT ("<<data.x<<", "<<data.y<<", "<<data.z<<") ( nb objects "<<grpPtr->GetNumberOfChildren()<<")");
-    
+
   }
   /**
    * Sample implementation of the method which handles line entities.
@@ -132,7 +132,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addLine(const DL_LineData& data) 
+  ::addLine(const DL_LineData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -152,7 +152,7 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
     m_CurrentObjectType=2;
@@ -172,11 +172,11 @@ namespace otb
 	    grpPtr->AddSpatialObject(line);
 	  }
       }
-    else    
+    else
       grpPtr->AddSpatialObject(line);
     otbMsgDebugMacro(<<"LINE "<<"("<<data.x1<<", "<<data.y1<<", "<<data.z1<<") ("
 		     <<data.x2<<", "<<data.y2<<", "<<data.z2 <<grpPtr->GetNumberOfChildren()<<")");
-    
+
   }
   /**
    * Sample implementation of the method which handles 3DFace entities.
@@ -184,7 +184,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::add3DFace(const DL_3DFaceData& data) 
+  ::add3DFace(const DL_3DFaceData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -204,7 +204,7 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
     m_CurrentObjectType=7;
@@ -229,14 +229,14 @@ namespace otb
 	    grpPtr->AddSpatialObject(line);
 	  }
       }
-    else 
+    else
       grpPtr->AddSpatialObject(line);
     otbMsgDebugMacro(<<"3D Face "<<"("<<data.x1<<", "<<data.y1<<", "<<data.z1<<") ("
 		     <<data.x2<<", "<<data.y2<<", "<<data.z2<<") ("
 		     <<data.x3<<", "<<data.y3<<", "<<data.z3<<") ("
 		     <<data.x4<<", "<<data.y4<<", "<<data.z4<<") ("
 		     <<grpPtr->GetNumberOfChildren()<<")");
-    
+
   }
   /**
    * Sample implementation of the method which handles arc entities.
@@ -244,7 +244,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addArc(const DL_ArcData& data) 
+  ::addArc(const DL_ArcData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -270,7 +270,7 @@ namespace otb
     otbMsgDebugMacro(<<"ARC ("<<data.cx<<", "<<data.cy<<", "<<data.cz<<") "
 		     <<data.radius<<", "<<data.angle1<<", "<<data.angle2
 		     <<" (nb objects "<<grpPtr->GetNumberOfChildren()<<")");
-    
+
   }
 
   /**
@@ -279,7 +279,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addCircle(const DL_CircleData& data) 
+  ::addCircle(const DL_CircleData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -299,7 +299,7 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
     m_CurrentObjectType=4;
@@ -321,13 +321,13 @@ namespace otb
 	    grpPtr->AddSpatialObject(ellipse);
 	  }
       }
-    else    
+    else
       grpPtr->AddSpatialObject(ellipse);
 
     otbMsgDebugMacro(<<"CIRCLE ("<<data.cx<<", "<<data.cy<<", "<<data.cz<<") "
 		     <<data.radius
 		     <<" (nb objects "<<grpPtr->GetNumberOfChildren()<<")");
-    
+
   }
   /**
    * Sample implementation of the method which handles polyline entities.
@@ -335,7 +335,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addPolyline(const DL_PolylineData& data) 
+  ::addPolyline(const DL_PolylineData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -355,7 +355,7 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
     m_CurrentObjectType=5;
@@ -366,11 +366,11 @@ namespace otb
       {
         m_PolylineClosed=1;
       }
-    else 
+    else
       m_PolylineClosed=0;
     otbMsgDebugMacro(<<"POLYLINE ");
     otbMsgDebugMacro(<<"flags: "<< data.flags <<",nombre de sommets: "<< data.number);
-    
+
   }
 
 
@@ -380,7 +380,7 @@ namespace otb
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::addVertex(const DL_VertexData& data) 
+  ::addVertex(const DL_VertexData& data)
   {
     GroupPointer grpPtr = this->GetOutput();
     m_CurrentObjectType=6;
@@ -391,13 +391,13 @@ namespace otb
     otbMsgDebugMacro(<<"VERTEX ("<<data.x<<", "<<data.y<<", "<<data.z<<") "
 		     <<data.bulge
 		     <<" (nb objects "<<grpPtr->GetNumberOfChildren()<<")");
-    
+
   }
 
   template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::GenerateData() 
+  ::GenerateData()
   {
     GroupPointer grpPtr = this->GetOutput();
     //If the previous object is a vertex we create the polyline:
@@ -417,7 +417,7 @@ namespace otb
 		grpPtr->AddSpatialObject(m_CurrentPolyLine);
 	      }
 	  }
-	else 
+	else
 	  grpPtr->AddSpatialObject(m_CurrentPolyLine);
       }
   }
@@ -425,7 +425,7 @@ namespace otb
 template <class TSpatialObject>
   void
   DXFToSpatialObjectGroupFilter<TSpatialObject>
-  ::Update() 
+  ::Update()
   {
     this->GenerateData();
   }
diff --git a/Code/IO/otbFileName.h b/Code/IO/otbFileName.h
index dd9f4872fb..700c87143b 100644
--- a/Code/IO/otbFileName.h
+++ b/Code/IO/otbFileName.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -45,7 +45,7 @@ public:
     *  Return "t1" if file is "/data/images/t1.tif".
     */
    FileName ObtainFileNameWithNoExtension() const;
-		 
+
 };
 
 }
diff --git a/Code/IO/otbGDALImageIO.cxx b/Code/IO/otbGDALImageIO.cxx
index 5ffd39187f..ff78728c71 100644
--- a/Code/IO/otbGDALImageIO.cxx
+++ b/Code/IO/otbGDALImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -70,7 +70,7 @@ namespace otb
     m_poBands     = NULL;
     m_hDriver     = NULL;
     m_poDataset   = NULL;
-  
+
     m_NbBands = 0;
     m_FlagWriteImageInformation = true;
 
@@ -82,10 +82,10 @@ namespace otb
 //	if( m_hDriver != NULL ) GDALClose( m_hDriver ); //Ne pas le faire  sinon SegFault !!!!
 //         if( m_poBands != NULL ) delete [] m_poBands;
 // 	if( m_poDataset != NULL ) delete m_poDataset;
- 
+
     if(m_poDataset != NULL)
     {
-       
+
       delete m_poDataset;
       m_poDataset = NULL;
     }
@@ -99,7 +99,7 @@ namespace otb
 
 
 // Tell only if the file can be read with GDAL.
-  bool GDALImageIO::CanReadFile(const char* file) 
+  bool GDALImageIO::CanReadFile(const char* file)
   {
   // First check the extension
     if(  file == NULL )
@@ -109,14 +109,14 @@ namespace otb
     }
     bool lCanRead(false);
 
-        //Traitement particulier sur certain format o� l'on pr�f�re utiliser 
+        //Traitement particulier sur certain format o� l'on pr�f�re utiliser
         // Format PNG -> lecture avec ITK (pas GDAL car certains tests sortent en erreurs)
     itk::PNGImageIO::Pointer lPNGImageIO = itk::PNGImageIO::New();
     lCanRead = lPNGImageIO->CanReadFile(file);
     if ( lCanRead == true)
     {
       return false;
-    } 
+    }
     itk::JPEGImageIO::Pointer lJPEGImageIO = itk::JPEGImageIO::New();
     lCanRead = lJPEGImageIO->CanReadFile(file);
     if ( lCanRead == true)
@@ -135,18 +135,18 @@ namespace otb
 */
     std::string lFileNameGdal;
     lFileNameGdal = std::string(file);
-	
-        // Init GDAL parameters 
+
+        // Init GDAL parameters
     GDALAllRegister();
 
-  // Open file with GDAL 
+  // Open file with GDAL
     m_poDataset = static_cast<GDALDataset *>(GDALOpen(lFileNameGdal.c_str(), GA_ReadOnly ));
     if(m_poDataset==NULL)
     {
       fprintf( stderr,
                "GDALOpen failed - %d\n%s\n",
                CPLGetLastErrorNo(), CPLGetLastErrorMsg() );
-		 
+
       GDALDumpOpenDatasets( stderr );
       GDALDestroyDriverManager();
       CPLDumpSharedList( NULL );
@@ -222,7 +222,7 @@ namespace otb
 
     CPLErr lCrGdal;
     std::streamoff cpt(0);
-	
+
     if( GDALDataTypeIsComplex(m_PxType) )
     {
       otbMsgDevMacro( << " GDALDataTypeIsComplex begin ");
@@ -235,9 +235,9 @@ namespace otb
       cpt = 0;
       for ( std::streamoff  i=0 ; i < lTailleBuffer ; i = i+static_cast<std::streamoff>(m_NbOctetPixel) )
       {
-        memcpy((void*)(&(p[cpt])),(const void*)(&(value[i])),(size_t)(m_NbOctetPixel));		       
+        memcpy((void*)(&(p[cpt])),(const void*)(&(value[i])),(size_t)(m_NbOctetPixel));
         cpt += static_cast<std::streamoff>(m_NbOctetPixel);
-      }		
+      }
     }
     else
     {
@@ -251,7 +251,7 @@ namespace otb
         {
           itkExceptionMacro(<< "Error while reading image (GDAL format) " << m_FileName.c_str()<<".");
         }
-                	// Recopie dans le buffer                 
+                	// Recopie dans le buffer
         cpt = static_cast<std::streamoff>(nbComponents)*static_cast<std::streamoff>(m_NbOctetPixel);
         for ( std::streamoff  i=0 ; i < lTailleBuffer ; i = i+static_cast<std::streamoff>(m_NbOctetPixel) )
         {
@@ -260,7 +260,7 @@ namespace otb
         }
       }
     }
-	
+
     delete [] value;
     value = NULL;
     otbMsgDevMacro( << "GDALImageIO::Read() completed");
@@ -271,7 +271,7 @@ namespace otb
   //std::ifstream file;
     this->InternalReadImageInformation();
   }
-  
+
   void GDALImageIO::InternalReadImageInformation()
   {
     int i;
@@ -280,13 +280,13 @@ namespace otb
     {
       itkExceptionMacro(<<"GDAl read : empty image file name file.");
     }
-  
+
     std::string lFileNameGdal = m_FileName;
 
-  // Init GDAL parameters 
+  // Init GDAL parameters
     GDALAllRegister();
-  
-  // Get Dataset 
+
+  // Get Dataset
     if(m_poDataset != NULL)
     {
       delete m_poDataset;
@@ -298,13 +298,13 @@ namespace otb
       itkExceptionMacro(<<"Gdal dataset is null.");
       return;
     }
-  
+
     else
     {
     // Get image dimensions
       m_width = m_poDataset->GetRasterXSize();
       m_height = m_poDataset->GetRasterYSize();
-       
+
       if( (m_width==0) || (m_height==0))
       {
         itkExceptionMacro(<<"Dimension is undefined.");
@@ -316,13 +316,13 @@ namespace otb
         m_Dimensions[1] = m_height;
         otbMsgDevMacro(<<"Get Dimensions : x="<<m_Dimensions[0]<<" & y="<<m_Dimensions[1]);
       }
-    
+
     // Get Number of Bands
       m_NbBands = m_poDataset->GetRasterCount();
       if(m_NbBands==0)
       {
 //FIXME this happen in the case of a hdf file with SUBDATASETS
-// in this situation, at least the first dataset should be open (ideally all in an imagelist) 
+// in this situation, at least the first dataset should be open (ideally all in an imagelist)
 //         char** papszMetadata;
 //         papszMetadata = m_poDataset->GetMetadata("SUBDATASETS");
 //         if( CSLCount(papszMetadata) > 0 )
@@ -334,9 +334,9 @@ namespace otb
 //             std::cout << papszMetadata[cpt] << std::endl;
 //               ::itk::OStringStream lStream;
 //               lStream << MetaDataKey::m_SubMetadataKey << cpt;
-//               key = lStream.str(); 
-//             
-//               itk::EncapsulateMetaData<std::string>(dico, key, 
+//               key = lStream.str();
+//
+//               itk::EncapsulateMetaData<std::string>(dico, key,
 //                   static_cast<std::string>( papszMetadata[cpt] ) );
 //           }
 //           std::cout << dico[dico.GetKeys()[0]] << std::endl;
@@ -347,10 +347,10 @@ namespace otb
         return;
       }
       this->SetNumberOfComponents(m_NbBands);
-   
+
       otbMsgDevMacro(<<"NbBands : "<<m_NbBands);
       otbMsgDevMacro(<<"Nb of Components : "<<this->GetNumberOfComponents());
-    
+
     // Set the number of dimensions (verify for the dim )
       this->SetNumberOfDimensions(2);
 
@@ -358,7 +358,7 @@ namespace otb
 
     // Automatically set the Type to Binary for GDAL data
       this->SetFileTypeToBinary();
-    
+
    // Get all the Bands
       m_poBands = new GDALRasterBand * [m_NbBands];
       if(m_poBands==NULL)
@@ -444,11 +444,11 @@ namespace otb
       {
         m_NbOctetPixel = 8;
       }
-      else 
+      else
       {
         m_NbOctetPixel = 1;
       }
-    
+
 
       /******************************************************************/
     // Pixel Type always set to Scalar for GDAL ? maybe also to vector ?
@@ -475,7 +475,7 @@ namespace otb
         {
           this->SetPixelType(VECTOR);
         }
-      }	
+      }
 
       otbMsgDevMacro(<<"m_PxType : "<<m_PxType);
       otbMsgDevMacro(<<"Component Type : "<<m_ComponentType);
@@ -483,51 +483,51 @@ namespace otb
 
 
     }
-    
+
     /*----------------------------------------------------------------------*/
     /*-------------------------- METADATA ----------------------------------*/
     /*----------------------------------------------------------------------*/
- 
+
     // Now initialize the itk dictionary
     itk::MetaDataDictionary & dico = this->GetMetaDataDictionary();
-      
-    
+
+
     /* -------------------------------------------------------------------- */
     /*  Get Spacing								*/
-    /* -------------------------------------------------------------------- */    
-       
+    /* -------------------------------------------------------------------- */
+
     // Default Spacing
     m_Spacing[0]=1;
     m_Spacing[1]=1;
     if(m_NumberOfDimensions==3)
       m_Spacing[2]=1;
-      
+
     char** papszMetadata;
-    papszMetadata =  m_poDataset->GetMetadata( NULL ); 
-    
-    
+    papszMetadata =  m_poDataset->GetMetadata( NULL );
+
+
     /* -------------------------------------------------------------------- */
     /*      Report general info.                                            */
     /* -------------------------------------------------------------------- */
     GDALDriverH		hDriver;
-    
+
     hDriver = m_poDataset->GetDriver();
-            
-    itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_DriverShortNameKey, 
-                                          static_cast<std::string>( GDALGetDriverShortName( hDriver ) ) );        
-    itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_DriverLongNameKey, 
+
+    itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_DriverShortNameKey,
+                                          static_cast<std::string>( GDALGetDriverShortName( hDriver ) ) );
+    itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_DriverLongNameKey,
                                           static_cast<std::string>( GDALGetDriverLongName( hDriver ) ) );
-            	 
 
-    /* -------------------------------------------------------------------- */    
+
+    /* -------------------------------------------------------------------- */
     /* Get the projection coordinate system of the image : ProjectionRef	*/
     /* -------------------------------------------------------------------- */
-    
+
     if( m_poDataset->GetProjectionRef() != NULL )
     {
       OGRSpatialReference*   pSR;
       const char *		      pszProjection = NULL;
-        
+
       pSR = new OGRSpatialReference( pszProjection );
 
       pszProjection =  m_poDataset->GetProjectionRef();
@@ -537,15 +537,15 @@ namespace otb
         char *	pszPrettyWkt = NULL;
 
         pSR->exportToPrettyWkt( &pszPrettyWkt, FALSE );
-        itk::EncapsulateMetaData<std::string> ( dico, MetaDataKey::m_ProjectionRefKey, 
-            static_cast<std::string>( pszPrettyWkt ) ); 
+        itk::EncapsulateMetaData<std::string> ( dico, MetaDataKey::m_ProjectionRefKey,
+            static_cast<std::string>( pszPrettyWkt ) );
 
         CPLFree( pszPrettyWkt );
       }
       else
-        itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_ProjectionRefKey, 
+        itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_ProjectionRefKey,
                                               static_cast<std::string>( m_poDataset->GetProjectionRef() ) );
-            	
+
       if (pSR != NULL)
       {
         delete pSR;
@@ -554,22 +554,22 @@ namespace otb
 
     }
 
-    /* -------------------------------------------------------------------- */    
+    /* -------------------------------------------------------------------- */
     /* Get the GCP projection coordinates of the image : GCPProjection	*/
     /* -------------------------------------------------------------------- */
-        
+
     if( m_poDataset->GetGCPCount() > 0 )
     {
-      itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_GCPProjectionKey, 
+      itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_GCPProjectionKey,
                                             static_cast<std::string>( m_poDataset->GetGCPProjection() ) );
-            	
+
       std::string key;
 
-      itk::EncapsulateMetaData<unsigned int>(dico, MetaDataKey::m_GCPCountKey, 
+      itk::EncapsulateMetaData<unsigned int>(dico, MetaDataKey::m_GCPCountKey,
                                              static_cast<unsigned int>( m_poDataset->GetGCPCount() ) );
-            	
 
-        
+
+
       for( int cpt = 0; cpt < m_poDataset->GetGCPCount(); cpt++ )
       {
         const GDAL_GCP	*psGCP;
@@ -577,31 +577,31 @@ namespace otb
         psGCP = m_poDataset->GetGCPs() + cpt;
 
         OTB_GCP	pOtbGCP(psGCP);
-                   
+
             // Complete the key with the GCP number : GCP_i
           ::itk::OStringStream lStream;
           lStream << MetaDataKey::m_GCPParametersKey << cpt;
-          key = lStream.str(); 
-            
-          itk::EncapsulateMetaData<OTB_GCP>(dico, key, pOtbGCP); 
-            
+          key = lStream.str();
+
+          itk::EncapsulateMetaData<OTB_GCP>(dico, key, pOtbGCP);
+
       }
-        
 
-        
+
+
     }
 
-    /* -------------------------------------------------------------------- */    
+    /* -------------------------------------------------------------------- */
     /*  Get the six coefficients of affine geoTtransform			*/
     /* -------------------------------------------------------------------- */
 
     double adfGeoTransform[6];
     VectorType VadfGeoTransform;
-      
+
     if( m_poDataset->GetGeoTransform( adfGeoTransform ) == CE_None )
     {
       for(int cpt = 0 ; cpt < 6 ; cpt++ ) VadfGeoTransform.push_back(adfGeoTransform[cpt]);
-    	
+
       itk::EncapsulateMetaData<VectorType>(dico, MetaDataKey::m_GeoTransformKey, VadfGeoTransform);
 
 	/// retrieve orgin and spacing from the geo transform
@@ -621,12 +621,12 @@ namespace otb
       std::string key;
 
       for( int cpt = 0; papszMetadata[cpt] != NULL; cpt++ )
-      {       
+      {
           ::itk::OStringStream lStream;
           lStream << MetaDataKey::m_MetadataKey << cpt;
-          key = lStream.str(); 
-            
-          itk::EncapsulateMetaData<std::string>(dico, key, 
+          key = lStream.str();
+
+          itk::EncapsulateMetaData<std::string>(dico, key,
               static_cast<std::string>( papszMetadata[cpt] ) );
       }
     }
@@ -639,32 +639,32 @@ namespace otb
     if( CSLCount(papszMetadata) > 0 )
     {
       std::string key;
-        
+
       for( int cpt = 0; papszMetadata[cpt] != NULL; cpt++ )
       {
           ::itk::OStringStream lStream;
           lStream << MetaDataKey::m_SubMetadataKey << cpt;
-          key = lStream.str(); 
-            
-          itk::EncapsulateMetaData<std::string>(dico, key, 
+          key = lStream.str();
+
+          itk::EncapsulateMetaData<std::string>(dico, key,
               static_cast<std::string>( papszMetadata[cpt] ) );
       }
     }
 
-    
+
     /* -------------------------------------------------------------------- */
     /* Report corners							*/
     /* -------------------------------------------------------------------- */
-   
+
     double GeoX(0), GeoY(0);
     VectorType VGeo;
 
-    GDALInfoReportCorner( "Upper Left", 0.0, 0.0, GeoX, GeoY  );    
+    GDALInfoReportCorner( "Upper Left", 0.0, 0.0, GeoX, GeoY  );
     VGeo.push_back(GeoX);
     VGeo.push_back(GeoY);
-    
+
     itk::EncapsulateMetaData<VectorType>(dico, MetaDataKey::m_UpperLeftCornerKey, VGeo);
-        
+
     VGeo.clear();
 
     GDALInfoReportCorner( "Upper Right", m_width, 0.0, GeoX, GeoY );
@@ -674,15 +674,15 @@ namespace otb
     itk::EncapsulateMetaData<VectorType>(dico, MetaDataKey::m_UpperRightCornerKey, VGeo);
 
     VGeo.clear();
-    
+
     GDALInfoReportCorner( "Lower Left", 0.0, m_height, GeoX, GeoY);
     VGeo.push_back(GeoX);
     VGeo.push_back(GeoY);
-    
+
     itk::EncapsulateMetaData<VectorType>(dico, MetaDataKey::m_LowerLeftCornerKey, VGeo);
 
     VGeo.clear();
-   
+
     GDALInfoReportCorner( "Lower Right", m_width, m_height, GeoX, GeoY );
     VGeo.push_back(GeoX);
     VGeo.push_back(GeoY);
@@ -690,10 +690,10 @@ namespace otb
     itk::EncapsulateMetaData<VectorType>(dico, MetaDataKey::m_LowerRightCornerKey, VGeo);
 
     VGeo.clear();
- 
+
     /* -------------------------------------------------------------------- */
     /* Color Table								*/
-    /* -------------------------------------------------------------------- */ 
+    /* -------------------------------------------------------------------- */
 
     for(int iBand = 0; iBand <m_poDataset->GetRasterCount(); iBand++ )
     {
@@ -702,13 +702,13 @@ namespace otb
       hBand=GDALGetRasterBand(m_poDataset,iBand+1);
       if(GDALGetRasterColorInterpretation(hBand)==GCI_PaletteIndex&&(hTable=GDALGetRasterColorTable(hBand))!=NULL)
       {
-        unsigned int ColorEntryCount=GDALGetColorEntryCount(hTable);    
-	  
-        itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_ColorTableNameKey, 
-                                              static_cast<std::string>( GDALGetPaletteInterpretationName( 
-                                                  GDALGetPaletteInterpretation( hTable ) ) ) );    
-            				    
-        itk::EncapsulateMetaData<unsigned int>(dico, MetaDataKey::m_ColorEntryCountKey, ColorEntryCount);        
+        unsigned int ColorEntryCount=GDALGetColorEntryCount(hTable);
+
+        itk::EncapsulateMetaData<std::string>(dico, MetaDataKey::m_ColorTableNameKey,
+                                              static_cast<std::string>( GDALGetPaletteInterpretationName(
+                                                  GDALGetPaletteInterpretation( hTable ) ) ) );
+
+        itk::EncapsulateMetaData<unsigned int>(dico, MetaDataKey::m_ColorEntryCountKey, ColorEntryCount);
 
         for(int i = 0; i < GDALGetColorEntryCount( hTable ); i++ )
         {
@@ -716,17 +716,17 @@ namespace otb
           VectorType VColorEntry;
 
           GDALGetColorEntryAsRGB( hTable, i, &sEntry );
-                
+
           VColorEntry.push_back(sEntry.c1);
           VColorEntry.push_back(sEntry.c2);
           VColorEntry.push_back(sEntry.c3);
           VColorEntry.push_back(sEntry.c4);
-                
+
           itk::EncapsulateMetaData<VectorType>(dico, MetaDataKey::m_ColorEntryAsRGBKey, VColorEntry);
-                
+
         }
-      } 
-    }        
+      }
+    }
     otbMsgDebugMacro( <<"Driver to read: GDAL");
     otbMsgDebugMacro( <<"         Read  file         : "<< m_FileName);
     otbMsgDebugMacro( <<"         Size               : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
@@ -743,7 +743,7 @@ namespace otb
       return false;
     }
 
-        //Traitement particulier sur certain format o� l'on pr�f�re utiliser 
+        //Traitement particulier sur certain format o� l'on pr�f�re utiliser
         // Format PNG -> lecture avec ITK (pas GDAL)
 /*  	itk::PNGImageIO::Pointer lPNGImageIO = itk::PNGImageIO::New();
     lCanWrite = lPNGImageIO->CanWriteFile(name);
@@ -758,8 +758,8 @@ namespace otb
     {
       return false;
     }
-        
-    return true;  	
+
+    return true;
 
   }
 
@@ -800,7 +800,7 @@ namespace otb
     std::streamoff lNbPixels = static_cast<std::streamoff>(lNbColumns)*static_cast<std::streamoff>(lNbLines);
     std::streamoff lTailleBuffer = static_cast<std::streamoff>(m_NbOctetPixel)*lNbPixels;
     otbMsgDevMacro( <<" TailleBuffer allocated : "<< lTailleBuffer);
-        
+
     unsigned char* value = new unsigned char[lTailleBuffer];
     if(value==NULL)
     {
@@ -812,12 +812,12 @@ namespace otb
     step = step * static_cast<std::streamoff>(m_NbOctetPixel);
 
     CPLErr lCrGdal;
-        
- 
+
+
     for (unsigned int nbComponents = 0 ; nbComponents < this->GetNumberOfComponents() ; nbComponents++)
     {
       cpt = static_cast<std::streamoff>(nbComponents)* static_cast<std::streamoff>(m_NbOctetPixel);
-     
+
       for ( std::streamoff i=0 ; i < lTailleBuffer ; i = i+static_cast<std::streamoff>(m_NbOctetPixel) )
       {
         memcpy((void*)(&(value[i])),(const void*)(&(p[cpt])),(size_t)(m_NbOctetPixel));
@@ -850,7 +850,7 @@ namespace otb
   {
 
   }
-  
+
   void GDALImageIO::InternalWriteImageInformation()
   {
 
@@ -903,12 +903,12 @@ namespace otb
       m_NbOctetPixel = 8;
       m_PxType = GDT_Float64;
     }
-    else 
+    else
     {
       m_NbOctetPixel = 1;
       m_PxType = GDT_Byte;
     }
-    
+
         // Automatically set the Type to Binary for GDAL data
     this->SetFileTypeToBinary();
 
@@ -927,7 +927,7 @@ namespace otb
       itkExceptionMacro(<< "GDAL Writing failed : Driver not reconized");
     }
     std::string realFileName = GetGdalWriteImageFileName(extGDAL, m_FileName);
-        
+
     if(m_poDataset != NULL)
     {
       delete m_poDataset;
@@ -941,7 +941,7 @@ namespace otb
 
    	// Get all the Bands
     m_poBands = new GDALRasterBand* [m_NbBands];
-    	
+
     if(m_poBands==NULL)
     {
       itkExceptionMacro(<<"Memory allocation error for 'rasterBands'");
@@ -957,28 +957,28 @@ namespace otb
     otbMsgDebugMacro( <<"         Size               : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
     otbMsgDebugMacro( <<"         ComponentType      : "<<this->GetComponentType() );
     otbMsgDebugMacro( <<"         NumberOfComponents : "<<this->GetNumberOfComponents());
-	
-	
+
+
 	// JULIEN: ADDING SUPPORT FOR METADATA WRITING.
-	
+
 
     /*----------------------------------------------------------------------*/
     /*-------------------------- METADATA ----------------------------------*/
     /*----------------------------------------------------------------------*/
- 
+
 	// Now initialize the itk dictionary
-    itk::MetaDataDictionary & dico = this->GetMetaDataDictionary();      
+    itk::MetaDataDictionary & dico = this->GetMetaDataDictionary();
     char** papszMetadata;
     papszMetadata =  m_poDataset->GetMetadata( NULL );
     itk::OStringStream oss;
 
-	
-    /* -------------------------------------------------------------------- */    
+
+    /* -------------------------------------------------------------------- */
     /* Set the GCPs	                                                        */
     /* -------------------------------------------------------------------- */
-        
+
     unsigned int gcpCount = ImageBase::GetGCPCount(dico);
-	
+
     if(gcpCount>0)
     {
 
@@ -994,39 +994,39 @@ namespace otb
         gdalGcps[gcpIndex].dfGCPX = ImageBase::GetGCPX(dico,gcpIndex);
         gdalGcps[gcpIndex].dfGCPY = ImageBase::GetGCPY(dico,gcpIndex);
         gdalGcps[gcpIndex].dfGCPZ = ImageBase::GetGCPZ(dico,gcpIndex);
-		
+
       }
-	    
+
       m_poDataset->SetGCPs(gcpCount,gdalGcps,ImageBase::GetGCPProjection(dico).c_str());
-	    
+
       delete [] gdalGcps;
     }
 
-    /* -------------------------------------------------------------------- */    
+    /* -------------------------------------------------------------------- */
     /* Set the projection coordinate system of the image : ProjectionRef	*/
     /* -------------------------------------------------------------------- */
-    
-	
+
+
     if(!ImageBase::GetProjectionRef(dico).empty())
     {
       m_poDataset->SetProjection(ImageBase::GetProjectionRef(dico).c_str());
     }
-	
-    /* -------------------------------------------------------------------- */    
+
+    /* -------------------------------------------------------------------- */
     /*  Set the six coefficients of affine geoTtransform			*/
     /* -------------------------------------------------------------------- */
-	
-  
+
+
 
     double * geoTransform = new double[6];
 	    /// Reporting origin and spacing
-    geoTransform[0]=m_Origin[0];            
+    geoTransform[0]=m_Origin[0];
     geoTransform[3]=m_Origin[1];
     geoTransform[1]=m_Spacing[0];
     geoTransform[5]=m_Spacing[1];
-            
-            // FIXME: Here component 1 and 4 should be replaced by the orientation parameters 
-    geoTransform[2]=0.;            
+
+            // FIXME: Here component 1 and 4 should be replaced by the orientation parameters
+    geoTransform[2]=0.;
     geoTransform[4]=0.;
     m_poDataset->SetGeoTransform(geoTransform);
     delete [] geoTransform;
@@ -1040,7 +1040,7 @@ namespace otb
     std::string svalue="";
     std::vector<std::string> keys = dico.GetKeys();
     MetaDataKey key;
-	    
+
     for (unsigned int itkey=0; itkey<keys.size(); itkey++)
     {
       if(keys[itkey].compare(0,key.m_MetadataKey.length(),key.m_MetadataKey)==0)
@@ -1053,18 +1053,18 @@ namespace otb
         m_poDataset->SetMetadataItem(tag.c_str(),value.c_str(),NULL);
       }
     }
-	    // END 
-	    
-  }	
+	    // END
+
+  }
 
   std::string GDALImageIO::TypeConversion(std::string name)
   {
     std::string extension;
     std::string extGDAL;
-	
+
 	//Recuperer extension du fichier image
     extension = System::GetExtension(name);
-        
+
     if ((extension=="tif")||(extension=="tiff")||(extension=="TIF")||(extension=="TIFF"))
       extGDAL="GTiff";
     else if ((extension=="hdr")||(extension=="HDR"))
@@ -1078,8 +1078,8 @@ namespace otb
 //	else if ((extension=="jpg")||(extension=="JPG")||(extension=="jpeg")||(extension=="JPEG"))
 //			extGDAL="JPEG";
     else
-      extGDAL="NOT-FOUND"; 
-    return(extGDAL);   
+      extGDAL="NOT-FOUND";
+    return(extGDAL);
   }
 
   std::string GDALImageIO::GetGdalWriteImageFileName(std::string & extGDAL, std::string filename)
@@ -1092,16 +1092,16 @@ namespace otb
     {
       gdalFileName = System::GetRootName(filename);
     }
-    return(gdalFileName);   
+    return(gdalFileName);
   }
 
   bool GDALImageIO::GDALInfoReportCorner( const char * corner_name, double x, double y, double &GeoX, double &GeoY)
   {
     const char  *pszProjection;
     double	adfGeoTransform[6];
- 
+
     bool IsTrue;
-        
+
     /* -------------------------------------------------------------------- */
     /*      Transform the point into georeferenced coordinates.             */
     /* -------------------------------------------------------------------- */
@@ -1125,5 +1125,5 @@ namespace otb
 
     return IsTrue;
   }
-  
+
 } // end namespace otb
diff --git a/Code/IO/otbGDALImageIO.h b/Code/IO/otbGDALImageIO.h
index 208b62e625..5fba72bceb 100644
--- a/Code/IO/otbGDALImageIO.h
+++ b/Code/IO/otbGDALImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -59,12 +59,12 @@ class ITK_EXPORT GDALImageIO : public itk::ImageIOBase,
 public:
 
   typedef unsigned char InputPixelType;
-  
+
   /** Standard class typedefs. */
   typedef GDALImageIO            Self;
   typedef itk::ImageIOBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -81,16 +81,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -114,13 +114,13 @@ public:
 
   // JULIEN: NOT USED, NOT IMPLEMENTED
   //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
 protected:
   /** Construtor.*/
   GDALImageIO();
   /** Destructor.*/
   ~GDALImageIO();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
   /** Read all information on the image*/
   void InternalReadImageInformation();
@@ -134,8 +134,8 @@ protected:
   int m_NbBands;
   /** Buffer*/
   //float **pafimas;
-  
-  /** Determines the level of compression for written files. 
+
+  /** Determines the level of compression for written files.
    *  Range 0-9; 0 = none, 9 = maximum , default = 4 */
   int m_CompressionLevel;
   const char* m_currentfile;
@@ -144,7 +144,7 @@ private:
   GDALImageIO(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
- 
+
   /** Determine real file name to write the image */
   std::string GetGdalWriteImageFileName(std::string & extGDAL, std::string filename );
 
@@ -157,7 +157,7 @@ private:
   GDALDataType m_PxType;
   /** Nombre d'octets par pixel */
   int           m_NbOctetPixel;
-  
+
   bool GDALInfoReportCorner( const char * corner_name, double x, double y,
                            double &dfGeoX, double &dfGeoY);
 
diff --git a/Code/IO/otbGDALImageIOFactory.cxx b/Code/IO/otbGDALImageIOFactory.cxx
index d473820828..97e7a1de02 100644
--- a/Code/IO/otbGDALImageIOFactory.cxx
+++ b/Code/IO/otbGDALImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbGDALImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ GDALImageIOFactory::GDALImageIOFactory()
                          1,
                          itk::CreateObjectFunction<GDALImageIO>::New());
 }
-  
+
 GDALImageIOFactory::~GDALImageIOFactory()
 {
 }
 
-const char* 
+const char*
 GDALImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 GDALImageIOFactory::GetDescription() const
 {
   return "GDAL ImageIO Factory, permettant le chargement d'image GDAL dans l'OTB";
diff --git a/Code/IO/otbGDALImageIOFactory.h b/Code/IO/otbGDALImageIOFactory.h
index ba4d17973b..d077848221 100644
--- a/Code/IO/otbGDALImageIOFactory.h
+++ b/Code/IO/otbGDALImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,17 +29,17 @@ namespace otb
  */
 class ITK_EXPORT GDALImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef GDALImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -62,8 +62,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbImage.h b/Code/IO/otbImage.h
index d3a68087ea..6e83603a58 100644
--- a/Code/IO/otbImage.h
+++ b/Code/IO/otbImage.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,23 +39,23 @@ namespace otb
  * \brief Creation of an "otb" image which contains metadata.
  *
  */
- 
-// Le 3ieme parametre template est bidon MAIS necessaire pour compiler avec Microsoft Visual C++ 6.0 
-template <class TPixel,unsigned int VImageDimension> 
+
+// Le 3ieme parametre template est bidon MAIS necessaire pour compiler avec Microsoft Visual C++ 6.0
+template <class TPixel,unsigned int VImageDimension>
 class ITK_EXPORT Image : public itk::Image<TPixel,VImageDimension>,
 				ImageBase
-					 
+
 {
-public: 
+public:
   /** Standard class typedefs. */
   typedef Image   Self;
   typedef itk::Image<TPixel, VImageDimension>  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
   typedef itk::WeakPointer<const Self>  ConstWeakPointer;
-  
-  typedef ImageBase::VectorType	VectorType;	
-  typedef ImageBase::ImageKeywordlistType	ImageKeywordlistType;	
+
+  typedef ImageBase::VectorType	VectorType;
+  typedef ImageBase::ImageKeywordlistType	ImageKeywordlistType;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
@@ -85,7 +85,7 @@ public:
   typedef itk::DefaultPixelAccessorFunctor< Self > AccessorFunctorType;
 
   /** Tyepdef for the functor used to access a neighborhood of pixel pointers.*/
-  typedef itk::NeighborhoodAccessorFunctor< Self > 
+  typedef itk::NeighborhoodAccessorFunctor< Self >
                                             NeighborhoodAccessorFunctorType;
 
 
@@ -129,7 +129,7 @@ public:
   typedef typename Superclass::OffsetValueType OffsetValueType;
 
   /** Return the Pixel Accessor object */
-  AccessorType GetPixelAccessor( void ) 
+  AccessorType GetPixelAccessor( void )
     { return AccessorType(); }
 
   /** Return the Pixel Accesor object */
@@ -137,9 +137,9 @@ public:
     { return AccessorType(); }
 
   /** Return the NeighborhoodAccessor functor */
-  NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() 
+  NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
     { return NeighborhoodAccessorFunctorType(); }
-  
+
   /** Return the NeighborhoodAccessor functor */
   const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
     { return NeighborhoodAccessorFunctorType(); }
@@ -148,31 +148,31 @@ public:
 
   /** Get the projection coordinate system of the image. */
   virtual std::string GetProjectionRef( void );
-  
+
   /** Get the GCP projection coordinates of the image. */
   virtual std::string GetGCPProjection( void );
-  
+
   virtual unsigned int GetGCPCount( void );
-  
+
   virtual OTB_GCP & GetGCPs ( unsigned int GCPnum );
-    
-  virtual std::string GetGCPId( unsigned int GCPnum );   
+
+  virtual std::string GetGCPId( unsigned int GCPnum );
   virtual std::string GetGCPInfo( unsigned int GCPnum );
-  virtual double GetGCPRow( unsigned int GCPnum ); 
-  virtual double GetGCPCol( unsigned int GCPnum ); 	
-  virtual double GetGCPX( unsigned int GCPnum ); 
-  virtual double GetGCPY( unsigned int GCPnum ); 
+  virtual double GetGCPRow( unsigned int GCPnum );
+  virtual double GetGCPCol( unsigned int GCPnum );
+  virtual double GetGCPX( unsigned int GCPnum );
+  virtual double GetGCPY( unsigned int GCPnum );
   virtual double GetGCPZ( unsigned int GCPnum );
-  
+
   /** Get the six coefficients of affine geoTtransform. */
-  virtual VectorType GetGeoTransform( void ); 
-  
+  virtual VectorType GetGeoTransform( void );
+
   /** Get image corners. */
   virtual VectorType GetUpperLeftCorner( void );
   virtual VectorType GetUpperRightCorner( void );
   virtual VectorType GetLowerLeftCorner( void );
   virtual VectorType GetLowerRightCorner( void );
-  
+
   /** Get image keyword list */
   virtual ImageKeywordlistType GetImageKeywordlist(void);
 
@@ -189,10 +189,10 @@ protected:
 private:
   Image(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
-  
-  
+
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/IO/otbImage.txx b/Code/IO/otbImage.txx
index b9785187d0..25691cbccc 100644
--- a/Code/IO/otbImage.txx
+++ b/Code/IO/otbImage.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,116 +27,116 @@
 namespace otb
 {
 
-template <class TPixel, unsigned int VImageDimension> 
+template <class TPixel, unsigned int VImageDimension>
 Image<TPixel,VImageDimension>::Image()
 {
 }
 
-template <class TPixel, unsigned int VImageDimension> 
+template <class TPixel, unsigned int VImageDimension>
 std::string Image<TPixel, VImageDimension>::GetProjectionRef( void )
 {
-   return ( ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension> 
+template <class TPixel, unsigned int VImageDimension>
 std::string Image<TPixel, VImageDimension>::GetGCPProjection( void )
 {
-   return ( ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
-unsigned int Image<TPixel, VImageDimension>::GetGCPCount( void  ) 
+template <class TPixel, unsigned int VImageDimension>
+unsigned int Image<TPixel, VImageDimension>::GetGCPCount( void  )
 {
-   return ( ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 OTB_GCP & Image<TPixel, VImageDimension>::GetGCPs ( unsigned int GCPnum )
 {
-   return (this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) );	
+   return (this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) );
 }
-    
-template <class TPixel, unsigned int VImageDimension>   
-std::string Image<TPixel, VImageDimension>::GetGCPId( unsigned int GCPnum  ) 
+
+template <class TPixel, unsigned int VImageDimension>
+std::string Image<TPixel, VImageDimension>::GetGCPId( unsigned int GCPnum  )
 {
-   return ( ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
+
+template <class TPixel, unsigned int VImageDimension>
 std::string Image<TPixel, VImageDimension>::GetGCPInfo( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double Image<TPixel, VImageDimension>::GetGCPRow( unsigned int GCPnum ) 
+
+template <class TPixel, unsigned int VImageDimension>
+double Image<TPixel, VImageDimension>::GetGCPRow( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double Image<TPixel, VImageDimension>::GetGCPCol( unsigned int GCPnum )	
+
+template <class TPixel, unsigned int VImageDimension>
+double Image<TPixel, VImageDimension>::GetGCPCol( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double Image<TPixel, VImageDimension>::GetGCPX( unsigned int GCPnum ) 
-{	
-   return ( ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );	
+
+template <class TPixel, unsigned int VImageDimension>
+double Image<TPixel, VImageDimension>::GetGCPX( unsigned int GCPnum )
+{
+   return ( ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );
 }
- 
-template <class TPixel, unsigned int VImageDimension>   
-double Image<TPixel, VImageDimension>::GetGCPY( unsigned int GCPnum ) 
+
+template <class TPixel, unsigned int VImageDimension>
+double Image<TPixel, VImageDimension>::GetGCPY( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double Image<TPixel, VImageDimension>::GetGCPZ( unsigned int GCPnum ) 
+
+template <class TPixel, unsigned int VImageDimension>
+double Image<TPixel, VImageDimension>::GetGCPZ( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
-ImageBase::VectorType Image<TPixel, VImageDimension>::GetGeoTransform( void ) 
+template <class TPixel, unsigned int VImageDimension>
+ImageBase::VectorType Image<TPixel, VImageDimension>::GetGeoTransform( void )
 {
-   return ( ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType Image<TPixel, VImageDimension>::GetUpperLeftCorner( void )
 {
-   return ( ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType Image<TPixel, VImageDimension>::GetUpperRightCorner( void )
 {
-   return ( ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType Image<TPixel, VImageDimension>::GetLowerLeftCorner( void )
 {
-   return ( ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType Image<TPixel, VImageDimension>::GetLowerRightCorner( void )
 {
-   return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::ImageKeywordlistType Image<TPixel, VImageDimension>::GetImageKeywordlist( void )
 {
-   return ( ImageBase::GetImageKeywordlist( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetImageKeywordlist( this->GetMetaDataDictionary() ) );
 }
 
 
-template <class TPixel, unsigned int VImageDimension> 
-void 
+template <class TPixel, unsigned int VImageDimension>
+void
 Image<TPixel, VImageDimension>
 ::CopyInformation(const itk::DataObject * data)
 {
@@ -144,14 +144,14 @@ Image<TPixel, VImageDimension>
   this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary());
 }
 
-template <class TPixel, unsigned int VImageDimension> 
-void 
+template <class TPixel, unsigned int VImageDimension>
+void
 Image<TPixel, VImageDimension>::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os,indent);
-  
+
   this->ImageBase::PrintSelf( os, indent, this->GetMetaDataDictionary() );
-  
+
 }
 
 
diff --git a/Code/IO/otbImageBase.cxx b/Code/IO/otbImageBase.cxx
index 688afcfef6..8c400face5 100644
--- a/Code/IO/otbImageBase.cxx
+++ b/Code/IO/otbImageBase.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,13 +34,13 @@ namespace otb
 
 ImageBase::ImageBase()
 {
-	
+
 }
 
 std::string ImageBase::GetProjectionRef(MetaDataDictionaryType & dict )
 {
   std::string metadata;
-  
+
   if(dict.HasKey(MetaDataKey::m_ProjectionRefKey))
      {
      itk::ExposeMetaData<std::string>(dict, static_cast<std::string>(MetaDataKey::m_ProjectionRefKey), metadata);
@@ -53,7 +53,7 @@ std::string ImageBase::GetProjectionRef(MetaDataDictionaryType & dict )
 std::string ImageBase::GetGCPProjection(MetaDataDictionaryType & dict )
 {
   std::string metadata;
-  
+
   if(dict.HasKey(MetaDataKey::m_GCPProjectionKey))
      {
      itk::ExposeMetaData<std::string>(dict, static_cast<std::string>(MetaDataKey::m_GCPProjectionKey), metadata);
@@ -66,7 +66,7 @@ std::string ImageBase::GetGCPProjection(MetaDataDictionaryType & dict )
 unsigned int ImageBase::GetGCPCount(MetaDataDictionaryType & dict)
 {
   unsigned int GCPCount = 0;
-  
+
   if(dict.HasKey(MetaDataKey::m_GCPCountKey))
      {
      itk::ExposeMetaData<unsigned int>(dict, MetaDataKey::m_GCPCountKey, GCPCount);
@@ -79,28 +79,28 @@ unsigned int ImageBase::GetGCPCount(MetaDataDictionaryType & dict)
 OTB_GCP & ImageBase::GetGCPs(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-  
+  key = lStream.str();
+
   if(dict.HasKey(key))
      {
-       
+
      itk::ExposeMetaData<OTB_GCP>(dict, key,m_GCP);
      }
-  return ( m_GCP );	
-	
+  return ( m_GCP );
+
 }
 
 std::string ImageBase::GetGCPId(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-  
+  key = lStream.str();
+
   if(dict.HasKey(key))
      {
        OTB_GCP gcp;
@@ -114,11 +114,11 @@ std::string ImageBase::GetGCPId(MetaDataDictionaryType & dict, unsigned int GCPn
 std::string ImageBase::GetGCPInfo(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-  
+  key = lStream.str();
+
   if(dict.HasKey(key))
      {
        OTB_GCP gcp;
@@ -132,11 +132,11 @@ std::string ImageBase::GetGCPInfo(MetaDataDictionaryType & dict, unsigned int GC
 double ImageBase::GetGCPRow(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-  
+  key = lStream.str();
+
 
   if(dict.HasKey(key))
      {
@@ -151,11 +151,11 @@ double ImageBase::GetGCPRow(MetaDataDictionaryType & dict, unsigned int GCPnum )
 double ImageBase::GetGCPCol(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-  
+  key = lStream.str();
+
 
   if(dict.HasKey(key))
      {
@@ -170,11 +170,11 @@ double ImageBase::GetGCPCol(MetaDataDictionaryType & dict, unsigned int GCPnum )
 double ImageBase::GetGCPX(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-      
+  key = lStream.str();
+
   if(dict.HasKey(key))
      {
        OTB_GCP gcp;
@@ -188,11 +188,11 @@ double ImageBase::GetGCPX(MetaDataDictionaryType & dict, unsigned int GCPnum )
 double ImageBase::GetGCPY(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-  
+  key = lStream.str();
+
   if(dict.HasKey(key))
      {
        OTB_GCP gcp;
@@ -206,11 +206,11 @@ double ImageBase::GetGCPY(MetaDataDictionaryType & dict, unsigned int GCPnum )
 double ImageBase::GetGCPZ(MetaDataDictionaryType & dict, unsigned int GCPnum )
 {
   std::string key;
-  
+
   ::itk::OStringStream lStream;
   lStream << MetaDataKey::m_GCPParametersKey << GCPnum;
-  key = lStream.str(); 
-     
+  key = lStream.str();
+
   if(dict.HasKey(key))
      {
        OTB_GCP gcp;
@@ -224,7 +224,7 @@ double ImageBase::GetGCPZ(MetaDataDictionaryType & dict, unsigned int GCPnum )
 ImageBase::VectorType ImageBase::GetGeoTransform( MetaDataDictionaryType & dict )
 {
   VectorType adfGeoTransform;
-  
+
   if(dict.HasKey(MetaDataKey::m_GeoTransformKey))
      {
      itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_GeoTransformKey, adfGeoTransform);
@@ -235,61 +235,61 @@ ImageBase::VectorType ImageBase::GetGeoTransform( MetaDataDictionaryType & dict
 ImageBase::VectorType ImageBase::GetUpperLeftCorner( MetaDataDictionaryType & dict )
 {
   VectorType UpperLeftCorner;
-  
+
   if(dict.HasKey(MetaDataKey::m_UpperLeftCornerKey))
      {
-     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_UpperLeftCornerKey, UpperLeftCorner);     
+     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_UpperLeftCornerKey, UpperLeftCorner);
      }
    return ( UpperLeftCorner );
-}  
+}
 
 ImageBase::VectorType ImageBase::GetUpperRightCorner( MetaDataDictionaryType & dict )
 {
   VectorType UpperRightCorner;
-  
+
   if(dict.HasKey(MetaDataKey::m_UpperRightCornerKey))
      {
-     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_UpperRightCornerKey, UpperRightCorner);     
+     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_UpperRightCornerKey, UpperRightCorner);
      }
    return ( UpperRightCorner );
-}  
+}
 
 ImageBase::VectorType ImageBase::GetLowerLeftCorner( MetaDataDictionaryType & dict )
 {
   VectorType LowerLeftCorner;
-  
+
   if(dict.HasKey(MetaDataKey::m_LowerLeftCornerKey))
      {
-     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_LowerLeftCornerKey, LowerLeftCorner);     
+     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_LowerLeftCornerKey, LowerLeftCorner);
      }
    return ( LowerLeftCorner );
-}  
+}
 
 ImageBase::VectorType ImageBase::GetLowerRightCorner( MetaDataDictionaryType & dict )
 {
   VectorType LowerRightCorner;
-  
+
   if(dict.HasKey(MetaDataKey::m_LowerRightCornerKey))
      {
-     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_LowerRightCornerKey, LowerRightCorner);     
+     itk::ExposeMetaData<VectorType>(dict, MetaDataKey::m_LowerRightCornerKey, LowerRightCorner);
      }
    return ( LowerRightCorner );
-}   
+}
 
 ImageBase::ImageKeywordlistType ImageBase::GetImageKeywordlist( MetaDataDictionaryType & dict )
 {
   ImageKeywordlistType ImageKeywordlist;
-  
+
   if(dict.HasKey(MetaDataKey::m_OSSIMKeywordlistKey))
      {
-     itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::m_OSSIMKeywordlistKey, ImageKeywordlist);     
+     itk::ExposeMetaData<ImageKeywordlistType>(dict, MetaDataKey::m_OSSIMKeywordlistKey, ImageKeywordlist);
      }
    return ( ImageKeywordlist );
-}   
+}
 
 void
 ImageBase::PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType & dict) const
-{ 
+{
 
   std::vector<std::string> keys = dict.GetKeys();
   std::string svalue;
@@ -299,54 +299,54 @@ ImageBase::PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDiction
   OTB_GCP gcpvalue;
   ImageKeywordlist ossimvalue;
   unsigned int i ;
-  
+
   // Copy of the const metadata dictionary in a metadata dictionary to be used
   // by the ExposeMetaData method
-  
+
   MetaDataDictionaryType dict2 = dict;
   MetaDataKey key;
-  
+
   for (unsigned int itkey=0; itkey<keys.size(); itkey++)
      {
 
-     
+
      switch( key.GetKeyType(keys[itkey]) )
         {
         case MetaDataKey::TSTRING:
            itk::ExposeMetaData<std::string>(dict2, keys[itkey], svalue);
            os << indent << "---> " << keys[itkey] << " = " << svalue << std::endl;
            break;
-           
+
         case MetaDataKey::TENTIER:
            itk::ExposeMetaData<unsigned int>(dict2, keys[itkey], ivalue);
            os << indent << "---> " << keys[itkey] << " = " << ivalue << std::endl;
-           break; 
-                     	
+           break;
+
         case MetaDataKey::TVECTOR:
            itk::ExposeMetaData<VectorType>(dict2, keys[itkey], vvalue);
-           
+
            for(i = 0 ; i < vvalue.size() ; i++ )
 	      {
 	      os << indent << "---> " << keys[itkey] << "[" << i <<"] = "<< vvalue[i]<< std::endl;
 	      }
 	   vvalue.clear();
-	   
+
            break;
-           
+
         case MetaDataKey::TDOUBLE:
            itk::ExposeMetaData<double>(dict2, keys[itkey], dvalue);
            os << indent << "---> " << keys[itkey] << " = " << dvalue << std::endl;
            break;
-             
+
         case MetaDataKey::TOTB_GCP:
            itk::ExposeMetaData<OTB_GCP>(dict2, keys[itkey], gcpvalue);
-           
+
            os << indent << "---> " << keys[itkey] << std::endl;
            gcpvalue.Print(os);
-           break;                            	
+           break;
 		case MetaDataKey::TOSSIMKEYWORDLIST:
 		   itk::ExposeMetaData<ImageKeywordlist>(dict2, keys[itkey], ossimvalue);
-        
+
 		   os << indent << "---> " << keys[itkey] << std::endl;
 		   ossimvalue.Print(os);
 		   // ossimvalue.Print(os);
@@ -354,7 +354,7 @@ ImageBase::PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDiction
 		}
 
      }
-  
-}    
-  
+
+}
+
 } // end namespace otb
diff --git a/Code/IO/otbImageBase.h b/Code/IO/otbImageBase.h
index 3880a4239a..0e0f236dc4 100644
--- a/Code/IO/otbImageBase.h
+++ b/Code/IO/otbImageBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,19 +43,19 @@ public:
 
   typedef ImageBase Self;
 
-  typedef itk::MetaDataDictionary 	MetaDataDictionaryType;  
-  
+  typedef itk::MetaDataDictionary 	MetaDataDictionaryType;
+
   typedef MetaDataKey::VectorType	VectorType;
-  
+
   typedef ImageKeywordlist              ImageKeywordlistType;
-  
+
   /** Get the projection coordinate system of the image. */
-  
+
   static std::string GetProjectionRef( MetaDataDictionaryType & dict );
   virtual std::string GetProjectionRef( void ) = 0;
-  
+
   /** Get the GCP projection coordinates of the image. */
-  
+
   static std::string GetGCPProjection( MetaDataDictionaryType & dict );
   virtual std::string GetGCPProjection( void ) = 0;
 
@@ -64,67 +64,67 @@ public:
 
   OTB_GCP & GetGCPs(MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual OTB_GCP & GetGCPs( unsigned int GCPnum ) = 0;
-    
+
   static std::string GetGCPId( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual std::string GetGCPId( unsigned int GCPnum ) = 0;
-  
+
   static std::string GetGCPInfo( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual std::string GetGCPInfo( unsigned int GCPnum ) = 0;
-  
+
   static double GetGCPRow( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual double GetGCPRow( unsigned int GCPnum ) = 0;
-  
+
   static double GetGCPCol( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual double GetGCPCol( unsigned int GCPnum ) = 0;
-  
+
   static double GetGCPX( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual double GetGCPX( unsigned int GCPnum ) = 0;
-  
+
   static double GetGCPY( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual double GetGCPY( unsigned int GCPnum ) = 0;
-  
+
   static double GetGCPZ( MetaDataDictionaryType & dict, unsigned int GCPnum );
   virtual double GetGCPZ( unsigned int GCPnum ) = 0;
-  
+
   /** Get the six coefficients of affine geoTtransform. */
-   
+
   static VectorType GetGeoTransform( MetaDataDictionaryType & dict );
   virtual VectorType GetGeoTransform( void ) = 0;
- 
-  /** Get image corners. */  
-  
+
+  /** Get image corners. */
+
   static VectorType GetUpperLeftCorner( MetaDataDictionaryType & dict );
-  virtual VectorType GetUpperLeftCorner() = 0; 
-  
+  virtual VectorType GetUpperLeftCorner() = 0;
+
   static VectorType GetUpperRightCorner( MetaDataDictionaryType & dict );
-  virtual VectorType GetUpperRightCorner() = 0;      
-  
+  virtual VectorType GetUpperRightCorner() = 0;
+
   static VectorType GetLowerLeftCorner( MetaDataDictionaryType & dict );
-  virtual VectorType GetLowerLeftCorner() = 0; 
-  
+  virtual VectorType GetLowerLeftCorner() = 0;
+
   static VectorType GetLowerRightCorner( MetaDataDictionaryType & dict );
-  virtual VectorType GetLowerRightCorner() = 0; 
-  
+  virtual VectorType GetLowerRightCorner() = 0;
+
   /** Get the ImageKeywordlist */
   static ImageKeywordlistType GetImageKeywordlist( MetaDataDictionaryType & dict );
-  virtual ImageKeywordlistType GetImageKeywordlist() = 0; 
-  
+  virtual ImageKeywordlistType GetImageKeywordlist() = 0;
+
   void PrintSelf(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType & dict) const;
-                 
 
-protected:  
+
+protected:
   ImageBase();
   virtual ~ImageBase(){};
-    
+
 private:
   ImageBase(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   OTB_GCP m_GCP;
-  
+
 };
 
-  
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbImageFileReader.h b/Code/IO/otbImageFileReader.h
index 87cc9412db..01bb7017a5 100644
--- a/Code/IO/otbImageFileReader.h
+++ b/Code/IO/otbImageFileReader.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ namespace otb
  *
  * \sa ImageSeriesReader
  * \sa ImageIOBase
- * 
+ *
  * \ingroup IOFilters
  *
  */
@@ -44,7 +44,7 @@ public:
   typedef ImageFileReader         Self;
   typedef itk::ImageFileReader<TOutputImage>  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -62,8 +62,8 @@ public:
 
   /** The pixel type of the output image. */
   //typedef typename TOutputImage::InternalPixelType OutputImagePixelType;
-  
-  /** Prepare l'allocation de l'image output lors du premier appel de traitement 
+
+  /** Prepare l'allocation de l'image output lors du premier appel de traitement
    * pipeline. */
   virtual void GenerateOutputInformation(void);
 
@@ -82,23 +82,23 @@ protected:
   ImageFileReader();
   ~ImageFileReader();
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
 private:
   /** Test whether the given filename exist and it is readable,
-      this is intended to be called before attempting to use 
+      this is intended to be called before attempting to use
       ImageIO classes for actually reading the file. If the file
       doesn't exist or it is not readable, and exception with an
       approriate message will be thrown. */
   void TestFileExistanceAndReadability();
 
-  /** Generate the filename (for GDALImageI for example). If filename is a directory, look if is a 
+  /** Generate the filename (for GDALImageI for example). If filename is a directory, look if is a
     * CEOS product (file "DAT...") In this case, the GdalFileName contain the open image file.
     */
   bool GetGdalReadImageFileName( const std::string & filename, std::string & GdalFileName );
-  
+
   ImageFileReader(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
 
 
diff --git a/Code/IO/otbImageFileReader.txx b/Code/IO/otbImageFileReader.txx
index 8276de57f7..c6b77ae8b5 100644
--- a/Code/IO/otbImageFileReader.txx
+++ b/Code/IO/otbImageFileReader.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -98,13 +98,13 @@ ImageFileReader<TOutputImage>
 
   // Tell the ImageIO to read the file
   //
-  OutputImagePixelType *buffer = 
+  OutputImagePixelType *buffer =
     output->GetPixelContainer()->GetBufferPointer();
   this->m_ImageIO->SetFileName(this->m_FileName.c_str());
 
   itk::ImageIORegion ioRegion(TOutputImage::ImageDimension);
 //otbMsgDebugMacro( <<" Avant ioRegion : "<<ioRegion);
-  
+
 //  itk::ImageIORegion ioRegionStreaming = output->GetRequestedRegion();
 
   itk::ImageIORegion::SizeType ioSize = ioRegion.GetSize();
@@ -149,12 +149,12 @@ ImageFileReader<TOutputImage>
 
 //otbMsgDebugMacro( <<" Apres ioRegion : "<<ioRegion);
 
- 
+
   this->m_ImageIO->SetIORegion(ioRegion);
 
   typedef itk::DefaultConvertPixelTraits< ITK_TYPENAME TOutputImage::IOPixelType >  ConvertPixelTraits;
-  
-  
+
+
 otbMsgDevMacro(<< "ImageFileReader<TOutputImage>::GenerateData():");
 otbMsgDevMacro (<< "ioRegion: " << ioRegion);
 otbMsgDevMacro(<< "   => test conversion Pixel type: compare");
@@ -163,7 +163,7 @@ otbMsgDevMacro(<< "         this->m_ImageIO->GetComponentTypeInfo(): "<<this->m_
 otbMsgDevMacro(<< "   with  typeid(ITK_TYPENAME ConvertPixelTraits::ComponentType): "<<typeid(ITK_TYPENAME ConvertPixelTraits::ComponentType).name());
 otbMsgDevMacro(<< "   and   this->m_ImageIO->GetNumberOfComponents(): "<<this->m_ImageIO->GetNumberOfComponents());
 otbMsgDevMacro(<< "   with  ConvertPixelTraits::GetNumberOfComponents(): "<<ConvertPixelTraits::GetNumberOfComponents());
-  
+
   if ( this->m_ImageIO->GetComponentTypeInfo()
        == typeid(ITK_TYPENAME ConvertPixelTraits::ComponentType)
        && (this->m_ImageIO->GetNumberOfComponents()
@@ -179,7 +179,7 @@ otbMsgDevMacro(<< "   with  ConvertPixelTraits::GetNumberOfComponents(): "<<Conv
     // note: char is used here because the buffer is read in bytes
     // regardles of the actual type of the pixels.
     ImageRegionType region = output->GetBufferedRegion();
-	
+
     // Adapte the image size with the region
     std::streamoff nbBytes = (this->m_ImageIO->GetImageSizeInBytes() / this->m_ImageIO->GetImageSizeInPixels()) * static_cast<std::streamoff>(region.GetNumberOfPixels());
     otbMsgDevMacro(<<"NbBytes for region: "<<nbBytes);
@@ -190,7 +190,7 @@ otbMsgDevMacro(<< "   with  ConvertPixelTraits::GetNumberOfComponents(): "<<Conv
                      << " to: "
                      << typeid(ITK_TYPENAME ConvertPixelTraits::ComponentType).name() << "  NbBytes"<<nbBytes<<"  region.GetNumberOfPixels()"<<region.GetNumberOfPixels());
     char * loadBuffer = new char[nbBytes];
-    
+
     this->m_ImageIO->Read(loadBuffer);
 
     this->DoConvertBuffer(loadBuffer, region.GetNumberOfPixels());
@@ -229,7 +229,7 @@ otbMsgDevMacro( << " Streaming Image Read ");
 
 
 template <class TOutputImage>
-void 
+void
 ImageFileReader<TOutputImage>
 ::GenerateOutputInformation(void)
 {
@@ -237,7 +237,7 @@ ImageFileReader<TOutputImage>
   typename TOutputImage::Pointer output = this->GetOutput();
 
   itkDebugMacro(<<"Reading file for GenerateOutputInformation()" << this->m_FileName);
-  
+
   // Check to see if we can read the file given the name or prefix
   //
   if ( this->m_FileName == "" )
@@ -255,20 +255,20 @@ ImageFileReader<TOutputImage>
   }
   // Update FileName
   this->m_FileName = lFileName;
-  
+
   std::string lFileNameOssimKeywordlist = this->m_FileName ;
-  
+
 
   // Test if the file exist and if it can be open.
   // and exception will be thrown otherwise.
   //
   this->TestFileExistanceAndReadability();
-  
+
   if ( this->m_UserSpecifiedImageIO == false ) //try creating via factory
     {
     this->m_ImageIO = ImageIOFactory::CreateImageIO( this->m_FileName.c_str(), itk::ImageIOFactory::ReadMode );
     }
-  
+
   if ( this->m_ImageIO.IsNull() )
     {
     itk::ImageFileReaderException e(__FILE__, __LINE__);
@@ -276,13 +276,13 @@ ImageFileReader<TOutputImage>
     msg << " Could not create IO object for file "
         << this->m_FileName.c_str() << std::endl;
     msg << "  Tried to create one of the following:" << std::endl;
-    std::list<itk::LightObject::Pointer> allobjects = 
+    std::list<itk::LightObject::Pointer> allobjects =
       itk::ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
     for(std::list<itk::LightObject::Pointer>::iterator i = allobjects.begin();
         i != allobjects.end(); ++i)
       {
       itk::ImageIOBase* io = dynamic_cast<itk::ImageIOBase*>(i->GetPointer());
-      msg << "    " << io->GetNameOfClass() << std::endl; 
+      msg << "    " << io->GetNameOfClass() << std::endl;
       }
     msg << "  You probably failed to set a file suffix, or" << std::endl;
     msg << "    set the suffix to an unsupported type." << std::endl;
@@ -290,7 +290,7 @@ ImageFileReader<TOutputImage>
     throw e;
     return;
     }
-  
+
   // Got to allocate space for the image. Determine the characteristics of
   // the image.
   //
@@ -298,8 +298,8 @@ ImageFileReader<TOutputImage>
   this->m_ImageIO->ReadImageInformation();
   // Initialisation du nombre de Composante par pixel
 // THOMAS ceci n'est pas dans ITK !!
-//  output->SetNumberOfComponentsPerPixel(this->m_ImageIO->GetNumberOfComponents()); 
-  
+//  output->SetNumberOfComponentsPerPixel(this->m_ImageIO->GetNumberOfComponents());
+
   SizeType dimSize;
   double spacing[ TOutputImage::ImageDimension ];
   double origin[ TOutputImage::ImageDimension ];
@@ -333,7 +333,7 @@ ImageFileReader<TOutputImage>
       // Number of dimensions in the output is more than number of dimensions
       // in the ImageIO object (the file).  Use default values for the size,
       // spacing, origin and direction for the final (degenerate) dimensions.
-      dimSize[i] = 1;  
+      dimSize[i] = 1;
       spacing[i] = 1.0;
       origin[i] = 0.0;
       for (unsigned j = 0; j < TOutputImage::ImageDimension; j++)
@@ -355,11 +355,11 @@ ImageFileReader<TOutputImage>
   output->SetDirection( direction ); // Set the image direction cosines
 
   // Trying to read ossim MetaData
-  
+
   // Add the radar factory
   ossimImageHandlerRegistry::instance()->addFactory(ossimImageHandlerSarFactory::instance());
   ossimImageHandler* handler = ossimImageHandlerRegistry::instance()->open(ossimFilename(lFileNameOssimKeywordlist.c_str()));
-  
+
   if (!handler)
   {
   	  otbMsgDebugMacro( <<"OSSIM Open Image FAILED ! ");
@@ -369,7 +369,7 @@ ImageFileReader<TOutputImage>
   {
   	  otbMsgDebugMacro( <<"OSSIM Open Image SUCCESS ! ");
 	  ossimKeywordlist geom_kwl, tmp_kwl, tmp_kwl2;// = new ossimKeywordlist();
-  
+
 	  // Read OSSIM Keyword List
 	  bool hasMetaData = handler->getImageGeometry(geom_kwl);
 	  otbMsgDevMacro( << " AVANT *geom_kwl : "<<geom_kwl<<std::endl);
@@ -381,43 +381,43 @@ ImageFileReader<TOutputImage>
 	  else
 	  {
 	  	  otbMsgDebugMacro( <<"OSSIM MetaData present ! ");
-	  	  
+
 		  otbMsgDevMacro( <<"Image keyword lists are :" << std::endl << geom_kwl);
-		  
+
 	      // Update otb Keywordlist
 		  ImageKeywordlist otb_kwl;
 		  otb_kwl.SetKeywordlist( geom_kwl );
-		  
+
 	  	  // Update itk MetaData Dictionnary
 //		  otbMsgDebugMacro( <<"Start update ITK Dictionnary ? ");
-		  
+
 		  otb_kwl.convertToOSSIMKeywordlist(tmp_kwl);
 
 		  itk::MetaDataDictionary& dico = this->m_ImageIO->GetMetaDataDictionary();
-  
+
 //		  otbMsgDebugMacro( <<"Before write ITK Dictionnary ? ");
 	  	  itk::EncapsulateMetaData< ImageKeywordlist >(dico,
 	  											 MetaDataKey::m_OSSIMKeywordlistKey,
 												 otb_kwl);
-												 
+
 //		  otbMsgDebugMacro( <<"After write ITK Dictionnary ? ");
 //		  itk::ExposeMetaData< ImageKeywordlist >(dico,
 //	  											 MetaDataKey::m_OSSIMKeywordlistKey,
 //												 otb_tmp);
 //		  otbMsgDebugMacro( <<"After read ITK Dictionnary ? ");
-		  
+
 //		  otb_tmp.convertToOSSIMKeywordlist(tmp_kwl2);
 //		  otbMsgDebugMacro( << " DEBUT THOMAS : Ossim key word list copy : "<<tmp_kwl2<<std::endl);
 
 		 // otbMsgDebugMacro( <<"Image keyword lists in dictionnary are :" << std::endl << geom_tmp);
-		  
+
 	  }
 	  // Free memory
 	  otbMsgDevMacro( <<"OSSIM Free Memory ? ");
-	  delete handler;  		
+	  delete handler;
 	  otbMsgDevMacro( <<"OSSIM Free Memory OK ! ");
   }
-  
+
   //Copy MetaDataDictionary from instantiated reader to output image.
   output->SetMetaDataDictionary(this->m_ImageIO->GetMetaDataDictionary());
   this->SetMetaDataDictionary(this->m_ImageIO->GetMetaDataDictionary());
@@ -431,21 +431,21 @@ ImageFileReader<TOutputImage>
   region.SetSize(dimSize);
   region.SetIndex(start);
 
-// THOMAS : ajout 
-  // If a VectorImage, this requires us to set the 
+// THOMAS : ajout
+  // If a VectorImage, this requires us to set the
   // VectorLength before allocate
-  if( strcmp( output->GetNameOfClass(), "VectorImage" ) == 0 ) 
+  if( strcmp( output->GetNameOfClass(), "VectorImage" ) == 0 )
     {
     typedef typename TOutputImage::AccessorFunctorType AccessorFunctorType;
     AccessorFunctorType::SetVectorLength( output, this->m_ImageIO->GetNumberOfComponents() );
     }
- 
+
   output->SetLargestPossibleRegion(region);
 
 }
 
 template <class TOutputImage>
-void 
+void
 ImageFileReader<TOutputImage>
 ::TestFileExistanceAndReadability()
 {
@@ -518,10 +518,10 @@ ImageFileReader<TOutputImage>
                         cpt++;
                 }
 	}
-        else 
+        else
         {
                 std::string strFileName(filename);
-                
+
                 std::string extension = System::GetExtension(strFileName);
                 if( (extension=="HDR") || (extension=="hdr") )
                 {
diff --git a/Code/IO/otbImageFileWriter.h b/Code/IO/otbImageFileWriter.h
index 53788d424b..03c1695f39 100644
--- a/Code/IO/otbImageFileWriter.h
+++ b/Code/IO/otbImageFileWriter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,12 +32,12 @@ namespace otb
  *
  * \sa ImageSeriesWriter
  * \sa ImageIOBase
- * 
+ *
  * \ingroup IOFilters
  *
  */
 
-// Le 3ieme parametre template est bidon MAIS necessaire pour compiler avec Microsoft Visual C++ 6.0 
+// Le 3ieme parametre template est bidon MAIS necessaire pour compiler avec Microsoft Visual C++ 6.0
 template <class TInputImage, unsigned int toto=0>
 class ITK_EXPORT ImageFileWriter : public itk::ImageFileWriter<TInputImage>
 {
@@ -57,9 +57,9 @@ public:
   /** Some convenient typedefs. */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::Pointer InputImagePointer;
-  typedef typename InputImageType::RegionType InputImageRegionType; 
-  typedef typename InputImageType::PixelType InputImagePixelType; 
-  
+  typedef typename InputImageType::RegionType InputImageRegionType;
+  typedef typename InputImageType::PixelType InputImagePixelType;
+
   /** A special version of the Update() method for writers.  It
    * invokes start and end events and handles releasing data. It
    * eventually calls GenerateData() which does the actual writing.
@@ -74,7 +74,7 @@ public:
   {
     this->Superclass::SetFileName(filename);
     this->SetImageIO(NULL);
-  } 
+  }
 protected:
   ImageFileWriter();
   ~ImageFileWriter();
@@ -90,12 +90,12 @@ private:
 
 };
 
-  
+
 } // end namespace otb
-  
+
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbImageFileWriter.txx"
 #endif
 
 #endif // __otbImageFileWriter_h
-  
+
diff --git a/Code/IO/otbImageFileWriter.txx b/Code/IO/otbImageFileWriter.txx
index 34ea6d8c61..52a814cb1a 100644
--- a/Code/IO/otbImageFileWriter.txx
+++ b/Code/IO/otbImageFileWriter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -50,10 +50,10 @@ ImageFileWriter<TInputImage,toto>
 }
 
 
-  
+
 //---------------------------------------------------------
 template <class TInputImage, unsigned int toto>
-void 
+void
 ImageFileWriter<TInputImage,toto>
 ::Write()
 {
@@ -78,9 +78,9 @@ ImageFileWriter<TInputImage,toto>
 //  if ( this->GetImageIO()->IsNull() ) //try creating via factory
   if ( this->GetImageIO() == 0 ) //try creating via factory
     {
-    itkDebugMacro(<<"Attempting factory creation of ImageIO for file: " 
+    itkDebugMacro(<<"Attempting factory creation of ImageIO for file: "
                   << this->GetFileName());
-    this->SetImageIO( ImageIOFactory::CreateImageIO( this->GetFileName(), 
+    this->SetImageIO( ImageIOFactory::CreateImageIO( this->GetFileName(),
                                                itk::ImageIOFactory::WriteMode ) );
     m_FactorySpecifiedImageIO = true;
     }
@@ -88,11 +88,11 @@ ImageFileWriter<TInputImage,toto>
     {
     if( m_FactorySpecifiedImageIO && !this->GetImageIO()->CanWriteFile( this->GetFileName() ) )
       {
-      itkDebugMacro(<<"ImageIO exists but doesn't know how to write file:" 
+      itkDebugMacro(<<"ImageIO exists but doesn't know how to write file:"
                     << this->GetFileName() );
       itkDebugMacro(<<"Attempting creation of ImageIO with a factory for file:"
                     << this->GetFileName());
-      this->SetImageIO( ImageIOFactory::CreateImageIO( this->GetFileName(), 
+      this->SetImageIO( ImageIOFactory::CreateImageIO( this->GetFileName(),
                                                  itk::ImageIOFactory::WriteMode ) );
       m_FactorySpecifiedImageIO = true;
       }
@@ -106,13 +106,13 @@ ImageFileWriter<TInputImage,toto>
     msg << " Could not create IO object for file "
         << this->GetFileName() << std::endl;
     msg << "  Tried to create one of the following:" << std::endl;
-    std::list<itk::LightObject::Pointer> allobjects = 
+    std::list<itk::LightObject::Pointer> allobjects =
       itk::ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
     for(std::list<itk::LightObject::Pointer>::iterator i = allobjects.begin();
         i != allobjects.end(); ++i)
       {
       itk::ImageIOBase* io = dynamic_cast<itk::ImageIOBase*>(i->GetPointer());
-      msg << "    " << io->GetNameOfClass() << std::endl; 
+      msg << "    " << io->GetNameOfClass() << std::endl;
       }
     msg << "  You probably failed to set a file suffix, or" << std::endl;
     msg << "    set the suffix to an unsupported type." << std::endl;
@@ -185,7 +185,7 @@ ImageFileWriter<TInputImage,toto>
 //otbMsgDevMacro( << this->GetFileName() );
 //  this->GetImageIO()->SetFileName( this->GetFileName() );
 //  this->GetImageIO()->WriteImageInformation();
-  
+
 
   this->UpdateProgress(0.);
 
@@ -193,7 +193,7 @@ ImageFileWriter<TInputImage,toto>
   this->GenerateData();
 
   this->UpdateProgress(1.);
-  
+
   // Notify end event observers
   this->InvokeEvent( itk::EndEvent() );
 
@@ -207,7 +207,7 @@ ImageFileWriter<TInputImage,toto>
 
 //---------------------------------------------------------
 template <class TInputImage, unsigned int toto>
-void 
+void
 ImageFileWriter<TInputImage,toto>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/IO/otbImageGeometryHandler.cxx b/Code/IO/otbImageGeometryHandler.cxx
index afa9d637d6..069457081f 100644
--- a/Code/IO/otbImageGeometryHandler.cxx
+++ b/Code/IO/otbImageGeometryHandler.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -19,8 +19,8 @@
  *
  * PURPOSE:
  *2 methodes necessaires pour l'ortho (au niveau de l'instanciation des modeles de capteurs).
- * 
- * 
+ *
+ *
  */
 #include "otbImageGeometryHandler.h"
 #include "otbMacro.h"
@@ -30,7 +30,7 @@ namespace otb
 {     /***************************/
       /*     Constructeurs       */
       /***************************/
-      
+
 // Constructeur par default
 ImageGeometryHandler::ImageGeometryHandler()
 {
@@ -39,14 +39,14 @@ ImageGeometryHandler::ImageGeometryHandler()
 
 // //Constructeur en connaissant le nom de l'image
 // ImageHandler::ImageHandler(const char *src)
-//  { 
+//  {
 //  handler   = ossimImageHandlerRegistry::instance()->open(ossimFilename(src));
 //       if(!handler)
 //       {
 //          cout << "Unable to open input image: " << src << endl;
 //       }
 //  }
- 
+
       /***************************/
       /*     Destructeurs        */
       /***************************/
@@ -55,7 +55,7 @@ ImageGeometryHandler::~ImageGeometryHandler()
 //Not needed since we use the instance method
 //delete handler;
 }
-      
+
       /***************************/
       /*     Methodes            */
       /***************************/
@@ -70,15 +70,15 @@ void ImageGeometryHandler::SetFileName(char *src)
 		itkExceptionMacro(<< "Unable to open input image: " << src);
     }
 }
-        
-// Recuperation de la geometrie de l'image: 
+
+// Recuperation de la geometrie de l'image:
 //Encapsulation de la methode "getImageGeometry"
 ossimKeywordlist ImageGeometryHandler::GetGeometryKeywordlist()
 {
 otbDebugMacro( << "Get geometry handler " );
 handler->getImageGeometry(m_geom_kwl);
 return m_geom_kwl;
-}    
+}
 
 }//fin namespace
 
diff --git a/Code/IO/otbImageGeometryHandler.h b/Code/IO/otbImageGeometryHandler.h
index 5ebdd489a2..acee85dfa4 100644
--- a/Code/IO/otbImageGeometryHandler.h
+++ b/Code/IO/otbImageGeometryHandler.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -19,10 +19,10 @@
 #define __otbImageGeometryHandler_h
 /*!otbImageGeometryHandler.h
  *
- * 
+ *
  * PURPOSE:
  *
- * 
+ *
  */
 // iostream is used for general output
 //#include <iostream>
@@ -51,9 +51,9 @@
 #include "itkObject.h"
 
 namespace otb
-{	         
+{
 class ITK_EXPORT ImageGeometryHandler: public itk::Object
-{          
+{
 public :
 //Déclaration des types:
   typedef ImageGeometryHandler                       Self;
@@ -63,9 +63,9 @@ public :
   typedef itk::SmartPointer<const Self>              ConstPointer;
 
   static Pointer New()
-  { 
-        Pointer n = new Self; 
-        n->UnRegister(); 
+  {
+        Pointer n = new Self;
+        n->UnRegister();
         return n;
   }
 
@@ -82,16 +82,16 @@ ossimKeywordlist GetGeometryKeywordlist();
 
 // //Récupération du model de projection(spécifique à AdjMapModel):
 // const ossimMapProjection* ImageGeometryHandler::GetProjection() const;
-// 
+//
 // //Récupération de ImageSize(spécifique à AdjMapModel):
 // const ossimIpt ImageGeometryHandler::GetImageSize() const;
-// 
+//
 // //Récupération du GeoFilename:
 // const ossimFilename ImageGeometryHandler::GetGeometryFileName() const;
-// 
+//
 // //Récupération du HeaderFile de type Ffl7:
 // const ossimFfL7 ImageGeometryHandler::GetFfL7();
-// 
+//
 // //Récupération du SpotDimapSupportData:
 
 protected:
diff --git a/Code/IO/otbImageIOFactory.cxx b/Code/IO/otbImageIOFactory.cxx
index 4b2a3f9e43..4d600ab4e4 100644
--- a/Code/IO/otbImageIOFactory.cxx
+++ b/Code/IO/otbImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -58,7 +58,7 @@ namespace otb
 
         static itk::SimpleMutexLock mutex;
         {
-                // This helper class makes sure the Mutex is unlocked 
+                // This helper class makes sure the Mutex is unlocked
                 // in the event an exception is thrown.
           itk::MutexLockHolder<itk::SimpleMutexLock> mutexHolder( mutex );
           if( firstTime )
@@ -67,10 +67,10 @@ namespace otb
             itk::ObjectFactoryBase::RegisterFactory( RADImageIOFactory::New() );
 
 	    // BSQ format for OTB
-            itk::ObjectFactoryBase::RegisterFactory( BSQImageIOFactory::New() );	
+            itk::ObjectFactoryBase::RegisterFactory( BSQImageIOFactory::New() );
 
 	    // LUM format for OTB
-            itk::ObjectFactoryBase::RegisterFactory( LUMImageIOFactory::New() );	
+            itk::ObjectFactoryBase::RegisterFactory( LUMImageIOFactory::New() );
 
 #ifdef OTB_COMPILE_JPEG2000
 	    // JPEG2000 : New format for OTB
@@ -83,7 +83,7 @@ namespace otb
 	    itk::ObjectFactoryBase::RegisterFactory( MWImageIOFactory::New() );
 
 	    // ONERA format for OTB
-            itk::ObjectFactoryBase::RegisterFactory( ONERAImageIOFactory::New() );	
+            itk::ObjectFactoryBase::RegisterFactory( ONERAImageIOFactory::New() );
 
 	    // MSTAR Format for OTB
             itk::ObjectFactoryBase::RegisterFactory( MSTARImageIOFactory::New() );
diff --git a/Code/IO/otbImageIOFactory.h b/Code/IO/otbImageIOFactory.h
index ec34f368a6..0bf6177f24 100644
--- a/Code/IO/otbImageIOFactory.h
+++ b/Code/IO/otbImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,15 +29,15 @@ namespace otb
  */
 class ITK_EXPORT ImageIOFactory : public itk::ImageIOFactory
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef ImageIOFactory   Self;
   typedef itk::ImageIOFactory  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class Methods used to interface with the registered factories */
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageIOFactory, itk::ImageIOFactory);
 
@@ -46,7 +46,7 @@ public:
 
   /** Mode in which the files is intended to be used */
 //  typedef enum { ReadMode, WriteMode } FileModeType;
-  
+
   /** Create the appropriate ImageIO depending on the particulars of the file. */
   static ImageIOBasePointer CreateImageIO(const char* path, FileModeType mode);
 
@@ -60,10 +60,10 @@ protected:
 private:
   ImageIOFactory(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbImageKeywordlist.cxx b/Code/IO/otbImageKeywordlist.cxx
index 7137118dff..7e38cecb8d 100644
--- a/Code/IO/otbImageKeywordlist.cxx
+++ b/Code/IO/otbImageKeywordlist.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,12 +23,12 @@ namespace otb
 
 
 ImageKeywordlist
-::ImageKeywordlist() 
+::ImageKeywordlist()
 {
 }
 
 ImageKeywordlist
-::ImageKeywordlist(const Self& p): m_Keywordlist(p.m_Keywordlist) //m_Keywordlist(Self.m_Keywordlist), m_Delimiter(Self.m_Delimiter) 
+::ImageKeywordlist(const Self& p): m_Keywordlist(p.m_Keywordlist) //m_Keywordlist(Self.m_Keywordlist), m_Delimiter(Self.m_Delimiter)
 {
 }
 
@@ -38,7 +38,7 @@ ImageKeywordlist
 {
 }
 
-void 
+void
 ImageKeywordlist::
 operator=(const Self& p)
 {
@@ -46,14 +46,14 @@ operator=(const Self& p)
 }
 
 
-void 
+void
 ImageKeywordlist::
 convertToOSSIMKeywordlist(ossimKeywordlist& kwl) const
 {
 	kwl.getMap() = m_Keywordlist;
 }
 
-void 
+void
 ImageKeywordlist::
 Print(std::ostream& os, itk::Indent indent) const
 {
@@ -66,11 +66,11 @@ PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   ossimKeywordlist kwl;
   convertToOSSIMKeywordlist(kwl);
-  os << indent << " Ossim Keyword list:"<<std::endl; 
+  os << indent << " Ossim Keyword list:"<<std::endl;
   os << indent << kwl ;
 }
 
-std::ostream & 
+std::ostream &
 operator<<(std::ostream &os, const ImageKeywordlist &kwl)
 {
   kwl.Print(os);
diff --git a/Code/IO/otbImageKeywordlist.h b/Code/IO/otbImageKeywordlist.h
index e139d7ba91..70647c0bca 100644
--- a/Code/IO/otbImageKeywordlist.h
+++ b/Code/IO/otbImageKeywordlist.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ namespace otb
  *
  * \sa ImageSeriesReader
  * \sa ImageIOBase
- * 
+ *
  * \ingroup Projections
  *
  */
@@ -43,19 +43,19 @@ class ITK_EXPORT ImageKeywordlist
 public:
   /** Standard class typedefs. */
   typedef ImageKeywordlist         Self;
-  
+
   typedef std::map<ossimString, ossimString> KeywordlistMap ;
 
   void SetKeywordlist(const ossimKeywordlist& kwl)
-  { 
+  {
   	m_Keywordlist = kwl.getMap();
   }
 
   void Clear(void)
-  { 
+  {
   	m_Keywordlist.clear();
   }
-  
+
   virtual void convertToOSSIMKeywordlist(ossimKeywordlist& kwl) const;
 
   virtual void Print(std::ostream& os, itk::Indent indent=0) const;
@@ -65,7 +65,7 @@ public:
 
   ImageKeywordlist(const Self&);
   void operator=(const Self&);
-  
+
 protected:
   /** Methods invoked by Print() to print information about the object
    * Typically not called by the user (use Print()
@@ -77,11 +77,11 @@ private:
 
   /** Geo informations are in this map */
   KeywordlistMap m_Keywordlist;
-  
+
 //  char m_Delimiter;
 
 //  void operator=(const Self&); //purposely not implemented
-  
+
 };
 
 extern std::ostream & operator<<(std::ostream &os, const ImageKeywordlist &kwl);
diff --git a/Code/IO/otbJPEG2000ImageIO.cxx b/Code/IO/otbJPEG2000ImageIO.cxx
index ed2c36acbd..a72d1130ce 100644
--- a/Code/IO/otbJPEG2000ImageIO.cxx
+++ b/Code/IO/otbJPEG2000ImageIO.cxx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -74,9 +74,9 @@ namespace otb
       {
 	return false;
       }
-    
+
     std::string lFileName(filename);
- 
+
     // Creating a codec
     opj_codec_t * codec = NULL;
 
@@ -105,11 +105,11 @@ namespace otb
     otb_openjpeg_opj_set_info_handler(codec, info_callback,00);
     otb_openjpeg_opj_set_warning_handler(codec, warning_callback,00);
     otb_openjpeg_opj_set_error_handler(codec, error_callback,00);
- 
+
     // Setting default parameters
     opj_dparameters_t parameters;
     otb_openjpeg_opj_set_default_decoder_parameters(&parameters);
- 
+
     if(! otb_openjpeg_opj_setup_decoder(codec,&parameters))
       {
 	otbMsgDebugMacro(<<"Impossible to set parameter.");
@@ -169,17 +169,17 @@ namespace otb
   {
   }
 
-  // Read image 
+  // Read image
   void JPEG2000ImageIO::Read(void* buffer)
   {
     //  unsigned long step = this->GetNumberOfComponents();
     char * charstarbuffer = static_cast<char *>(buffer);
-  
+
     int buffer_size_y = this->GetIORegion().GetSize()[1];
     int buffer_size_x = this->GetIORegion().GetSize()[0];
-    int buffer_y0     = this->GetIORegion().GetIndex()[1]; 
+    int buffer_y0     = this->GetIORegion().GetIndex()[1];
     int buffer_x0     = this->GetIORegion().GetIndex()[0];
-  
+
     otbMsgDevMacro( <<" JPEG2000ImageIO::Read()  ");
     otbMsgDevMacro( <<" ImageDimension   : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
     otbMsgDevMacro( <<" IORegion         : "<<this->GetIORegion());
@@ -225,9 +225,9 @@ namespace otb
       {
 	itkExceptionMacro(<<"Failed to open file: "<<m_FileName);
       }
-  
+
     m_OpenJpegStream = otb_openjpeg_opj_stream_create_default_file_stream(m_File,true);
-  
+
     if(!m_OpenJpegStream)
       {
 	itkExceptionMacro(<<"Failed to create file stream.");
@@ -280,15 +280,15 @@ namespace otb
 	    otbMsgDebugMacro(<<"Tile number of component: "<<nb_comps);
 	    otbMsgDebugMacro(<<"Goes on: "<<goesOn);
 	    otbMsgDevMacro(<<"--------------------------");
-	    
-	    
+
+
 	    tile_data = new OPJ_BYTE[data_size];
-	    
+
 	    if(! otb_openjpeg_opj_decode_tile_data(m_Codec,tile_index,tile_data,data_size,m_OpenJpegStream))
 	      {
 		itkExceptionMacro(<<"Error while reading tile data.");
 	      }
-	    
+
 	    std::streamsize tile_component_size = data_size/nb_comps;
 	    std::streamoff  buffer_skip         = std::max(0,tile_y0-buffer_y0)*buffer_size_x*nb_comps*m_NbOctetPixel;
 	    std::streamoff tile_skip            = std::max(0,buffer_y0-tile_y0)*(tile_x1-tile_x0)*m_NbOctetPixel;
@@ -303,14 +303,14 @@ namespace otb
 	    otbMsgDevMacro(<<"buffer_skip: "<<buffer_skip);
 	    otbMsgDevMacro(<<"tile_skip: "<<tile_skip);
 	    otbMsgDevMacro(<<"buffer_offset_begin: "<<buffer_offset_begin);
-	    otbMsgDevMacro(<<"tile_offset_begin: "<<tile_offset_begin); 
+	    otbMsgDevMacro(<<"tile_offset_begin: "<<tile_offset_begin);
 	    otbMsgDevMacro(<<"buffer_line_size: "<<buffer_line_size);
 	    otbMsgDevMacro(<<"tile_line_size: "<<tile_line_size);
 	    otbMsgDevMacro(<<"line_size: "<<line_size);
 	    otbMsgDevMacro(<<"nb_lines: "<<nb_lines);
 	    otbMsgDevMacro(<<"buffer_step: "<<buffer_step);
-	    
-	    
+
+
 	    std::streamoff buffer_pos,tile_pos;
 
 	    for(unsigned int comp = 0;comp<nb_comps;++comp)
@@ -319,7 +319,7 @@ namespace otb
 		  {
 		    buffer_pos = buffer_skip + comp*m_NbOctetPixel + line*buffer_line_size + buffer_offset_begin;
 		    tile_pos   = comp *tile_component_size + tile_skip + line*tile_line_size + tile_offset_begin;
-		    
+
 		    for(int cols = 0;cols<line_size;cols++)
 		      {
 			for(unsigned int octet = 0;octet<m_NbOctetPixel;++octet)
@@ -328,13 +328,13 @@ namespace otb
 			  }
 		      }
 		  }
-	      }	    
+	      }
 	    delete[] tile_data;
 	  }
       }
     otbMsgDebugMacro(<<"==========================");
 
-   
+
     otb_openjpeg_opj_stream_destroy(m_OpenJpegStream);
     fclose(m_File);
     otb_openjpeg_opj_destroy_codec(m_Codec);
@@ -348,7 +348,7 @@ namespace otb
       {
 	itkExceptionMacro(<<"JPEG2000ImageIO: empty image filename.");
       }
-  
+
     // Creating openjpeg objects
     if(System::SetToLower(System::GetExtension(m_FileName)) == "j2k")
       {
@@ -383,9 +383,9 @@ namespace otb
       {
 	itkExceptionMacro(<<"Failed to open file: "<<m_FileName);
       }
-  
+
     m_OpenJpegStream = otb_openjpeg_opj_stream_create_default_file_stream(m_File,true);
-  
+
     if(!m_OpenJpegStream)
       {
 	itkExceptionMacro(<<"Failed to create file stream.");
@@ -409,18 +409,18 @@ namespace otb
 
     m_Dimensions[0]=m_OpenJpegImage->x1 - m_OpenJpegImage->x0;
     m_Dimensions[1]=m_OpenJpegImage->y1 - m_OpenJpegImage->y0;
-  
+
     this->SetNumberOfDimensions(2);
 
     if(m_Dimensions[0] == 0 || m_Dimensions[1] == 0)
       {
 	itkExceptionMacro(<<"Image size is null.");
       }
-  
+
     this->SetNumberOfComponents(m_OpenJpegImage->numcomps);
-  
+
     this->SetFileTypeToBinary();
-  
+
     unsigned int precision = m_OpenJpegImage->comps->prec;
     int isSigned = m_OpenJpegImage->comps->sgnd;
 
@@ -468,7 +468,7 @@ namespace otb
     else
       {
 	this->SetPixelType(VECTOR);
-      }	
+      }
 
     otbMsgDebugMacro(<<"==========================");
     otbMsgDebugMacro(<<"ReadImageInformation: ");
@@ -566,12 +566,12 @@ namespace otb
 //                 m_NbOctetPixel = 8;
 //                 m_PxType = GDT_Float64;
 //         }
-//         else 
+//         else
 //         {
 //                 m_NbOctetPixel = 1;
 //                 m_PxType = GDT_Byte;
 //         }
-    
+
 //         // Automatically set the Type to Binary for GDAL data
 //         this->SetFileTypeToBinary();
 
@@ -584,8 +584,8 @@ namespace otb
 //     /* is using others way of calculation */
 //     /* m_Parameters.cp_disto_alloc = 1 or m_Parameters.cp_fixed_alloc = 1 */
 //     /* m_Parameters.tcp_rates[0] = ... */
-    
-    
+
+
 //     /* tile definitions parameters */
 //     /* position of the tile grid aligned with the image */
 //     m_Parameters.cp_tx0 = 0;
@@ -594,54 +594,54 @@ namespace otb
 //     m_Parameters.tile_size_on = true;
 //     m_Parameters.cp_tdx = 512;
 //     m_Parameters.cp_tdy = 512;
-    
+
 //     /* use irreversible encoding ?*/
 //     m_Parameters.irreversible = 1;
-    
+
 //     /* do not bother with mct, the rsiz is set when calling opj_set_MCT*/
 //     /*m_Parameters.cp_rsiz = STD_RSIZ;*/
-    
+
 //     /* no cinema */
 //     /*m_Parameters.cp_cinema = 0;*/
-    
+
 //     /* no not bother using SOP or EPH markers, do not use custom size precinct */
 //     /* number of precincts to specify */
 //     /* m_Parameters.csty = 0;*/
 //     /* m_Parameters.res_spec = ... */
 //     /* m_Parameters.prch_init[i] = .. */
 //     /* m_Parameters.prcw_init[i] = .. */
-    
-    
+
+
 //     /* do not use progression order changes */
 //     /*m_Parameters.numpocs = 0;*/
 //     /* m_Parameters.POC[i].... */
-    
+
 //     /* do not restrain the size for a component.*/
 //     /* m_Parameters.max_comp_size = 0; */
-    
+
 //     /** block encoding style for each component, do not use at the moment */
 //     /** J2K_CCP_CBLKSTY_TERMALL, J2K_CCP_CBLKSTY_LAZY, J2K_CCP_CBLKSTY_VSC, J2K_CCP_CBLKSTY_SEGSYM, J2K_CCP_CBLKSTY_RESET */
 //     /* m_Parameters.mode = 0;*/
-    
+
 //     /** number of resolutions */
 //     m_Parameters.numresolution = 6;
-    
+
 //     /** progression order to use*/
 //     /** LRCP, RLCP, RPCL, PCRL, CPRL */
 //     m_Parameters.prog_order = LRCP;
-    
+
 //     /** no "region" of interest, more precisally component */
 //     /* m_Parameters.roi_compno = -1; */
 //     /* m_Parameters.roi_shift = 0; */
-    
+
 //     /* we are not using multiple tile parts for a tile. */
 //     /* m_Parameters.tp_on = 0; */
-//     /* m_Parameters.tp_flag = 0; */	
-    
+//     /* m_Parameters.tp_flag = 0; */
+
 //     /* if we are using mct */
 //     /* opj_set_MCT(&m_Parameters,l_mct,l_offsets,NUM_COMPS); */
-    
-    
+
+
 //     /* image definition */
 //     l_current_param_ptr = m_Parameters;
 //     for
@@ -660,7 +660,7 @@ namespace otb
 // 	++l_current_param_ptr;
 //       }
 
-    
+
 //     m_Codec = opj_create_compress(CODEC_JP2);
 //     opj_set_info_handler(m_Codec, info_callback,00);
 //     opj_set_warning_handler(m_Codec, warning_callback,00);
@@ -700,9 +700,9 @@ namespace otb
 //       {
 // 	itkExceptionMacro(<<"Failed to open file: "<<m_FileName);
 //       }
-  
+
 //     m_OpenJpegStream = opj_stream_create_default_file_stream(m_File,true);
-  
+
 //     if(!m_OpenJpegStream)
 //       {
 // 	itkExceptionMacro(<<"Failed to create file stream.");
@@ -715,12 +715,12 @@ namespace otb
 
 //     std::streamsize buffer_size = this->GetIORegion().GetNumberOfPixels()*m_NbOctetPixel*m_nbBands;
 
-//     unsigned int nb_tile_x = (unsigned int)vcl_ceil((double)m_Dimensions[0]/(double)m_Parameters.cp_tdx);    
+//     unsigned int nb_tile_x = (unsigned int)vcl_ceil((double)m_Dimensions[0]/(double)m_Parameters.cp_tdx);
 //     unsigned int nb_tile_y = (unsigned int)vcl_ceil((double)m_Dimensions[1]/(double)m_Parameters.cp_tdy);
 
 //     unsigned int tile_index = nb_tile_x*buffer_y0/m_Parameters.cp_tdy+buffer_x0/m_Parameters.cp_tdx;
-    
-    
+
+
 //     OPJ_BYTE * desinterleaved_data = new OPJ_BYTE[buffer_size];
 
 //     std::streamoff step = m_NbBands*m_NbOctetPixel;
@@ -729,17 +729,17 @@ namespace otb
 
 //     for(comp = 0;comp<m_NbBands;++comp)
 //       {
-	
+
 
 //       }
-    
-    
+
+
 //     if(! opj_write_tile(m_Codec,tile_index,charstarbuffer,buffer_size,m_OpenJpegStream))
 //       {
-    
-    
-    
-    
+
+
+
+
 //       }
   }
 
@@ -765,6 +765,6 @@ namespace otb
 
   }
 
-  
+
 } // end namespace otb
 
diff --git a/Code/IO/otbJPEG2000ImageIO.h b/Code/IO/otbJPEG2000ImageIO.h
index 0fc982c01f..147239a372 100644
--- a/Code/IO/otbJPEG2000ImageIO.h
+++ b/Code/IO/otbJPEG2000ImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -60,16 +60,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -89,7 +89,7 @@ public:
   /** Writes the data to disk from the memory buffer provided. Make sure
    * that the IORegion has been set properly. */
   virtual void Write(const void* buffer);
- 
+
 protected:
   /** Construtor.*/
   JPEG2000ImageIO();
@@ -114,7 +114,7 @@ private:
   opj_stream_t * m_OpenJpegStream;
   /** pixel nb of octets */
   unsigned int m_NbOctetPixel;
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/IO/otbJPEG2000ImageIOFactory.cxx b/Code/IO/otbJPEG2000ImageIOFactory.cxx
index d6c22aefdf..3d89a60b47 100644
--- a/Code/IO/otbJPEG2000ImageIOFactory.cxx
+++ b/Code/IO/otbJPEG2000ImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbJPEG2000ImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ JPEG2000ImageIOFactory::JPEG2000ImageIOFactory()
                          1,
                          itk::CreateObjectFunction<JPEG2000ImageIO>::New());
 }
-  
+
 JPEG2000ImageIOFactory::~JPEG2000ImageIOFactory()
 {
 }
 
-const char* 
+const char*
 JPEG2000ImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 JPEG2000ImageIOFactory::GetDescription() const
 {
   return "JPEG2000 ImageIO Factory, allows the loading of JPEG2000 images into insight";
diff --git a/Code/IO/otbJPEG2000ImageIOFactory.h b/Code/IO/otbJPEG2000ImageIOFactory.h
index c305a66f08..6cb3439304 100644
--- a/Code/IO/otbJPEG2000ImageIOFactory.h
+++ b/Code/IO/otbJPEG2000ImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT JPEG2000ImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef JPEG2000ImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbKMLVectorDataIO.h b/Code/IO/otbKMLVectorDataIO.h
index 4baf0c44a0..6549b8a17f 100644
--- a/Code/IO/otbKMLVectorDataIO.h
+++ b/Code/IO/otbKMLVectorDataIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,8 +40,8 @@ namespace otb
  * \brief ImageIO object for reading/writing KML format vector data
  *
  */
-template <class TData> 
-class ITK_EXPORT KMLVectorDataIO 
+template <class TData>
+class ITK_EXPORT KMLVectorDataIO
   : public VectorDataIOBase<TData>
   {
 public:
@@ -60,7 +60,7 @@ public:
 
   /** Byte order typedef */
   typedef typename Superclass::ByteOrder  ByteOrder;
-  
+
   /** Data typedef */
   typedef TData VectorDataType;
   typedef typename VectorDataType::DataTreeType  DataTreeType;
@@ -86,13 +86,13 @@ public:
   /** Determine the file type. Returns true if this VectorDataIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the VectorDataIO can stream read the specified file */
   virtual bool CanStreamRead(){  return false; };
 
 /*   /\** Set the spacing and dimention information for the set filename. *\/ */
 /*   virtual void ReadVectorDataInformation(); */
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(VectorDataPointerType data);
 
@@ -112,7 +112,7 @@ public:
   /** Writes the data to disk from the memory buffer provided. Make sure
    * that the IORegion has been set properly. */
   virtual void Write(VectorDataConstPointerType data);
-  
+
 protected:
   /** Construtor.*/
   KMLVectorDataIO();
@@ -120,24 +120,24 @@ protected:
   virtual ~KMLVectorDataIO();
 
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   static const FeaturePtr GetRootFeature(const ElementPtr& root);
-  
+
   static void PrintIndented(std::string item, int depth);
-  
+
   static void PrintFeature(const FeaturePtr& feature, int depth);
 
   void WalkGeometry(const GeometryPtr& geometry, DataNodePointerType father);
-  
+
   void WalkFeature(const FeaturePtr& feature, DataNodePointerType father);
-  
+
   void WalkContainer(const ContainerPtr& container, DataNodePointerType father);
-  
+
 
   /** Conversion tools */
   DataNodePointerType ConvertGeometryToPointNode(const GeometryPtr& geometry);
   DataNodePointerType ConvertGeometryToLineStringNode(const GeometryPtr& geometry);
-  DataNodePointerType ConvertGeometryToLinearRingNode(const GeometryPtr& geometry);  
+  DataNodePointerType ConvertGeometryToLinearRingNode(const GeometryPtr& geometry);
   DataNodePointerType ConvertGeometryToPolygonNode(const GeometryPtr& geometry);
   /** end conversion tools */
 
@@ -146,7 +146,7 @@ private:
   void operator=(const Self&); //purposely not implemented
 
   DataTreePointerType m_Tree;
- 
+
 };
 
 } // end namespace otb
diff --git a/Code/IO/otbKMLVectorDataIO.txx b/Code/IO/otbKMLVectorDataIO.txx
index 405e5cefd9..65a5937cf0 100644
--- a/Code/IO/otbKMLVectorDataIO.txx
+++ b/Code/IO/otbKMLVectorDataIO.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -64,7 +64,7 @@ namespace otb
   {
   }
   template<class TData>
-      bool 
+      bool
       KMLVectorDataIO<TData>::CanReadFile( const char* filename )
   {
     std::string lFileName(filename);
@@ -80,15 +80,15 @@ namespace otb
     {
       return false;
     }
-        
+
     std::string kml;
     return (kmlbase::File::ReadFileToString(lFileName, &kml) );
   }
 
   // Get the features of the kml file, read into the root
   template<class TData>
-      const FeaturePtr 
-      KMLVectorDataIO<TData>::GetRootFeature(const ElementPtr& root) 
+      const FeaturePtr
+      KMLVectorDataIO<TData>::GetRootFeature(const ElementPtr& root)
   {
     const KmlPtr kml = kmldom::AsKml(root);
     if (kml && kml->has_feature()) {
@@ -96,40 +96,40 @@ namespace otb
     }
     return kmldom::AsFeature(root);
   }
-  
+
   // Print the selected feature
   template<class TData>
       void
-      KMLVectorDataIO<TData>::PrintIndented(std::string item, int depth) 
+      KMLVectorDataIO<TData>::PrintIndented(std::string item, int depth)
   {
-    while (depth--) 
+    while (depth--)
     {
       std::cout << "  ";
     }
     std::cout << item <<std::endl;
   }
-  
+
   template<class TData>
-      void 
+      void
       KMLVectorDataIO<TData>::WalkFeature(const FeaturePtr& feature, DataNodePointerType father)
   {
 
     DataNodePointerType node = NULL;
-        
-    if (feature) 
+
+    if (feature)
     {
-      if (const ContainerPtr container = kmldom::AsContainer(feature)) 
+      if (const ContainerPtr container = kmldom::AsContainer(feature))
       {
         WalkContainer(container,father);
-      } 
-      else if (const PlacemarkPtr placemark = kmldom::AsPlacemark(feature)) 
+      }
+      else if (const PlacemarkPtr placemark = kmldom::AsPlacemark(feature))
       {
         WalkGeometry(placemark->get_geometry(),father);
       }
-        
-        // The Read() method is not exhaustive it is possible to add the read of the "link", 
+
+        // The Read() method is not exhaustive it is possible to add the read of the "link",
         // the style (iconStyle, LineStyle...). Then into the containers we also can find the fields :
-        // <visibility> <description> <LookAt>... cf. code.google.com/apis/kml/documentation/kmlelementssinmaps.html 
+        // <visibility> <description> <LookAt>... cf. code.google.com/apis/kml/documentation/kmlelementssinmaps.html
     }
     return;
   }
@@ -138,31 +138,31 @@ namespace otb
       void
       KMLVectorDataIO<TData>::WalkContainer(const ContainerPtr& container, DataNodePointerType father)
   {
-  
+
     DataNodePointerType node = NULL;
-  
-    for (size_t i = 0; i < container->get_feature_array_size(); ++i) 
+
+    for (size_t i = 0; i < container->get_feature_array_size(); ++i)
     {
       FeaturePtr feature = container->get_feature_array_at(i);
-      switch (feature->Type()) 
+      switch (feature->Type())
       {
         case kmldom::Type_Document:
         {
           DataNodePointerType document = DataNodeType::New();
-          document->SetNodeType(DOCUMENT);        
+          document->SetNodeType(DOCUMENT);
           document->SetNodeId(feature->get_id());
           if (feature->has_name()) {
             document->SetField("name",feature->get_name());
           }
           m_Tree->Add(document,father);
-          WalkFeature(feature,document);              
+          WalkFeature(feature,document);
           break;
-        } 
+        }
         case kmldom::Type_Folder:
         {
           DataNodePointerType folder = DataNodeType::New();
           folder->SetNodeType(FOLDER);
-          folder->SetNodeId(feature->get_id());                      
+          folder->SetNodeId(feature->get_id());
           if (feature->has_name()) {
             folder->SetField("name",feature->get_name());
           }
@@ -182,18 +182,18 @@ namespace otb
         }
         case kmldom::Type_PhotoOverlay:
         {
-          WalkFeature(feature,father);                      
+          WalkFeature(feature,father);
           break;
         }
         case kmldom::Type_Placemark:
         {
-	      // We just ignore placemarks                   
+	      // We just ignore placemarks
           WalkFeature(feature,father);
           break;
         }
         case kmldom::Type_ScreenOverlay:
         {
-          WalkFeature(feature,father);                      
+          WalkFeature(feature,father);
           break;
         }
         default:
@@ -202,18 +202,18 @@ namespace otb
 
     }
     return;
-  }  
+  }
 
   // Walk through a geometry and create a GeometryNode
-  template<class TData>  
+  template<class TData>
       void
-      KMLVectorDataIO<TData>::WalkGeometry(const GeometryPtr& geometry, DataNodePointerType father) 
+      KMLVectorDataIO<TData>::WalkGeometry(const GeometryPtr& geometry, DataNodePointerType father)
   {
-  
+
     // Creation of a node
     DataNodePointerType node = NULL;
 
-    if (!geometry) 
+    if (!geometry)
     {
       return;
     }
@@ -223,19 +223,19 @@ namespace otb
       case kmldom::Type_Point:
       {
         node = ConvertGeometryToPointNode(geometry);
-        m_Tree->Add(node,father); 
+        m_Tree->Add(node,father);
         break;
       }
       case kmldom::Type_LineString:
       {
         node = ConvertGeometryToLineStringNode(geometry);
-        m_Tree->Add(node,father);                
+        m_Tree->Add(node,father);
         break;
       }
       case kmldom::Type_LinearRing:
       {
         node = ConvertGeometryToLinearRingNode(geometry);
-        m_Tree->Add(node,father);                
+        m_Tree->Add(node,father);
         break;
       }
       case kmldom::Type_Polygon:
@@ -258,19 +258,19 @@ namespace otb
     }
 
     // Recurse into <MultiGeometry>.
-    if (const MultiGeometryPtr multigeometry = kmldom::AsMultiGeometry(geometry)) 
+    if (const MultiGeometryPtr multigeometry = kmldom::AsMultiGeometry(geometry))
     {
       DataNodePointerType multi = DataNodeType::New();
       multi->SetNodeType(FEATURE_COLLECTION);
-      m_Tree->Add(multi,father);            
+      m_Tree->Add(multi,father);
       for (size_t i = 0; i < multigeometry->get_geometry_array_size(); ++i)
       {
         WalkGeometry(multigeometry->get_geometry_array_at(i),multi);
-      }           
+      }
     }
     return;
   }
-  
+
   template<class TData>
       typename KMLVectorDataIO<TData>
   ::DataNodePointerType
@@ -279,12 +279,12 @@ namespace otb
   {
 
     if(geometry == NULL)
-    {       
+    {
       itkGenericExceptionMacro(<<"Failed to convert GeometryPtr to PointNode");
     }
-    
+
     const PointPtr pt = kmldom::AsPoint(geometry);
-      
+
     PointType otbPoint;
     otbPoint.Fill(0);
     otbPoint[0] = static_cast<typename DataNodeType::PrecisionType>(pt->get_coordinates()->get_coordinates_array_at(0).get_longitude());
@@ -293,7 +293,7 @@ namespace otb
     if(DataNodeType::Dimension > 2)
     {
       otbPoint[2]=static_cast<typename DataNodeType::PrecisionType>(pt->get_coordinates()->get_coordinates_array_at(0).get_altitude());
-    }   
+    }
 
     DataNodePointerType node = DataNodeType::New();
     node->SetPoint(otbPoint);
@@ -335,7 +335,7 @@ namespace otb
 
     return node;
   }
-  
+
   template<class TData>
       typename KMLVectorDataIO<TData>
   ::DataNodePointerType
@@ -348,7 +348,7 @@ namespace otb
       itkGenericExceptionMacro(<<"Failed to convert GeometryPtr to LineNode");
     }
 
-    const LinearRingPtr lr = kmldom::AsLinearRing(geometry);        
+    const LinearRingPtr lr = kmldom::AsLinearRing(geometry);
     const CoordinatesPtr coords = lr->get_coordinates();
     int array_size = coords->get_coordinates_array_size();
 
@@ -370,8 +370,8 @@ namespace otb
     node->SetLine(line);
 
     return node;
-  }  
-  
+  }
+
   template<class TData>
       typename KMLVectorDataIO<TData>
   ::DataNodePointerType
@@ -395,10 +395,10 @@ namespace otb
       const OuterBoundaryIsPtr outerboundaryis = polygonKml->get_outerboundaryis();
       if(outerboundaryis->has_linearring())
       {
-        const LinearRingPtr lr = outerboundaryis->get_linearring();        
+        const LinearRingPtr lr = outerboundaryis->get_linearring();
         const CoordinatesPtr coords = lr->get_coordinates();
         int array_size = coords->get_coordinates_array_size();
-                                
+
 
         for(int i=0;i<array_size;i++)
         {
@@ -421,11 +421,11 @@ namespace otb
       const InnerBoundaryIsPtr innerboundaryis = polygonKml->get_innerboundaryis_array_at(intRingIndex);
       if(innerboundaryis->has_linearring())
       {
-        const LinearRingPtr lr = innerboundaryis->get_linearring();        
+        const LinearRingPtr lr = innerboundaryis->get_linearring();
         const CoordinatesPtr coords = lr->get_coordinates();
         int array_size = coords->get_coordinates_array_size();
-        PolygonPointerType ring = PolygonType::New();                        
-        
+        PolygonPointerType ring = PolygonType::New();
+
         for(int pIndex=0;pIndex<array_size;pIndex++)
         {
           typename PolygonType::VertexType vertex;
@@ -442,16 +442,16 @@ namespace otb
       }
     }
 
-    DataNodePointerType node = DataNodeType::New();        
+    DataNodePointerType node = DataNodeType::New();
     node->SetPolygonExteriorRing(extRing);
     node->SetPolygonInteriorRings(intRings);
 
     return node;
-  }  
+  }
 
   // Used to print information about this object
   template<class TData>
-      void 
+      void
       KMLVectorDataIO<TData>::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
     Superclass::PrintSelf(os, indent);
@@ -459,7 +459,7 @@ namespace otb
 
   // Read vector data
   template<class TData>
-      void 
+      void
       KMLVectorDataIO<TData>
   ::Read(VectorDataPointerType data)
   {
@@ -481,7 +481,7 @@ namespace otb
     std::string errors;
     ElementPtr root = kmldom::Parse(kml, &errors);
 
-    if (!root) 
+    if (!root)
     {
       itkExceptionMacro(<<"Failed to open KML data file "<<errors);
     }
@@ -495,7 +495,7 @@ namespace otb
 
       DataNodePointerType document = DataNodeType::New();
       document->SetNodeType(DOCUMENT);
-      m_Tree->Add(document,rootNode);            
+      m_Tree->Add(document,rootNode);
 
       // Walk Feature (get the Placemarks... and walk into them) //ENGLISH ??
       WalkFeature(feature,document);
@@ -547,10 +547,10 @@ namespace otb
 
     DocumentPtr currentDocument = NULL;
     FolderPtr currentFolder = NULL;
-    MultiGeometryPtr currentMultiGeometry = NULL;    
+    MultiGeometryPtr currentMultiGeometry = NULL;
     PolygonPtr currentPolygon = NULL;
     OuterBoundaryIsPtr outerboundaryis = NULL;
-    InnerBoundaryIsPtr innerboundaryis = NULL;    
+    InnerBoundaryIsPtr innerboundaryis = NULL;
 
 
     // Note that we force a precise structure when we write a kml file.
@@ -570,7 +570,7 @@ namespace otb
           if(it.Get()->HasField("name"))
           {
             std::string fieldname = it.Get()->GetField("name");
-            document->set_name(fieldname);                
+            document->set_name(fieldname);
           }
           kml->set_feature(document);
           currentDocument = document;
@@ -580,11 +580,11 @@ namespace otb
         {
           FolderPtr folder = factory->CreateFolder();
           std::string fieldname = it.Get()->GetField("name");
-          folder->set_name(fieldname);             
+          folder->set_name(fieldname);
           currentDocument->add_feature(folder);
           currentFolder = folder;
           break;
-        }	    
+        }
         case FEATURE_POINT:
         {
         // Create <coordinates>
@@ -595,7 +595,7 @@ namespace otb
           }
           else
           {
-            coordinates->add_latlng(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0]);                  
+            coordinates->add_latlng(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0]);
           }
 
           // Create <Point> and give it <coordinates>.
@@ -608,8 +608,8 @@ namespace otb
           }
           else
           {
-    
-            PlacemarkPtr placemark = factory->CreatePlacemark();			
+
+            PlacemarkPtr placemark = factory->CreatePlacemark();
             placemark->set_geometry(point);
             if (currentFolder!= NULL)
             {
@@ -619,7 +619,7 @@ namespace otb
             {
               currentDocument->add_feature(placemark);
             }
-    
+
           }
           break;
         }
@@ -629,9 +629,9 @@ namespace otb
           VertexListConstPointerType vertexList = it.Get()->GetLine()->GetVertexList();
 
           // Create <coordinates>
-          CoordinatesPtr coordinates = factory->CreateCoordinates();                
-          LineStringPtr line = factory->CreateLineString();                
-        
+          CoordinatesPtr coordinates = factory->CreateCoordinates();
+          LineStringPtr line = factory->CreateLineString();
+
           typename VertexListType::ConstIterator vIt = vertexList->Begin();
 
           while(vIt != vertexList->End())
@@ -643,7 +643,7 @@ namespace otb
             }
             else
             {
-              coordinates->add_latlng(vIt.Value()[1],vIt.Value()[0]);                  
+              coordinates->add_latlng(vIt.Value()[1],vIt.Value()[0]);
             }
             line->set_coordinates(coordinates);
             ++vIt;
@@ -652,10 +652,10 @@ namespace otb
           if (currentMultiGeometry != NULL)
           {
             currentMultiGeometry->add_geometry(line);
-          }                        
+          }
           else
           {
-            PlacemarkPtr placemark = factory->CreatePlacemark();			
+            PlacemarkPtr placemark = factory->CreatePlacemark();
             placemark->set_geometry(line);
             if (currentFolder!= NULL)
             {
@@ -677,7 +677,7 @@ namespace otb
           polygon->set_extrude(true);
           polygon->set_altitudemode(1);//ALTITUDEMODE_RELATIVETOGROUND
 
-          CoordinatesPtr coordinates = factory->CreateCoordinates();                
+          CoordinatesPtr coordinates = factory->CreateCoordinates();
           OuterBoundaryIsPtr outerboundaryis = factory->CreateOuterBoundaryIs();
           InnerBoundaryIsPtr innerboundaryis = factory->CreateInnerBoundaryIs();
 
@@ -689,7 +689,7 @@ namespace otb
           {
             itkExceptionMacro(<<"Polygon is empty");
           }
-          
+
           while(vIt != vertexList->End())
           {
             if(DataNodeType::Dimension>2)
@@ -698,23 +698,23 @@ namespace otb
             }
             else
             {
-              coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues                  
+              coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues
             }
-        
+
             line->set_coordinates(coordinates);
             ++vIt;
           }
 
           //Adding the first point again to close the polygon
           vIt = vertexList->Begin();
-          
+
           if(DataNodeType::Dimension>2)
           {
             coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],vIt.Value()[2]+1);//Drawing polygon 1m above ground to avoid z-buffer issues
           }
           else
           {
-            coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues                  
+            coordinates->add_latlngalt(vIt.Value()[1],vIt.Value()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues
           }
           line->set_coordinates(coordinates);
 
@@ -726,7 +726,7 @@ namespace otb
               pIt!=it.Get()->GetPolygonInteriorRings()->End();++pIt)
           {
 
-            vertexList = pIt.Get()->GetVertexList();	    
+            vertexList = pIt.Get()->GetVertexList();
             vIt = vertexList->Begin();
 
             while(vIt != vertexList->End())
@@ -734,12 +734,12 @@ namespace otb
               if(DataNodeType::Dimension>2)
               {
                 coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],it.Get()->GetPoint()[2]+1);//Drawing polygon 1m above ground to avoid z-buffer issues
-              } 
+              }
               else
               {
-                coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues                  
+                coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues
               }
-        
+
               line->set_coordinates(coordinates);
               ++vIt;
             }
@@ -749,12 +749,12 @@ namespace otb
             if(DataNodeType::Dimension>2)
             {
               coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],it.Get()->GetPoint()[2]+1);//Drawing polygon 1m above ground to avoid z-buffer issues
-            } 
+            }
             else
             {
-              coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues                  
+              coordinates->add_latlngalt(it.Get()->GetPoint()[1],it.Get()->GetPoint()[0],1);//Drawing polygon 1m above ground to avoid z-buffer issues
             }
-        
+
             line->set_coordinates(coordinates);
             ++vIt;
 
@@ -771,7 +771,7 @@ namespace otb
           }
           else
           {
-            PlacemarkPtr placemark = factory->CreatePlacemark();			
+            PlacemarkPtr placemark = factory->CreatePlacemark();
             placemark->set_geometry(polygon);
             if (currentFolder!= NULL)
             {
@@ -789,7 +789,7 @@ namespace otb
         {
           MultiGeometryPtr multi = factory->CreateMultiGeometry();
           currentMultiGeometry = multi;
-          PlacemarkPtr placemark = factory->CreatePlacemark();			
+          PlacemarkPtr placemark = factory->CreatePlacemark();
           placemark->set_geometry(multi);
           if (currentFolder!= NULL)
           {
@@ -820,7 +820,7 @@ namespace otb
     otbMsgDevMacro( <<" KMLVectorDataIO::Write()  ");
 
   }
- 
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbKMLVectorDataIOFactory.h b/Code/IO/otbKMLVectorDataIOFactory.h
index 1c92f6d101..57b836936c 100644
--- a/Code/IO/otbKMLVectorDataIOFactory.h
+++ b/Code/IO/otbKMLVectorDataIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,17 +27,17 @@ namespace otb
  */
 template <class TData> class ITK_EXPORT KMLVectorDataIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef KMLVectorDataIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -60,8 +60,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 
diff --git a/Code/IO/otbKMLVectorDataIOFactory.txx b/Code/IO/otbKMLVectorDataIOFactory.txx
index 0a93e4c992..e90ea72155 100644
--- a/Code/IO/otbKMLVectorDataIOFactory.txx
+++ b/Code/IO/otbKMLVectorDataIOFactory.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,13 +40,13 @@ KMLVectorDataIOFactory<TData>::~KMLVectorDataIOFactory()
 {
 }
 template<class TData>
-const char* 
+const char*
 KMLVectorDataIOFactory<TData>::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 template<class TData>
-const char* 
+const char*
 KMLVectorDataIOFactory<TData>::GetDescription() const
 {
   return "KML VectorDataIO Factory, allows the loading of KML vector data into OTB";
diff --git a/Code/IO/otbLUMImageIO.cxx b/Code/IO/otbLUMImageIO.cxx
index e0d20c6d00..417a84f746 100644
--- a/Code/IO/otbLUMImageIO.cxx
+++ b/Code/IO/otbLUMImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -45,7 +45,7 @@ namespace otb
     }
 
     m_FileByteOrder = BigEndian;
-  
+
   // Set default spacing to one
     m_Spacing[0] = 1.0;
     m_Spacing[1] = 1.0;
@@ -94,7 +94,7 @@ namespace otb
     {
       m_File.close();
     }
-	
+
     std::fstream header_file;
     header_file.open( filename,  std::ios::in | std::ios::binary );
     if( header_file.fail() )
@@ -102,7 +102,7 @@ namespace otb
       otbMsgDevMacro(<<"LUMImageIO::CanReadFile() failed header open ! " );
       return false;
     }
-	
+
 	//Read header informations
     bool lResult = InternalReadHeaderInformation(header_file,false);
     header_file.close();
@@ -121,11 +121,11 @@ namespace otb
   {
   }
 
-// Read image 
+// Read image
   void LUMImageIO::Read(void* buffer)
   {
     char * p = static_cast<char *>(buffer);
-   
+
     int lNbLines   = this->GetIORegion().GetSize()[1];
     int lNbColumns = this->GetIORegion().GetSize()[0];
     int lFirstLine   = this->GetIORegion().GetIndex()[1] ; // [1... ]
@@ -140,7 +140,7 @@ namespace otb
     std::streamoff numberOfBytesPerLines = headerLength;
     std::streamoff offset;
     std::streamsize numberOfBytesToBeRead = static_cast<std::streamsize>(this->GetComponentSize() * lNbColumns);
-    std::streamsize numberOfBytesRead;        
+    std::streamsize numberOfBytesRead;
     std::streamsize cpt = 0;
     for(int LineNo = lFirstLine;LineNo <lFirstLine + lNbLines; LineNo++ )
     {
@@ -160,7 +160,7 @@ namespace otb
       }
       cpt += numberOfBytesToBeRead;
     }
- 
+
     unsigned long numberOfPixelsPerLines = lNbLines * lNbColumns;
         // Swap bytes if necessary
     if ( 0 ) {}
@@ -196,7 +196,7 @@ namespace otb
 
         //Read header informations
     InternalReadHeaderInformation(m_File,true);
-	
+
     otbMsgDebugMacro( <<"Driver to read: LUM");
     otbMsgDebugMacro( <<"         Read  file         : "<< m_FileName);
     otbMsgDebugMacro( <<"         Size               : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
@@ -210,30 +210,30 @@ namespace otb
 
   bool LUMImageIO::InternalReadHeaderInformation(std::fstream & file, const bool reportError)
   {
-	
+
     std::string lStrTypeImage;
     std::string lStrCodePix;
     std::string lStrTypeMachine;
     int lNbBits(-1);
     char TypeCode[5];
     file.seekg(8, std::ios::beg );
-    file.read((char*)(TypeCode),4);  
+    file.read((char*)(TypeCode),4);
     int lTaille = CaiGetTypeLum(            TypeCode,
                                             lStrTypeImage,
-                                            lNbBits, 
+                                            lNbBits,
                                             lStrCodePix);
     if (lTaille == -1)
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "LUM : bad read of header informations");  
+        itkExceptionMacro(<< "LUM : bad read of header informations");
       }
       else
       {
         return false;
       }
     }
-        //Set file byte order 
+        //Set file byte order
     if( lStrTypeImage == "BE" )
     {
       m_FileByteOrder = BigEndian;
@@ -243,7 +243,7 @@ namespace otb
       m_FileByteOrder = LittleEndian;
     }
 
-    if(lStrCodePix == "OCT") 
+    if(lStrCodePix == "OCT")
     {
       SetComponentType(CHAR);
     }
@@ -279,7 +279,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "LUM : impossible to determine CodePix information of the image");  
+        itkExceptionMacro(<< "LUM : impossible to determine CodePix information of the image");
       }
       else
       {
@@ -292,9 +292,9 @@ namespace otb
 
         //Read image dimensions
     file.seekg(0, std::ios::beg );
-    file.read((char*)(&NbCol),4); 
-    file.read((char*)(&NbLig),4);  
-         
+    file.read((char*)(&NbCol),4);
+    file.read((char*)(&NbLig),4);
+
         //Swapp if necessary
     otbSwappFileOrderToSystemOrderMacro(int,&NbCol,1);
     otbSwappFileOrderToSystemOrderMacro(int,&NbLig,1);
@@ -367,7 +367,7 @@ namespace otb
     std::streamsize cpt = 0;
 
     const char * p = static_cast<const char *>(buffer);
- 
+
     for(unsigned long LineNo = lFirstLine;LineNo <lFirstLine + lNbLines; LineNo++ )
     {
       offset  =  headerLength + numberOfBytesPerLines * static_cast<std::streamoff>(LineNo);
@@ -395,14 +395,14 @@ namespace otb
     {
       m_File.close();
     }
-  
+
         // Open the new file for writing
         // Actually open the file
     m_File.open( m_FileName.c_str(),  std::ios::out | std::ios::trunc | std::ios::binary );
     if( m_File.fail() )
     {
       itkExceptionMacro(<< "Cannot write requested file "<<m_FileName.c_str()<<".");
-    } 
+    }
 
         //Writing header information
     std::streamsize headerLength = static_cast<std::streamsize>(this->GetComponentSize() * m_Dimensions[0]);
@@ -452,7 +452,7 @@ namespace otb
 
   int LUMImageIO::CaiGetTypeLum(          const   char *          type_code,
                                           std::string &   str_sens_code,
-                                          int &           inbbits, 
+                                          int &           inbbits,
                                           std::string &   str_cod_pix)
   {
     unsigned int ind;	/* indice de boucle sur les types reconnus */
@@ -492,7 +492,7 @@ namespace otb
     {
       mod2=ind%2;
       if (mod2==0) sprintf(sens_code,"BE");
-      else sprintf(sens_code,"LE");            
+      else sprintf(sens_code,"LE");
 
       if (ind < 4)
       {
@@ -502,8 +502,8 @@ namespace otb
         {
           trouve =(int)(nbbits/8);
           if ((nbbits%8)!=0) taille =trouve+1;
-          else taille  = trouve;		    
-        } 
+          else taille  = trouve;
+        }
         pch0 = const_cast<char *>(strstr(type_code,"U"));
         if (taille == 1)
         {
@@ -522,7 +522,7 @@ namespace otb
         }
         else taille=-1;
       }
-      else if  ((ind ==4)||(ind==5) ) 
+      else if  ((ind ==4)||(ind==5) )
       {
         taille=4;
         nbbits = 32;
@@ -544,6 +544,6 @@ namespace otb
     return(taille);
   }
 
-  
+
 } // end namespace otb
 
diff --git a/Code/IO/otbLUMImageIO.h b/Code/IO/otbLUMImageIO.h
index f8123c9756..f3079a634e 100644
--- a/Code/IO/otbLUMImageIO.h
+++ b/Code/IO/otbLUMImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ public:
 
   /** Byte order typedef */
   typedef Superclass::ByteOrder  ByteOrder;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -59,16 +59,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -90,7 +90,7 @@ public:
   virtual void Write(const void* buffer);
   // JULIEN: NOT USED, NOT IMPLEMENTED
   //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
 protected:
   /** Construtor.*/
   LUMImageIO();
@@ -103,7 +103,7 @@ protected:
 
   bool OpenOneraDataFileForWriting(const char* filename);
   bool OpenOneraHeaderFileForWriting(const char* filename);
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -115,7 +115,7 @@ private:
   /** This method get the LUM type */
   int CaiGetTypeLum(                            const   char *          type_code,
                                                 std::string &   str_sens_code,
-                                                int &           inbbits, 
+                                                int &           inbbits,
 					        std::string &   str_cod_pix);
 
 
diff --git a/Code/IO/otbLUMImageIOFactory.cxx b/Code/IO/otbLUMImageIOFactory.cxx
index ce0f904728..b741beb35e 100644
--- a/Code/IO/otbLUMImageIOFactory.cxx
+++ b/Code/IO/otbLUMImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbLUMImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ LUMImageIOFactory::LUMImageIOFactory()
                          1,
                          itk::CreateObjectFunction<LUMImageIO>::New());
 }
-  
+
 LUMImageIOFactory::~LUMImageIOFactory()
 {
 }
 
-const char* 
+const char*
 LUMImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 LUMImageIOFactory::GetDescription() const
 {
   return "LUM ImageIO Factory, permettant le chargement d'image au format LUM dans l'OTB";
diff --git a/Code/IO/otbLUMImageIOFactory.h b/Code/IO/otbLUMImageIOFactory.h
index e29ea038c2..3cf27f2fd6 100644
--- a/Code/IO/otbLUMImageIOFactory.h
+++ b/Code/IO/otbLUMImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT LUMImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef LUMImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbMSTARImageIO.cxx b/Code/IO/otbMSTARImageIO.cxx
index 155d3a6fb0..44114f893a 100644
--- a/Code/IO/otbMSTARImageIO.cxx
+++ b/Code/IO/otbMSTARImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -23,7 +23,7 @@
 /* Define MSTAR image type */
 #define CHIP_IMAGE   0
 #define FSCENE_IMAGE 1
- 
+
 #define ALL_DATA   0
 #define MAG_DATA   1
 
@@ -61,9 +61,9 @@ namespace otb
 
     m_Origin[0] = 0.0;
     m_Origin[1] = 0.0;
-  
+
     m_NbOctetPixel = 0;
-  
+
     MSTARfp=NULL;        /* Input FILE ptr to MSTAR image file     */
     HDRfp=NULL;          /* Output FILE ptr to MSTAR header file   */
 
@@ -71,7 +71,7 @@ namespace otb
 
     tptr=NULL;  /* Temp buffer ptr */
     phdr=NULL;  /* Ptr to buffer to hold Phoenix header */
-  
+
     FSCENEdata=NULL; /* Ptr to Fullscene data buffer */
     CHIPdata=NULL;   /* Ptr to CHIp data buffer      */
 
@@ -91,8 +91,8 @@ namespace otb
 
 
 
-  bool MSTARImageIO::CanReadFile( const char* filename ) 
-  { 
+  bool MSTARImageIO::CanReadFile( const char* filename )
+  {
         // First check the filename extension
     std::string fname = filename;
     if ( fname == "" )
@@ -143,7 +143,7 @@ namespace otb
     {
       sscanf((tptr+21), "%d", &nhlen);
     }
-	
+
     /* Extract MSTAR column width */
     tptr = (char *) strstr(tbuff,"NumberOfColumns= ");
     if (tptr == (char *) NULL)
@@ -216,7 +216,7 @@ namespace otb
     otbMsgDevMacro(<< "Can read MSTAR");
     return bool(true);
   }
-  
+
 
 
 
@@ -224,7 +224,7 @@ namespace otb
   {
     bool formatFound = false;
     std::string fname = filename;
- 
+
     if ( fname == "" )
     {
       itkDebugMacro(<< "Fichier image non specifie.");
@@ -242,7 +242,7 @@ namespace otb
   }
 
 
- 
+
   void MSTARImageIO::Read(void* buffer)
   {
 
@@ -251,7 +251,7 @@ namespace otb
     {
       itkExceptionMacro(<< "Error: Unable to open file for reading!\n\n " << m_FileName.c_str() <<").");
     }
-  
+
 /****************************************************
     * Read first 512 bytes to figure out some header   *
     * parameters....                                   *
@@ -282,7 +282,7 @@ namespace otb
     {
       sscanf((tptr+21), "%d", &nhlen);
     }
-	
+
     /* Extract MSTAR column width */
     tptr = (char *) strstr(tbuff,"NumberOfColumns= ");
     if (tptr == (char *) NULL)
@@ -325,10 +325,10 @@ namespace otb
 
     int lNbLines   = this->GetIORegion().GetSize()[1];
     int lNbColumns = this->GetIORegion().GetSize()[0];
-        
+
     unsigned long lNbPixels = (unsigned long)(lNbColumns*lNbLines);
     unsigned long lTailleBuffer = (unsigned long)(m_NbOctetPixel)*lNbPixels;
-        
+
     unsigned char* value = new unsigned char[lTailleBuffer];
 
     otbMsgDevMacro( << "MSTARImageIO::Read() IORegion Start["<<this->GetIORegion().GetIndex()[0]<<","<<this->GetIORegion().GetIndex()[1]<<"] Size ["<<this->GetIORegion().GetSize()[0]<<","<<this->GetIORegion().GetSize()[1]<<"] on Image size ["<<m_Dimensions[0]<<","<<m_Dimensions[1]<<"]");
@@ -338,8 +338,8 @@ namespace otb
  ******************************************************/
     switch (mstartype)
     {
-      case CHIP_IMAGE: 
-        magloc  = phlen; 
+      case CHIP_IMAGE:
+        magloc  = phlen;
         fseek(MSTARfp, magloc, 0);
         nchunks = numrows * numcols;
         break;
@@ -395,7 +395,7 @@ namespace otb
         bytesPerImage = totchunks * sizeof(float);
         CHIPdata = (float *) malloc(bytesPerImage);
 
-     
+
 
         if (CHIPdata == (float *) NULL)
         {
@@ -403,21 +403,21 @@ namespace otb
           itkExceptionMacro("Error: Unable to malloc CHIP memory!\n");
 
         }
-     
+
 
 
         switch (byteorder)
         {
           case LSB_FIRST: /* Little-endian..do byteswap */
 
-            otbMsgDevMacro(<<"Performing auto-byteswap...\n"); 
+            otbMsgDevMacro(<<"Performing auto-byteswap...\n");
             for (i = 0; i < totchunks; i++)
             {
               fread(bigfloatbuf, sizeof(char), 4, MSTARfp);
               littlefloatval = byteswap_SR_IR(bigfloatbuf);
               CHIPdata[i] = littlefloatval;
             }
-            break; 
+            break;
 
             case MSB_FIRST: /* Big-endian..no swap */
 
@@ -429,9 +429,9 @@ namespace otb
      //n = fwrite(CHIPdata, sizeof(float), totchunks, RAWfp);
 
 
-     
 
-     // Recopie dans le buffer 
+
+     // Recopie dans le buffer
 
         for(int ci=0; ci<nchunks; ci++)
         {
@@ -445,7 +445,7 @@ namespace otb
         free(CHIPdata);
         break; /* End of CHIP_IMAGE case */
 
-      case FSCENE_IMAGE:  
+      case FSCENE_IMAGE:
         bytesPerImage = nchunks * sizeof(short);
         FSCENEdata = (unsigned short *) malloc( bytesPerImage );
         if (FSCENEdata == (unsigned short *) NULL)
@@ -459,26 +459,26 @@ namespace otb
         switch (byteorder)
         {
           case LSB_FIRST: /* Little-endian..do byteswap */
-            otbMsgDevMacro(<<"Performing auto-byteswap..."); 
+            otbMsgDevMacro(<<"Performing auto-byteswap...");
             for (i = 0; i < nchunks; i++)
             {
               fread(bigushortbuf, sizeof(char), 2, MSTARfp);
               littleushortval = byteswap_SUS_IUS(bigushortbuf);
               FSCENEdata[i] = littleushortval;
             }
-            break; 
-	 
+            break;
+
             case MSB_FIRST: /* Big-endian..no swap */
               numgot = fread(FSCENEdata, sizeof(short), nchunks, MSTARfp);
               break;
         }
-     
+
         otbMsgDevMacro(<<"Writing MSTAR fullscene magnitude data to ["<<RAWname<<"].");
      //n = fwrite(FSCENEdata, sizeof(short), nchunks, RAWfp);
         for ( int nbComponents = 0 ; nbComponents < 1 ; nbComponents++)
         {
-	// Recopie dans le buffer 
-        
+	// Recopie dans le buffer
+
           unsigned long cpt(0);
           cpt = (unsigned long )(nbComponents)* (unsigned long)(m_NbOctetPixel);
           for ( unsigned long  i=0 ; i < lTailleBuffer ; i = i+m_NbOctetPixel )
@@ -495,32 +495,32 @@ namespace otb
           fclose(MSTARfp);
           itkExceptionMacro(<< "Error: in writing MSTAR Fullscene data!");
         }
-     
+
         otbMsgDevMacro(<<"Reading MSTAR fullscene phase data from ["<<MSTARname<<"].");
-     
+
         switch (byteorder)
         {
           case LSB_FIRST: /* Little-endian..do byteswap */
-            otbMsgDevMacro(<<"Performing auto-byteswap..."); 
+            otbMsgDevMacro(<<"Performing auto-byteswap...");
             for (i = 0; i < nchunks; i++)
             {
               fread(bigushortbuf, sizeof(char), 2, MSTARfp);
               littleushortval = byteswap_SUS_IUS(bigushortbuf);
               FSCENEdata[i] = littleushortval;
             }
-            break; 
-	 
+            break;
+
             case MSB_FIRST: /* Big-endian..no swap */
               numgot = fread(FSCENEdata, sizeof(short), nchunks, MSTARfp);
               break;
         }
-     
+
         otbMsgDevMacro(<<"Writing MSTAR fullscene phase data to ["<<RAWname<<"].");
 //     n = fwrite(FSCENEdata, sizeof(short), nchunks, RAWfp);
         for ( unsigned int nbComponents = 1 ; nbComponents < this->GetNumberOfComponents() ; nbComponents++)
         {
-	// Recopie dans le buffer 
-        
+	// Recopie dans le buffer
+
           unsigned long cpt(0);
           cpt = (unsigned long )(nbComponents)* (unsigned long)(m_NbOctetPixel);
           for ( unsigned long  i=0 ; i < lTailleBuffer ; i = i+m_NbOctetPixel )
@@ -537,7 +537,7 @@ namespace otb
           fclose(MSTARfp);
           itkExceptionMacro(<<"Error: in writing MSTAR Fullscene Phase data!");
         }
-     
+
         /* Cleanup: free memory */
         free(FSCENEdata);
 
@@ -576,10 +576,10 @@ namespace otb
     * Read first 512 bytes to figure out some header   *
     * parameters....                                   *
  ****************************************************/
-	
+
     fread(tbuff, sizeof(char), 1024, MSTARfp);
     rewind(MSTARfp);
-	
+
     /* Extract Phoenix Summary header length */
     tptr = (char *) strstr(tbuff,"PhoenixHeaderLength= ");
     if (tptr == (char *) NULL)
@@ -602,7 +602,7 @@ namespace otb
     {
       sscanf((tptr+21), "%d", &nhlen);
     }
-	
+
     /* Extract MSTAR column width */
     tptr = (char *) strstr(tbuff,"NumberOfColumns= ");
     if (tptr == (char *) NULL)
@@ -635,7 +635,7 @@ namespace otb
     {
       mstartype = FSCENE_IMAGE; /* UnShort Fullscene */
     }
-        
+
     otbMsgDebugMacro( << "Driver: MSTAR - ");
 
     this->SetNumberOfComponents(2);
@@ -644,7 +644,7 @@ namespace otb
     m_Dimensions[1] = NbLignes;
     m_NbOctetPixel = NbOctetPixel;
     otbMsgDebugMacro( <<"Image size cree : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
-        
+
     m_PixelType = VECTOR;
 
 
@@ -652,7 +652,7 @@ namespace otb
     fclose(MSTARfp);
 
     this->SetComponentType( FLOAT );
-	        
+
   }
 
   /** The write function is not implemented */
@@ -662,7 +662,7 @@ namespace otb
   }
 
   /** The write function is not implemented */
-  void MSTARImageIO::Write( const void* buffer) 
+  void MSTARImageIO::Write( const void* buffer)
   {
 
   }
diff --git a/Code/IO/otbMSTARImageIO.h b/Code/IO/otbMSTARImageIO.h
index 90ae03cca0..fb9028a1b2 100644
--- a/Code/IO/otbMSTARImageIO.h
+++ b/Code/IO/otbMSTARImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ public:
   typedef MSTARImageIO            Self;
   typedef itk::ImageIOBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -65,7 +65,7 @@ public:
 
   /** Set the spacing and dimension information for the set filename. */
   virtual void ReadImageInformation();
-  
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
 
@@ -80,7 +80,7 @@ public:
 
   /** Set the spacing and dimension information for the set filename. */
   virtual void WriteImageInformation();
-  
+
   /** Writes the data to disk from the memory buffer provided. Make sure
    * that the IORegions has been set properly. */
   virtual void Write(const void* buffer);
@@ -89,7 +89,7 @@ public:
   MSTARImageIO();
   ~MSTARImageIO();
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
 private:
   MSTARImageIO(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -112,7 +112,7 @@ private:
   char  HDRname[80];         /* Phoenix header filename buffer */
 
   int            outOpt;     /* ALL data, or MAG ONLY...    */
-  int            phlen, nhlen, mstartype; 
+  int            phlen, nhlen, mstartype;
   long           magloc, bytesPerImage, nchunks, totchunks;
 
   char          *tptr;  /* Temp buffer ptr */
@@ -126,7 +126,7 @@ private:
   int            byteorder;
   unsigned char  bigfloatbuf[4];   /* BigEndian float buffer... */
   float          littlefloatval;   /* LittleEndian float value  */
-  unsigned char  bigushortbuf[2];  /* BigEndian ushort buffer...*/ 
+  unsigned char  bigushortbuf[2];  /* BigEndian ushort buffer...*/
   unsigned short littleushortval;  /* LittleEndian ushort value.*/
 
 
diff --git a/Code/IO/otbMSTARImageIOFactory.cxx b/Code/IO/otbMSTARImageIOFactory.cxx
index e3b8495a41..77143ddc74 100644
--- a/Code/IO/otbMSTARImageIOFactory.cxx
+++ b/Code/IO/otbMSTARImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@
 #include "otbMSTARImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -32,18 +32,18 @@ MSTARImageIOFactory::MSTARImageIOFactory()
                          1,
                          itk::CreateObjectFunction<MSTARImageIO>::New());
 }
-  
+
 MSTARImageIOFactory::~MSTARImageIOFactory()
 {
 }
 
-const char* 
+const char*
 MSTARImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 MSTARImageIOFactory::GetDescription() const
 {
   return "MSTAR ImageIO Factory, permettant le chargement d'image MSTAR dans l'OTB";
diff --git a/Code/IO/otbMSTARImageIOFactory.h b/Code/IO/otbMSTARImageIOFactory.h
index cc596fbb2c..65db7453d5 100644
--- a/Code/IO/otbMSTARImageIOFactory.h
+++ b/Code/IO/otbMSTARImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT MSTARImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef MSTARImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbMWImageIO.cxx b/Code/IO/otbMWImageIO.cxx
index 1e625f9e0f..321a2b5fc4 100644
--- a/Code/IO/otbMWImageIO.cxx
+++ b/Code/IO/otbMWImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -45,7 +45,7 @@ MWImageIO::MWImageIO()
   }
 
   m_FileByteOrder = BigEndian;
-  
+
   // Set default spacing to one
   m_Spacing[0] = 1.0;
   m_Spacing[1] = 1.0;
@@ -77,7 +77,7 @@ bool MWImageIO::CanReadFile( const char* filename )
 	    return false;
 	if( m_File.is_open() )
 	    m_File.close();
-	
+
 	std::fstream header_file;
 	header_file.open( filename,  std::ios::in | std::ios::binary );
 	if( header_file.fail() )
@@ -85,7 +85,7 @@ bool MWImageIO::CanReadFile( const char* filename )
 	    otbMsgDevMacro(<<"MWImageIO::CanReadFile() failed header open ! " );
 	    return false;
 	  }
-	
+
 	//Read header informations
 	bool lResult = InternalReadHeaderInformation(header_file,false);
 	header_file.close();
@@ -104,11 +104,11 @@ void MWImageIO::ReadVolume(void*)
 {
 }
 
-// Read image 
+// Read image
 void MWImageIO::Read(void* buffer)
 {
         char * p = static_cast<char *>(buffer);
-   
+
         int lNbLignes   = this->GetIORegion().GetSize()[1];
         int lNbColonnes = this->GetIORegion().GetSize()[0];
         int lPremiereLigne   = this->GetIORegion().GetIndex()[1] ; // [1... ]
@@ -123,7 +123,7 @@ otbMsgDevMacro( <<" Nb Of Components       : "<<this->GetNumberOfComponents());
 	std::streamoff numberOfBytesPerLines = static_cast<std::streamoff>(this->GetComponentSize() * m_Dimensions[0]);
         std::streamoff offset;
         std::streamsize numberOfBytesToBeRead = static_cast<std::streamsize>(this->GetComponentSize() * lNbColonnes);
-        std::streamsize numberOfBytesRead;        
+        std::streamsize numberOfBytesRead;
         std::streamsize cpt = 0;
         for(int LineNo = lPremiereLigne;LineNo <lPremiereLigne + lNbLignes; LineNo++ )
         {
@@ -143,7 +143,7 @@ otbMsgDevMacro( <<" Nb Of Components       : "<<this->GetNumberOfComponents());
                 }
                 cpt += numberOfBytesToBeRead;
         }
- 
+
         unsigned long numberOfPixelsPerLines = lNbLignes * lNbColonnes;
         // Swap bytes if necessary
         if ( 0 ) {}
@@ -170,7 +170,7 @@ void MWImageIO::ReadImageInformation()
 
         //Read header informations
         InternalReadHeaderInformation(m_File,true);
-	
+
 otbMsgDebugMacro( <<"Driver to read: MW");
 otbMsgDebugMacro( <<"         Read  file         : "<< m_FileName);
 otbMsgDebugMacro( <<"         Size               : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
@@ -187,12 +187,12 @@ bool MWImageIO::InternalReadHeaderInformation(std::fstream & file, const bool re
 
 	char * headerInformation = new char[64];
         file.seekg(0, std::ios::beg );
-        file.read(headerInformation,64);  
+        file.read(headerInformation,64);
 	unsigned short NbCol(0);
 	unsigned short NbLig(0);
 	unsigned short Nbcom(0);
 
-        //Set file byte order 
+        //Set file byte order
 	if( headerInformation[0] == *("R") ||  headerInformation[1] == *("I") )
         {
                 m_FileByteOrder = BigEndian;
@@ -213,13 +213,13 @@ bool MWImageIO::InternalReadHeaderInformation(std::fstream & file, const bool re
 	}
 	else
 	{
-		itkExceptionMacro(<< "MW : impossible to determine CodePix information of the image");  
+		itkExceptionMacro(<< "MW : impossible to determine CodePix information of the image");
 		return false;
 	}
- 
+
         SetComponentType(FLOAT);
-        
-	
+
+
 	//Initialisation of image informations
         m_Dimensions[0] = NbCol;
         m_Dimensions[1] = NbLig;
@@ -278,7 +278,7 @@ otbMsgDevMacro( <<" GetComponentSize       : "<<this->GetComponentSize());
         std::streamsize cpt = 0;
 
         const char * p = static_cast<const char *>(buffer);
- 
+
         for(unsigned long LineNo = lPremiereLigne;LineNo <lPremiereLigne + lNbLignes; LineNo++ )
         {
 	        offset  =  headerLength + numberOfBytesPerLines * static_cast<std::streamoff>(LineNo);
@@ -306,14 +306,14 @@ void MWImageIO::WriteImageInformation()
         {
                 m_File.close();
         }
-  
+
         // Open the new file for writing
         // Actually open the file
         m_File.open( m_FileName.c_str(),  std::ios::out | std::ios::trunc | std::ios::binary );
         if( m_File.fail() )
         {
                 itkExceptionMacro(<< "Cannot write requested file "<<m_FileName.c_str()<<".");
-        } 
+        }
 
         //Writing header information
         if( 0 ) {}
@@ -323,7 +323,7 @@ void MWImageIO::WriteImageInformation()
 	}
 
         m_File.seekp(0, std::ios::beg );
-	
+
 	char header[64];
 	std::string comments("Image written with otb mw_IO_factory");
 	m_Ncom = comments.length();
@@ -334,21 +334,21 @@ void MWImageIO::WriteImageInformation()
 	unsigned short lNbComments = m_Ncom;
 	unsigned short lNbLignes   = static_cast<unsigned short>(this->GetIORegion().GetSize()[1]);
 	unsigned short lNbColonnes =static_cast<unsigned short>( this->GetIORegion().GetSize()[0]);
-	
+
 	unsigned short low,high;
 	if (m_ByteOrder == BigEndian)
 	{
 		header[0] = *("R");
 		header[1] = *("I");
-		
+
 		ByteSplitting(lNbComments,low,high);
 		header[2] = static_cast<unsigned char>(low);
 		header[3] = static_cast<unsigned char>(high);
-		
+
 		ByteSplitting(lNbColonnes,low,high);
 		header[4] = static_cast<unsigned char>(low);
 		header[5] = static_cast<unsigned char>(high);
-		
+
 		ByteSplitting(lNbLignes,low,high);
 		header[6] = static_cast<unsigned char>(low);
 		header[7] = static_cast<unsigned char>(high);
@@ -357,15 +357,15 @@ void MWImageIO::WriteImageInformation()
 	{
 		header[0] = *("I");
 		header[1] = *("R");
-		
+
 		ByteSplitting(lNbComments,low,high);
 		header[3] = static_cast<unsigned char>(low);
 		header[2] = static_cast<unsigned char>(high);
-		
+
 		ByteSplitting(lNbColonnes,low,high);
 		header[5] = static_cast<unsigned char>(low);
 		header[4] = static_cast<unsigned char>(high);
-		
+
 		ByteSplitting(lNbLignes,low,high);
 		header[7] = static_cast<unsigned char>(low);
 		header[6] = static_cast<unsigned char>(high);
@@ -374,7 +374,7 @@ void MWImageIO::WriteImageInformation()
 	{
 		itkExceptionMacro(<< "Unknown Byte order");
 	}
-	
+
 	m_File.write(header,64);
 	m_File.write(comments.data(),36);
 
@@ -400,7 +400,7 @@ std::string MWImageIO::GetExtension( const std::string& filename )
   // who's value is the extension of the input filename
   // eg. "myimage.gif" has an extension of "gif"
 	std::string fileExt( filename, it+1, filename.length() );
-	
+
   //If the extension has a "/" in it then this is not an extension and there are no extension.
 	std::string::size_type it2 = fileExt.find_last_of("/");
 	if ( it2!=std::string::npos )
@@ -408,11 +408,11 @@ std::string MWImageIO::GetExtension( const std::string& filename )
 		std::string fileExt3("");
 		return( fileExt3 );
 	}
-	
+
         return( fileExt );
 
 }
 
-  
+
 } // end namespace otb
 
diff --git a/Code/IO/otbMWImageIO.h b/Code/IO/otbMWImageIO.h
index d7f71500ee..f6fa7ff93f 100644
--- a/Code/IO/otbMWImageIO.h
+++ b/Code/IO/otbMWImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ public:
 
   /** Byte order typedef */
   typedef Superclass::ByteOrder  ByteOrder;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -59,16 +59,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -90,7 +90,7 @@ public:
   virtual void Write(const void* buffer);
   // JULIEN: NOT USED, NOT IMPLEMENTED
   //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
 protected:
   /** Construtor.*/
   MWImageIO();
@@ -103,7 +103,7 @@ protected:
 
   bool OpenOneraDataFileForWriting(const char* filename);
   bool OpenOneraHeaderFileForWriting(const char* filename);
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -111,9 +111,9 @@ private:
   void operator=(const Self&); //purposely not implemented
 
   /** Internal method to read filename extension */
-  
+
   std::string GetExtension( const std::string& filename );
-  
+
   /** Internal method to read header informations */
   bool InternalReadHeaderInformation(std::fstream & file, const bool reportError);
   inline void ByteSplitting(unsigned short a, unsigned short &low, unsigned short &high){
diff --git a/Code/IO/otbMWImageIOFactory.cxx b/Code/IO/otbMWImageIOFactory.cxx
index 1ca2c41f4f..2758533101 100644
--- a/Code/IO/otbMWImageIOFactory.cxx
+++ b/Code/IO/otbMWImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbMWImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ MWImageIOFactory::MWImageIOFactory()
                          1,
                          itk::CreateObjectFunction<MWImageIO>::New());
 }
-  
+
 MWImageIOFactory::~MWImageIOFactory()
 {
 }
 
-const char* 
+const char*
 MWImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 MWImageIOFactory::GetDescription() const
 {
   return "MegaWave ImageIO Factory, permettant le chargement d'image au format MW dans l'OTB";
diff --git a/Code/IO/otbMWImageIOFactory.h b/Code/IO/otbMWImageIOFactory.h
index 042a0838a6..198f996025 100644
--- a/Code/IO/otbMWImageIOFactory.h
+++ b/Code/IO/otbMWImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT MWImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef MWImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbMetaDataKey.cxx b/Code/IO/otbMetaDataKey.cxx
index 8851801981..c4e0b93d79 100644
--- a/Code/IO/otbMetaDataKey.cxx
+++ b/Code/IO/otbMetaDataKey.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,9 +28,9 @@
 namespace otb
 {
 
-const std::string MetaDataKey::m_DriverShortNameKey = "DriverShortName"; 
-const std::string MetaDataKey::m_DriverLongNameKey = "DriverLongName"; 
-  
+const std::string MetaDataKey::m_DriverShortNameKey = "DriverShortName";
+const std::string MetaDataKey::m_DriverLongNameKey = "DriverLongName";
+
 const std::string MetaDataKey::m_ProjectionRefKey = "ProjectionRef";
 
 const std::string MetaDataKey::m_GCPProjectionKey = "GCPProjection";
@@ -39,9 +39,9 @@ const std::string MetaDataKey::m_GCPCountKey = "GCPCount";
 
 const std::string MetaDataKey::m_GeoTransformKey = "GeoTransform";
 
-const std::string MetaDataKey::m_MetadataKey = "Metadata_"; 
+const std::string MetaDataKey::m_MetadataKey = "Metadata_";
 const std::string MetaDataKey::m_SubMetadataKey = "SubMetadata_";
- 
+
 const std::string MetaDataKey::m_UpperLeftCornerKey = "UpperLeftCorner";
 const std::string MetaDataKey::m_UpperRightCornerKey = "UpperRightCorner";
 const std::string MetaDataKey::m_LowerLeftCornerKey = "LowerLeftCorner";
@@ -54,7 +54,7 @@ const std::string MetaDataKey::m_ColorEntryAsRGBKey = "ColorEntryAsRGB";
 const std::string MetaDataKey::m_OSSIMKeywordlistKey = "OSSIMKeywordlist";
 const std::string MetaDataKey::m_OSSIMKeywordlistDelimiterKey = "OSSIMKeywordlistDelimiter";
 
-/*const MetaDataKey::KeyTypeDef Types[] = 
+/*const MetaDataKey::KeyTypeDef Types[] =
   {
   	{MetaDataKey::m_DriverShortNameKey, 		MetaDataKey::TSTRING},
   	{MetaDataKey::m_DriverLongNameKey, 		MetaDataKey::TSTRING},
@@ -71,10 +71,10 @@ const std::string MetaDataKey::m_OSSIMKeywordlistDelimiterKey = "OSSIMKeywordlis
 	{MetaDataKey::m_ColorTableNameKey,    		MetaDataKey::TSTRING},
 	{MetaDataKey::m_ColorEntryCountKey,   		MetaDataKey::TENTIER},
 	{MetaDataKey::m_ColorEntryAsRGBKey,    		MetaDataKey::TVECTOR}
-	
-	
+
+
   }; */
-const MetaDataKey::KeyTypeDef Types[] = 
+const MetaDataKey::KeyTypeDef Types[] =
   {
   	MetaDataKey::KeyTypeDef(MetaDataKey::m_DriverShortNameKey,		MetaDataKey::TSTRING),
   	MetaDataKey::KeyTypeDef(MetaDataKey::m_DriverLongNameKey, 		MetaDataKey::TSTRING),
@@ -94,26 +94,26 @@ const MetaDataKey::KeyTypeDef Types[] =
 	MetaDataKey::KeyTypeDef(MetaDataKey::m_OSSIMKeywordlistKey,		MetaDataKey::TOSSIMKEYWORDLIST),
 	MetaDataKey::KeyTypeDef(MetaDataKey::m_OSSIMKeywordlistDelimiterKey,MetaDataKey::TSTRING)
   };
-  
-  
+
+
 MetaDataKey::KeyType MetaDataKey::GetKeyType(std::string name)
 {
    MetaDataKey::KeyType ktype(MetaDataKey::TSTRING);
 
    for ( unsigned int i=0; i<NBKEYS; i++)
       {
-//      if ( strcmp(name.c_str(),Types[i].keyname.c_str()) == 0 ) 
+//      if ( strcmp(name.c_str(),Types[i].keyname.c_str()) == 0 )
+
 
-        
         if ( (name.find(Types[i].keyname) >= 0 ) &&
-             (name.find(Types[i].keyname) <= name.size() ) ) 
-         {	
+             (name.find(Types[i].keyname) <= name.size() ) )
+         {
          ktype = Types[i].type;
          break;
          }
-         
+
       }
-   return(ktype);     	
+   return(ktype);
 }
 
 
diff --git a/Code/IO/otbMetaDataKey.h b/Code/IO/otbMetaDataKey.h
index bd5d5fc08d..df0d88b6aa 100644
--- a/Code/IO/otbMetaDataKey.h
+++ b/Code/IO/otbMetaDataKey.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -41,29 +41,29 @@ class ITK_EXPORT MetaDataKey
 public:
 
   typedef MetaDataKey Self;
-  
+
   MetaDataKey(){};
   virtual ~MetaDataKey(){};
- 
-  static const std::string m_DriverShortNameKey; 
-  static const std::string m_DriverLongNameKey; 
-      
+
+  static const std::string m_DriverShortNameKey;
+  static const std::string m_DriverLongNameKey;
+
   static const std::string m_ProjectionRefKey;
-  
+
   static const std::string m_GCPProjectionKey;
-  static const std::string m_GCPParametersKey; 
+  static const std::string m_GCPParametersKey;
   static const std::string m_GCPCountKey;
-  
+
   static const std::string m_GeoTransformKey;
-  
-  static const std::string m_MetadataKey; 
-  static const std::string m_SubMetadataKey; 
-  
+
+  static const std::string m_MetadataKey;
+  static const std::string m_SubMetadataKey;
+
   static const std::string m_UpperLeftCornerKey;
   static const std::string m_UpperRightCornerKey;
   static const std::string m_LowerLeftCornerKey;
   static const std::string m_LowerRightCornerKey;
-  
+
   static const std::string m_ColorTableNameKey;
   static const std::string m_ColorEntryCountKey;
   static const std::string m_ColorEntryAsRGBKey;
@@ -80,27 +80,27 @@ public:
 	TOSSIMKEYWORDLIST,
   };
   /*
-  typedef struct 
+  typedef struct
   {
   	std::string keyname;
-  	KeyType type; 
+  	KeyType type;
   } KeyTypeDef ;*/
 
   struct KeyTypeDef
   {
   	std::string keyname;
-  	KeyType type; 
+  	KeyType type;
 
-    KeyTypeDef() {} 
+    KeyTypeDef() {}
     KeyTypeDef(std::string _keyname, KeyType _type)
     {
       keyname = _keyname;
       type = _type;
-    } 
+    }
 
   } ;
 
-  
+
   KeyType GetKeyType(std::string name);
 
   typedef std::vector<double> VectorType;
@@ -108,10 +108,10 @@ public:
 private:
   MetaDataKey(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
 
-  
-}; 
+
+
+};
 
 /** \class OTB_GCP
  *
@@ -125,14 +125,14 @@ public:
 
 
     /** Unique identifier, often numeric */
-    std::string m_Id; 
+    std::string m_Id;
 
     /** Informational message or "" */
     std::string m_Info;
 
     /** Pixel (x) location of GCP on raster */
     double      m_GCPCol;
-    
+
     /** Line (y) location of GCP on raster */
     double      m_GCPRow;
 
@@ -160,37 +160,37 @@ public:
     virtual ~OTB_GCP(){};
 
   OTB_GCP(const OTB_GCP& pGcp)
-  { 
-    m_Id = pGcp.m_Id; 
-    m_Info = pGcp.m_Info; 
-    m_GCPCol = pGcp.m_GCPCol; 
-    m_GCPRow = pGcp.m_GCPRow; 
-    m_GCPX = pGcp.m_GCPX; 
-    m_GCPY = pGcp.m_GCPY; 
-    m_GCPZ = pGcp.m_GCPZ; 
+  {
+    m_Id = pGcp.m_Id;
+    m_Info = pGcp.m_Info;
+    m_GCPCol = pGcp.m_GCPCol;
+    m_GCPRow = pGcp.m_GCPRow;
+    m_GCPX = pGcp.m_GCPX;
+    m_GCPY = pGcp.m_GCPY;
+    m_GCPZ = pGcp.m_GCPZ;
   }
-  
-  void operator=(const OTB_GCP& pGcp) 
-  { 
-    m_Id = pGcp.m_Id; 
-    m_Info = pGcp.m_Info; 
-    m_GCPCol = pGcp.m_GCPCol; 
-    m_GCPRow = pGcp.m_GCPRow; 
-    m_GCPX = pGcp.m_GCPX; 
-    m_GCPY = pGcp.m_GCPY; 
-    m_GCPZ = pGcp.m_GCPZ; 
+
+  void operator=(const OTB_GCP& pGcp)
+  {
+    m_Id = pGcp.m_Id;
+    m_Info = pGcp.m_Info;
+    m_GCPCol = pGcp.m_GCPCol;
+    m_GCPRow = pGcp.m_GCPRow;
+    m_GCPX = pGcp.m_GCPX;
+    m_GCPY = pGcp.m_GCPY;
+    m_GCPZ = pGcp.m_GCPZ;
   }
 
   void Print(std::ostream& os)const
   {
    os << " 	GCP Id = " << this->m_Id << std::endl;
-   os << " 	GCP Info =  " << this->m_Info << std::endl;  
+   os << " 	GCP Info =  " << this->m_Info << std::endl;
    os << " 	GCP (Row,Col) = (" << this->m_GCPRow << "," << this->m_GCPCol << ")" << std::endl;
    os << " 	GCP (X,Y,Z) = (" << this->m_GCPX << "," << this->m_GCPY << "," << this->m_GCPZ << ")" << std::endl;
   }
 
 };
-  
+
 } // end namespace otb
 
 
diff --git a/Code/IO/otbONERAImageIO.cxx b/Code/IO/otbONERAImageIO.cxx
index 51c564cdd7..bc130c7047 100644
--- a/Code/IO/otbONERAImageIO.cxx
+++ b/Code/IO/otbONERAImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -112,7 +112,7 @@ namespace otb
     }
 
   // Check magic_number
-    int magicNumber; 
+    int magicNumber;
     m_Datafile.seekg(0, std::ios::beg );
     m_Datafile.read((char*)(&magicNumber),4);
 
@@ -126,7 +126,7 @@ namespace otb
       {
         m_FileByteOrder = BigEndian;
       }
-      else if ( m_ByteOrder == BigEndian ) 
+      else if ( m_ByteOrder == BigEndian )
       {
         m_FileByteOrder = LittleEndian;
       }
@@ -163,7 +163,7 @@ namespace otb
   }
 
 
-// Read image 
+// Read image
   void ONERAImageIO::Read(void* buffer)
   {
     unsigned int       dim;
@@ -175,7 +175,7 @@ namespace otb
     }
 
     unsigned char * p = static_cast<unsigned char *>(buffer);
-   
+
     int lNbLines   = this->GetIORegion().GetSize()[1];
     int lNbColumns = this->GetIORegion().GetSize()[0];
     int lFirstLine   = this->GetIORegion().GetIndex()[1] ; // [1... ]
@@ -196,11 +196,11 @@ namespace otb
     std::streamoff headerLength = ONERA_HEADER_LENGTH + numberOfBytesPerLines;
     std::streamoff offset;
     std::streamsize numberOfBytesToBeRead = 2 * m_NbOctetPixel *lNbColumns;
-    std::streamsize numberOfBytesRead;        
+    std::streamsize numberOfBytesRead;
 
     char* value = new char[numberOfBytesToBeRead];
     std::streamsize cpt = 0;
- 
+
     for(int LineNo = lFirstLine;LineNo <lFirstLine + lNbLines; LineNo++ )
     {
       offset  =  headerLength + numberOfBytesPerLines * static_cast<std::streamoff>(LineNo);
@@ -232,17 +232,17 @@ namespace otb
     {
       itkExceptionMacro(<<"ONERAImageIO::Read() undefined component type! " );
     }
-    
+
 
     delete [] value;
     value = NULL;
-    
+
   }
 
 
-  bool ONERAImageIO::OpenOneraDataFileForReading(const char* filename)                                       
+  bool ONERAImageIO::OpenOneraDataFileForReading(const char* filename)
   {
-  // Make sure that we have a file to 
+  // Make sure that we have a file to
     std::string lFileName(filename);
     if ( lFileName.empty() )
     {
@@ -256,7 +256,7 @@ namespace otb
       m_Datafile.close();
     }
     const std::string DataFileName = System::GetRootName(filename)+".dat";
-  
+
   // Open the new file for reading
     m_Datafile.open( DataFileName.c_str(),  std::ios::in | std::ios::binary );
     if( m_Datafile.fail() )
@@ -267,9 +267,9 @@ namespace otb
     return true;
   }
 
-  bool ONERAImageIO::OpenOneraHeaderFileForReading(const char* filename)                                       
+  bool ONERAImageIO::OpenOneraHeaderFileForReading(const char* filename)
   {
-  // Make sure that we have a file to 
+  // Make sure that we have a file to
     std::string lFileName(filename);
     if ( lFileName.empty() )
     {
@@ -283,7 +283,7 @@ namespace otb
       m_Headerfile.close();
     }
     const std::string HeaderFileName = System::GetRootName(filename)+".ent";
-  
+
   // Open the new file for reading
   // Actually open the file
     m_Headerfile.open( HeaderFileName.c_str(),  std::ios::in );
@@ -317,9 +317,9 @@ namespace otb
       itkExceptionMacro(<< "Cannot read ONERA header file "<<m_FileName);
     }
 
-  // check "Format_valeurs_look"  
+  // check "Format_valeurs_look"
     char* sHeader = new char[1024];
-  // skip 2 lines 	
+  // skip 2 lines
     m_Headerfile.getline(sHeader,1024);
     m_Headerfile.getline(sHeader,1024);
     m_Headerfile.getline(sHeader,1024);
@@ -336,13 +336,13 @@ namespace otb
     }
     else
     {
-      itkExceptionMacro(<< "data format not supported by OTB (only 'complex_real_4' is available)");  
-    }  
+      itkExceptionMacro(<< "data format not supported by OTB (only 'complex_real_4' is available)");
+    }
 
 
 
   // Check magic_number
-    int magicNumber; 
+    int magicNumber;
     m_Datafile.seekg(0, std::ios::beg );
     m_Datafile.read((char*)(&magicNumber),4);
     if( magicNumber == ONERA_MAGIC_NUMBER )
@@ -355,7 +355,7 @@ namespace otb
       {
         m_FileByteOrder = BigEndian;
       }
-      else if ( m_ByteOrder == BigEndian ) 
+      else if ( m_ByteOrder == BigEndian )
       {
         m_FileByteOrder = LittleEndian;
       }
@@ -366,9 +366,9 @@ namespace otb
     short NbCol;
 
     m_Datafile.seekg(ONERA_HEADER_LENGTH + 2, std::ios::beg );
-    m_Datafile.read((char*)(&NbCol),2);  
+    m_Datafile.read((char*)(&NbCol),2);
     otbSwappFileOrderToSystemOrderMacro(short, &NbCol, 1);
-    
+
     m_Datafile.seekg(0, std::ios::end);
     long gcountHead = static_cast<long>(ONERA_HEADER_LENGTH + 2*4*NbCol);
     long gcount     = static_cast<long>(m_Datafile.tellg());
@@ -388,7 +388,7 @@ namespace otb
       m_Dimensions[1] = m_height;
     }
 
-    this->SetNumberOfDimensions(2);  
+    this->SetNumberOfDimensions(2);
 
     otbMsgDebugMacro( <<"Driver to read: ONERA");
     otbMsgDebugMacro( <<"         Read  file         : "<< m_FileName);
@@ -404,9 +404,9 @@ namespace otb
   }
 
 
-  bool ONERAImageIO::OpenOneraDataFileForWriting(const char* filename)                                       
+  bool ONERAImageIO::OpenOneraDataFileForWriting(const char* filename)
   {
-  // Make sure that we have a file to 
+  // Make sure that we have a file to
     std::string lFileName(filename);
     if ( lFileName.empty() )
     {
@@ -420,7 +420,7 @@ namespace otb
       m_Datafile.close();
     }
     const std::string DataFileName = System::GetRootName(filename)+".dat";
-  
+
   // Open the new file for reading
 
   // Actually open the file
@@ -433,9 +433,9 @@ namespace otb
     return true;
   }
 
-  bool ONERAImageIO::OpenOneraHeaderFileForWriting(const char* filename)                                       
+  bool ONERAImageIO::OpenOneraHeaderFileForWriting(const char* filename)
   {
-  // Make sure that we have a file to 
+  // Make sure that we have a file to
     std::string lFileName(filename);
     if ( lFileName.empty() )
     {
@@ -449,7 +449,7 @@ namespace otb
       m_Headerfile.close();
     }
     const std::string HeaderFileName = System::GetRootName(filename)+".ent";
-  
+
   // Open the new file for reading
   // Actually open the file
     m_Headerfile.open( HeaderFileName.c_str(),  std::ios::out | std::ios::trunc | std::ios::binary );
@@ -482,7 +482,7 @@ namespace otb
 
   void ONERAImageIO::Write(const void* buffer)
   {
-   
+
     if( m_FlagWriteImageInformation == true )
     {
       this->WriteImageInformation();
@@ -566,15 +566,15 @@ namespace otb
     }
     else
     {
-      itkExceptionMacro(<< "data format not supported by OTB (only 'complex_real_4' is available)");  
-    }  
-       
+      itkExceptionMacro(<< "data format not supported by OTB (only 'complex_real_4' is available)");
+    }
+
     m_Headerfile << "Format_valeurs_look=    \t"<< sPixelType << std::endl;
-    m_Headerfile << "Nb_case_par_ligne_look= \t"<< m_Dimensions[0] <<std::endl;  
+    m_Headerfile << "Nb_case_par_ligne_look= \t"<< m_Dimensions[0] <<std::endl;
     m_Headerfile << "Nb_ligne_look=          \t"<< m_Dimensions[1] <<" + 1 ligne en-tete en binaire (entiers 16 bit) " << std::endl;
 
   // write magic_number
-    int magicNumber = ONERA_MAGIC_NUMBER; 
+    int magicNumber = ONERA_MAGIC_NUMBER;
     short NbCol = static_cast<short>(m_Dimensions[0]);
     short NbRow = static_cast<short>(m_Dimensions[1]);
     int ByteSizeCol = NbCol*4*2;
@@ -582,7 +582,7 @@ namespace otb
 //  itk::ByteSwapper< int>::SwapFromSystemToLittleEndian(&magicNumber);
     m_Datafile.seekp(0, std::ios::beg );
     m_Datafile.write((char*)(&magicNumber),4);
-  
+
     char * tab = new char[ByteSizeCol];
     for( int i = 0 ; i < (NbRow + 1) ; i++)
     {
@@ -595,8 +595,8 @@ namespace otb
 
     m_Datafile.seekp(ONERA_HEADER_LENGTH+2, std::ios::beg );
     m_Datafile.write((char*)(&NbCol),2);
-  
-  
+
+
     otbMsgDebugMacro( <<"Driver to write: ONERA");
     otbMsgDebugMacro( <<"         Write file         : "<< m_FileName);
     otbMsgDebugMacro( <<"         Size               : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
@@ -609,6 +609,6 @@ namespace otb
 
   }
 
-  
+
 } // end namespace otb
 
diff --git a/Code/IO/otbONERAImageIO.h b/Code/IO/otbONERAImageIO.h
index 52e8a87d4d..6af18fdf64 100644
--- a/Code/IO/otbONERAImageIO.h
+++ b/Code/IO/otbONERAImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,12 +40,12 @@ class ITK_EXPORT ONERAImageIO : public itk::ImageIOBase
 public:
 
   typedef unsigned char InputPixelType;
-  
+
   /** Standard class typedefs. */
   typedef ONERAImageIO            Self;
   typedef itk::ImageIOBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -58,16 +58,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -89,7 +89,7 @@ public:
   virtual void Write(const void* buffer);
   // JULIEN: NOT USED, NOT IMPLEMENTED
   //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
 protected:
   /** Construtor.*/
   ONERAImageIO();
@@ -102,7 +102,7 @@ protected:
 
   bool OpenOneraDataFileForWriting(const char* filename);
   bool OpenOneraHeaderFileForWriting(const char* filename);
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   /** Dimension along Ox of the image*/
@@ -115,14 +115,14 @@ protected:
   //float **pafimas;
   std::fstream m_Datafile;
   std::fstream m_Headerfile;
-  
+
 private:
   ONERAImageIO(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
 
-  /** M�thode analyse le nom du fichier a ouvrir. S'il s'agit d'un r�pertoire, 
+  /** M�thode analyse le nom du fichier a ouvrir. S'il s'agit d'un r�pertoire,
     * on regarde s'il contient un produit le fichier ent�te (fichier "ENT...")
-    * Dans ce cas, ONERAFileName contient le nom du fichier a ouvrir. 
+    * Dans ce cas, ONERAFileName contient le nom du fichier a ouvrir.
     * Sinon ONERAFileName contient filename
     */
   void GetOneraImageFileName( const char * filename, std::string & OneraFileName );
diff --git a/Code/IO/otbONERAImageIOFactory.cxx b/Code/IO/otbONERAImageIOFactory.cxx
index daee00012a..8197e680f7 100644
--- a/Code/IO/otbONERAImageIOFactory.cxx
+++ b/Code/IO/otbONERAImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbONERAImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ ONERAImageIOFactory::ONERAImageIOFactory()
                          1,
                          itk::CreateObjectFunction<ONERAImageIO>::New());
 }
-  
+
 ONERAImageIOFactory::~ONERAImageIOFactory()
 {
 }
 
-const char* 
+const char*
 ONERAImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 ONERAImageIOFactory::GetDescription() const
 {
   return "ONERA ImageIO Factory, permettant le chargement d'image au format ONERA dans l'OTB";
diff --git a/Code/IO/otbONERAImageIOFactory.h b/Code/IO/otbONERAImageIOFactory.h
index 5810438e00..2fe0debf83 100644
--- a/Code/IO/otbONERAImageIOFactory.h
+++ b/Code/IO/otbONERAImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT ONERAImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef ONERAImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbPointSetFileReader.h b/Code/IO/otbPointSetFileReader.h
index 512a8a69e6..6b40ba8f7e 100644
--- a/Code/IO/otbPointSetFileReader.h
+++ b/Code/IO/otbPointSetFileReader.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
    * \brief Read a point set from a lidar file.
    *
    * \sa PointSetSource
-   * 
+   *
    * \ingroup IOFilters
    *
    */
@@ -41,58 +41,58 @@ template<class TOutputPointSet>
     typedef PointSetFileReader         Self;
     typedef otb::PointSetSource<TOutputPointSet>  Superclass;
     typedef itk::SmartPointer<Self>  Pointer;
-  
+
     /** Method for creation through the object factory. */
     itkNewMacro(Self);
 
     /** Run-time type information (and related methods). */
     itkTypeMacro(PointSetFileReader, PointSetSource);
 
-    
-    
+
+
     /** Typedef */
     typedef TOutputPointSet PointSetType;
     typedef typename PointSetType::PointType PointType;
     typedef typename PointSetType::PixelType PixelType;
-    
+
     /** Specify the file to read. This is forwarded to the IO instance. */
     itkSetStringMacro(FileName);
     itkGetStringMacro(FileName);
-    
-    /** Get Macro*/ 
+
+    /** Get Macro*/
     itkGetMacro( NumberOfPoints, long int );
     itkGetMacro( MinX, double );
     itkGetMacro( MaxX, double );
     itkGetMacro( MinY, double );
     itkGetMacro( MaxY, double );
-    
-    
+
+
     virtual void GenerateOutputInformation(void);
-    
+
     /** Does the real work. */
     virtual void GenerateData();
-    
-    
+
+
   protected:
     PointSetFileReader();
     ~PointSetFileReader();
     void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
     void TestFileExistanceAndReadability();
-    
+
     std::string m_FileName; // The file to be read
     long int m_NumberOfPoints;
     double m_MinX;
     double m_MaxX;
     double m_MinY;
     double m_MaxY;
-    
+
   private:
     PointSetFileReader(const Self&); //purposely not implemented
     void operator=(const Self&); //purposely not implemented
-    
+
     std::string m_ExceptionMessage;
-    
+
 };
 
 } //namespace otb
diff --git a/Code/IO/otbPointSetFileReader.txx b/Code/IO/otbPointSetFileReader.txx
index f79497d918..563ac82694 100644
--- a/Code/IO/otbPointSetFileReader.txx
+++ b/Code/IO/otbPointSetFileReader.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,33 +39,33 @@ namespace otb
     m_MinY=0;
     m_MaxY=0;
   }
-  
+
   template <class TOutputPointSet>
       PointSetFileReader<TOutputPointSet>
   ::~PointSetFileReader()
   {
   }
 
-  
-  
+
+
   template <class TOutputPointSet>
-      void 
+      void
       PointSetFileReader<TOutputPointSet>
   ::GenerateOutputInformation(void)
   {
     typename TOutputPointSet::Pointer output = this->GetOutput();
-  
+
     otbDebugMacro(<<"Reading file for GenerateOutputInformation()" << m_FileName);
-  
+
   // Check to see if we can read the file given the name or prefix
     //
     if ( m_FileName == "" )
     {
       throw itk::ImageFileReaderException(__FILE__, __LINE__, "FileName must be specified", ITK_LOCATION);
     }
-   
 
-    
+
+
     // Test if the file exists and if it can be open.
     // An exception will be thrown otherwise.
     //
@@ -78,13 +78,13 @@ namespace otb
     {
       m_ExceptionMessage = err.GetDescription();
     }
-  
+
     std::ifstream ifs;
     ifs.open(m_FileName.c_str(), std::ios::in | std::ios::binary);
     liblas::LASReader reader(ifs);
-  
+
     liblas::LASHeader const& header = reader.GetHeader();
-    
+
     otbDebugMacro(<< "Signature: " << header.GetFileSignature());
     otbDebugMacro(<< "Points count: " << header.GetPointRecordsCount());
 
@@ -94,10 +94,10 @@ namespace otb
     m_MinY = header.GetMinY();
     m_MaxY = header.GetMaxY();
     ifs.close();
-  
+
   }
-  
-  
+
+
   template <class TOutputPointSet>
       void
       PointSetFileReader<TOutputPointSet>
@@ -129,30 +129,30 @@ namespace otb
       itk::ImageFileReaderException e(__FILE__, __LINE__,msg.str().c_str(),ITK_LOCATION);
       throw e;
       return;
-    
+
     }
     readTester.close();
   }
-  
+
   template <class TOutputPointSet>
       void PointSetFileReader<TOutputPointSet>
   ::GenerateData()
   {
-  
+
 
     typename TOutputPointSet::Pointer output = this->GetOutput();
-    
+
     std::ifstream ifs;
     ifs.open(m_FileName.c_str(), std::ios::in | std::ios::binary);
     liblas::LASReader reader(ifs);
-  
+
     liblas::LASHeader const& header = reader.GetHeader();
-    
+
     otbDebugMacro(<< "Signature: " << header.GetFileSignature());
     otbDebugMacro(<< "Points count: " << header.GetPointRecordsCount());
 
     m_NumberOfPoints = header.GetPointRecordsCount();
-  
+
     while (reader.ReadNextPoint())
     {
       liblas::LASPoint const& p = reader.GetPoint();
@@ -163,15 +163,15 @@ namespace otb
 
 
       unsigned long i = output->GetNumberOfPoints();
-      output->SetPoint( i, point );        
+      output->SetPoint( i, point );
 
       PixelType V;
       V = static_cast<PixelType>( p.GetZ() );
       output->SetPointData( i, V );
-    
+
     }
-    
-    
+
+
     ifs.close();
   }
 
@@ -190,7 +190,7 @@ namespace otb
     os << indent << "Max Y: " << this->m_MaxY << std::endl;
     os << indent << "m_FileName: " << this->m_FileName << "\n";
   }
-  
+
 } //namespace otb
 
 #endif
diff --git a/Code/IO/otbPrepareSRTMDirectory.h b/Code/IO/otbPrepareSRTMDirectory.h
index 130b1e6afe..54b9119b49 100644
--- a/Code/IO/otbPrepareSRTMDirectory.h
+++ b/Code/IO/otbPrepareSRTMDirectory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,12 +30,12 @@ namespace otb
    * \brief Prepare SRTM directory for Ossim from a full archive
    *
    *  As ossim has some issue with directories containing too many SRTM tiles
-   * (>5000) this class enable to copy only the required tiles from 
+   * (>5000) this class enable to copy only the required tiles from
    * FullDEMDirectoryPath containing all the SRTM tiles to DEMDirectoryPath
    * that will be passed as the argument of the SetDEMDirectoryPath() of
    * the otb::DEMToImageGenerator for example
-   * 
-   * 
+   *
+   *
  */
 
 
diff --git a/Code/IO/otbPrepareSRTMDirectory.txx b/Code/IO/otbPrepareSRTMDirectory.txx
index 60254fe767..a9ec39a422 100644
--- a/Code/IO/otbPrepareSRTMDirectory.txx
+++ b/Code/IO/otbPrepareSRTMDirectory.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -58,17 +58,17 @@ namespace otb
 
   bool PrepareSRTMDirectory::Evaluate()
   {
-    
+
     int startX = floor(m_ULLon);
     int endX = ceil(m_LRLon);
     int startY = floor(m_LRLat);
     int endY = ceil(m_ULLat);
-    
+
     std::cout << startX << std::endl;
     std::cout << endX << std::endl;
     std::cout << startY << std::endl;
     std::cout << endY << std::endl;
-    
+
     for (int j=startY; j<endY; j++)
     {
       for (int i=startX; i< endX; i++)
@@ -76,11 +76,11 @@ namespace otb
         std::ostringstream inputfilename;
         inputfilename << m_FullDEMDirectoryPath;
         inputfilename << "/";
-        
+
         std::ostringstream outputfilename;
         outputfilename << m_DEMDirectoryPath;
         outputfilename << "/";
-        
+
         if (j >= 0)
         {
           inputfilename << "N";
@@ -88,7 +88,7 @@ namespace otb
           outputfilename << "N";
           outputfilename << setfill('0') << setw(2) << j;
         }
-        else 
+        else
         {
           inputfilename << "S";
           inputfilename << setfill('0') << setw(2) << -j;
@@ -102,28 +102,28 @@ namespace otb
           outputfilename << "E";
           outputfilename << setfill('0') << setw(3) << i;
         }
-        else 
+        else
         {
           inputfilename << "W";
           inputfilename << setfill('0') << setw(3) << -i;
           outputfilename << "W";
           outputfilename << setfill('0') << setw(3) << -i;
         }
-        
+
         inputfilename << ".hgt";
         outputfilename << ".hgt";
-        
+
         std::cout << "Copying " << inputfilename.str() << " to " << outputfilename.str() << std::endl;
-            
+
         //copy input file to output file
         ossimFilename inputFile(inputfilename.str().c_str());
         ossimFilename outputFile(outputfilename.str().c_str());
         inputFile.copyFileTo(outputFile);
-        
-        
+
+
       }
     }
-    
+
     return true;
   }
 
diff --git a/Code/IO/otbRADImageIO.cxx b/Code/IO/otbRADImageIO.cxx
index a15a97144c..2081d78b27 100644
--- a/Code/IO/otbRADImageIO.cxx
+++ b/Code/IO/otbRADImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -39,14 +39,14 @@ namespace otb
     this->SetNumberOfDimensions(2);
 
   // By default the type to CI2
-    m_TypeRAD= "CR4";  
+    m_TypeRAD= "CR4";
     m_NbOctetPixel=8;
     m_NbOfChannels=1;
     this->SetNumberOfComponents(2);
     m_PixelType = COMPLEX;
     m_ComponentType = FLOAT;
 
-  
+
     if ( itk::ByteSwapper<char>::SystemIsLittleEndian() == true)
     {
       m_ByteOrder = LittleEndian;
@@ -107,7 +107,7 @@ namespace otb
       otbMsgDevMacro(<<"RADImageIO::CanReadFile() failed header open ! " );
       return false;
     }
-        
+
         //Read header informations
     bool lResult = InternalReadHeaderInformation(lFileName, header_file,false);
     header_file.close();
@@ -126,12 +126,12 @@ namespace otb
   {
   }
 
-// Read image 
+// Read image
   void RADImageIO::Read(void* buffer)
   {
     unsigned long step = this->GetNumberOfComponents();
     char * p = static_cast<char *>(buffer);
- 
+
     int lNbLines   = this->GetIORegion().GetSize()[1];
     int lNbColumns = this->GetIORegion().GetSize()[0];
     int lFirstLine   = this->GetIORegion().GetIndex()[1] ; // [1... ]
@@ -145,15 +145,15 @@ namespace otb
     otbMsgDevMacro( <<" Nb Of Channels         : "<<m_NbOfChannels);
 
     std::streamoff  headerLength(0);
-    std::streamoff  offset;        
+    std::streamoff  offset;
     std::streamoff  numberOfBytesPerLines = static_cast<std::streamoff>( m_NbOctetPixel * m_Dimensions[0]);
-    std::streamsize numberOfBytesToBeRead = m_NbOctetPixel * lNbColumns;       
-    std::streamsize numberOfBytesRead;        
+    std::streamsize numberOfBytesToBeRead = m_NbOctetPixel * lNbColumns;
+    std::streamsize numberOfBytesRead;
     unsigned long cpt = 0;
 
         // Update the step variable
     step = step * (unsigned long)(this->GetComponentSize());
-        
+
     char * value = new char[numberOfBytesToBeRead];
     if(value==NULL)
     {
@@ -178,7 +178,7 @@ namespace otb
         offset +=  static_cast<std::streamoff>( m_NbOctetPixel * lFirstColumn);
         m_ChannelsFile[numChannel].seekg(offset, std::ios::beg);
                         //Read a line
-        m_ChannelsFile[numChannel].read( static_cast<char *>( value ), numberOfBytesToBeRead );                        
+        m_ChannelsFile[numChannel].read( static_cast<char *>( value ), numberOfBytesToBeRead );
 
         numberOfBytesRead = m_ChannelsFile[numChannel].gcount();
 #ifdef __APPLE_CC__
@@ -216,11 +216,11 @@ namespace otb
     {
       itkExceptionMacro(<<"RADImageIO::Read() undefined component type! " );
     }
-       
-       
+
+
     delete [] value;
     value = NULL;
-        
+
   }
 
 
@@ -263,7 +263,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "RAD : 'NBCOLONNES' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "RAD : 'NBCOLONNES' keyword is not find in the header file.");
       }
       else
       {
@@ -279,7 +279,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "RAD : 'NBLIGNES' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "RAD : 'NBLIGNES' keyword is not find in the header file.");
       }
       else
       {
@@ -287,15 +287,15 @@ namespace otb
       }
     }
     file >> m_Dimensions[1];
-       
+
         // Read NBPLANS information
     file >> lString;
-    lString = System::SetToUpper(lString);        
+    lString = System::SetToUpper(lString);
     if( (lString != "NBPLANS") && (lString != "NBBANDS") )
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "RAD : 'NBPLANS' keyword is not find in the header file.");  
+        itkExceptionMacro(<< "RAD : 'NBPLANS' keyword is not find in the header file.");
       }
       else
       {
@@ -304,8 +304,8 @@ namespace otb
     }
     file >> m_NbOfChannels;
         // Because we read complex : *2
-    this->SetNumberOfComponents(2*m_NbOfChannels);      
-        
+    this->SetNumberOfComponents(2*m_NbOfChannels);
+
         // Read TYPECODAGE information
     file >> lString;
     lString = System::SetToUpper(lString);
@@ -313,7 +313,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "RAD : the first line of the header file must be contains 'TYPECODAGE' caracters.");  
+        itkExceptionMacro(<< "RAD : the first line of the header file must be contains 'TYPECODAGE' caracters.");
       }
       else
       {
@@ -332,19 +332,19 @@ namespace otb
     }
     if(lStrCodePix == "PHA")
     {
-      m_PixelType = SCALAR;        
+      m_PixelType = SCALAR;
       SetComponentType(CHAR);
       m_NbOctetPixel=1;
     }
     if(lStrCodePix == "I2")
     {
-      m_PixelType = SCALAR;        
+      m_PixelType = SCALAR;
       SetComponentType(SHORT);
       m_NbOctetPixel=2;
     }
     if(lStrCodePix == "I4")
     {
-      m_PixelType = SCALAR;        
+      m_PixelType = SCALAR;
       SetComponentType(INT);
       m_NbOctetPixel=4;
     }
@@ -354,7 +354,7 @@ namespace otb
       SetComponentType(FLOAT);
       m_NbOctetPixel=4;
     }
-    else if(lStrCodePix == "CI2") 
+    else if(lStrCodePix == "CI2")
     {
       m_PixelType = COMPLEX;
       SetComponentType(SHORT);
@@ -390,8 +390,8 @@ namespace otb
     SetComponentType(FLOAT);
     m_NbOctetPixel=2;
   }
-    */        
-    
+    */
+
     else if(lStrCodePix == "CI4")
     {
       m_PixelType = COMPLEX;
@@ -408,7 +408,7 @@ namespace otb
     {
       if( reportError == true )
       {
-        itkExceptionMacro(<< "RAD : the value type '"<<lStrCodePix<<"' (second line) set in the header file is not reconized as correct value.");  
+        itkExceptionMacro(<< "RAD : the value type '"<<lStrCodePix<<"' (second line) set in the header file is not reconized as correct value.");
       }
       else
       {
@@ -428,7 +428,7 @@ namespace otb
         if( lString == "INTEL" )
         {
           m_FileByteOrder = LittleEndian;
-        }                        
+        }
         else if( lString == "IEEE" )
         {
           m_FileByteOrder = BigEndian;
@@ -437,7 +437,7 @@ namespace otb
         {
           if( reportError == true )
           {
-            itkExceptionMacro(<< "RAD : the value SENSCODAGE '"<<lString<<"' set in the header file is not reconized as correct value. Possible values are INTEL or IEEE");  
+            itkExceptionMacro(<< "RAD : the value SENSCODAGE '"<<lString<<"' set in the header file is not reconized as correct value. Possible values are INTEL or IEEE");
           }
           else
           {
@@ -447,22 +447,22 @@ namespace otb
       }
     }
 
-        
+
         // Read FileName information
     std::string lPathName = System::GetPathName( file_name );
-    m_ChannelsFileName.clear();        
+    m_ChannelsFileName.clear();
     for(unsigned int i=0 ; i<m_NbOfChannels ; i++)
     {
       file >> lString;
         ::itk::OStringStream lStream;
-        lStream << lPathName <<"/"<< lString ;                
+        lStream << lPathName <<"/"<< lString ;
         m_ChannelsFileName.push_back(lStream.str());
-   
+
     }
     file.close();
 
     m_ChannelsFile = new std::fstream[m_NbOfChannels];
-       
+
         // Try to open channels file
     for (unsigned int channels = 0 ; channels<m_ChannelsFileName.size() ; channels++)
     {
@@ -472,7 +472,7 @@ namespace otb
       {
         if( reportError == true )
         {
-          itkExceptionMacro(<< "RAD : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");  
+          itkExceptionMacro(<< "RAD : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");
         }
         else
         {
@@ -536,13 +536,13 @@ namespace otb
     std::streamoff headerLength(0);
     std::streamoff  numberOfBytesPerLines = static_cast<std::streamoff>(m_NbOctetPixel * m_Dimensions[0]);
     std::streamsize numberOfBytesToBeWrite = static_cast<std::streamsize>(m_NbOctetPixel * lNbColumns);
-        
+
     std::streamoff offset = 0;
     unsigned long cpt = 0;
 
         // Update the step variable
     step = m_NbOctetPixel;
-              
+
     const char * p = static_cast<const char *>(buffer);
 
     char* value = new char[numberOfBytesToBeWrite];
@@ -592,14 +592,14 @@ namespace otb
     {
       m_HeaderFile.close();
     }
-  
+
         // Open the new file for writing
         // Actually open the file
     m_HeaderFile.open( m_FileName.c_str(),  std::ios::out | std::ios::trunc );
     if( m_HeaderFile.fail() )
     {
       itkExceptionMacro(<< "Cannot write requested file "<<m_FileName.c_str()<<".");
-    } 
+    }
 
         //Write COLUMNS information
     m_HeaderFile <<  "NBCOLUMNS ";
@@ -608,21 +608,21 @@ namespace otb
         //Write LINES information
     m_HeaderFile <<  "NBLINES ";
     m_HeaderFile << m_Dimensions[1] << std::endl;
-        
+
         //Write CHANNELS information
     m_HeaderFile << "NBBANDS ";
-    m_HeaderFile << m_NbOfChannels << std::endl;        
-        
+    m_HeaderFile << m_NbOfChannels << std::endl;
+
     std::string lString;
         //Write TYPE information
     m_HeaderFile << "TYPECODAGE ";
-        
-        
+
+
     std::string lExtension;
     std::string lStringPixelType = System::SetToUpper(this->GetPixelTypeAsString(m_PixelType));
     std::string lStringComponentType = System::SetToUpper(this->GetComponentTypeAsString(this->GetComponentType()));
-        
-        
+
+
     if(lStringPixelType == "SCALAR")
     {
       if( lStringComponentType =="UCHAR")
@@ -647,14 +647,14 @@ namespace otb
       {
         m_NbOctetPixel=4;
         m_TypeRAD = "I4";
-        lExtension=".i4";                        
+        lExtension=".i4";
       }
       else if( lStringComponentType =="FLOAT")
       {
         m_NbOctetPixel=4;
         m_TypeRAD = "R4";
         lExtension=".r4";
-                        
+
       }
     }
     else if( lStringPixelType == "COMPLEX")
@@ -676,7 +676,7 @@ namespace otb
       {
         m_NbOctetPixel=2;
         m_TypeRAD = "COCT";
-        lExtension=".coct";                        
+        lExtension=".coct";
       }
 /*                if( this->GetComponentType()=="FLOAT")
       {
@@ -703,7 +703,7 @@ namespace otb
                         {
                           m_NbOctetPixel=16;
                           m_TypeRAD = "CR8";
-                          lExtension=".cr8";                        
+                          lExtension=".cr8";
                         }
     }
     m_HeaderFile << m_TypeRAD << std::endl;
@@ -735,7 +735,7 @@ namespace otb
     }
     m_HeaderFile.close();
 
-   
+
 
 
         //Allocate  buffer of stream file
@@ -747,7 +747,7 @@ namespace otb
       m_ChannelsFile[channels].open( m_ChannelsFileName[channels].c_str(),  std::ios::out | std::ios::trunc | std::ios::binary );
       if( m_ChannelsFile[channels].fail() )
       {
-        itkExceptionMacro(<< "RAD : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");  
+        itkExceptionMacro(<< "RAD : impossible to find the file <"<<m_ChannelsFileName[channels]<<">.");
       }
     }
     this->SetFileTypeToBinary();
@@ -780,7 +780,7 @@ namespace otb
 
   }
 
-  
+
 } // end namespace otb
 
 
diff --git a/Code/IO/otbRADImageIO.h b/Code/IO/otbRADImageIO.h
index bd6c03076e..643e3e84b6 100644
--- a/Code/IO/otbRADImageIO.h
+++ b/Code/IO/otbRADImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -47,7 +47,7 @@ public:
 
   /** Byte order typedef */
   typedef Superclass::ByteOrder  ByteOrder;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
 
@@ -59,16 +59,16 @@ public:
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
   virtual bool CanStreamRead(){  return true; };
 
   /** Set the spacing and dimention information for the set filename. */
   virtual void ReadImageInformation();
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(void* buffer);
-    
+
   /** Reads 3D data from multiple files assuming one slice per file. */
   virtual void ReadVolume(void* buffer);
 
@@ -91,7 +91,7 @@ public:
 
   // JULIEN: NOT USED, NOT IMPLEMENTED
   // void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
 protected:
   /** Construtor.*/
   RADImageIO();
@@ -100,12 +100,12 @@ protected:
 
   bool OpenOneraDataFileForReading(const char* filename);
   bool OpenOneraHeaderFileForReading(const char* filename);
-  
+
   void InternalReadImageInformation();
 
   bool OpenOneraDataFileForWriting(const char* filename);
   bool OpenOneraHeaderFileForWriting(const char* filename);
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
@@ -149,11 +149,11 @@ private:
   itk::ImageIOBase::ByteOrder m_FileByteOrder;
   std::fstream m_HeaderFile;
   std::string m_TypeRAD;
-  std::vector< std::string >  m_ChannelsFileName;    
+  std::vector< std::string >  m_ChannelsFileName;
   std::fstream *  m_ChannelsFile;
   unsigned int     m_NbOfChannels;
   int     m_NbOctetPixel;
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/IO/otbRADImageIOFactory.cxx b/Code/IO/otbRADImageIOFactory.cxx
index 42a85cbf8f..60fa672fe3 100644
--- a/Code/IO/otbRADImageIOFactory.cxx
+++ b/Code/IO/otbRADImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbRADImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ RADImageIOFactory::RADImageIOFactory()
                          1,
                          itk::CreateObjectFunction<RADImageIO>::New());
 }
-  
+
 RADImageIOFactory::~RADImageIOFactory()
 {
 }
 
-const char* 
+const char*
 RADImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 RADImageIOFactory::GetDescription() const
 {
   return "RAD ImageIO Factory, permettant le chargement d'image au format RAD dans l'OTB";
diff --git a/Code/IO/otbRADImageIOFactory.h b/Code/IO/otbRADImageIOFactory.h
index 5ecb4fa266..2c53bb5d9e 100644
--- a/Code/IO/otbRADImageIOFactory.h
+++ b/Code/IO/otbRADImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,17 +28,17 @@ namespace otb
  */
 class ITK_EXPORT RADImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef RADImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -61,8 +61,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbSHPVectorDataIO.h b/Code/IO/otbSHPVectorDataIO.h
index 8518c16199..75aeeed0b9 100644
--- a/Code/IO/otbSHPVectorDataIO.h
+++ b/Code/IO/otbSHPVectorDataIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ namespace otb
  * \brief ImageIO object for reading (not writing) SHP format vector data
  *
  */
-template <class TData> class ITK_EXPORT SHPVectorDataIO 
+template <class TData> class ITK_EXPORT SHPVectorDataIO
   : public VectorDataIOBase<TData>
   {
 public:
@@ -52,7 +52,7 @@ public:
 
   /** Byte order typedef */
   typedef typename Superclass::ByteOrder  ByteOrder;
-  
+
   /** Data typedef */
   typedef TData VectorDataType;
   typedef typename VectorDataType::DataTreeType  DataTreeType;
@@ -78,13 +78,13 @@ public:
   /** Determine the file type. Returns true if this VectorDataIO can read the
    * file specified. */
   virtual bool CanReadFile(const char*);
-  
+
   /** Determine the file type. Returns true if the VectorDataIO can stream read the specified file */
   virtual bool CanStreamRead(){  return false; };
 
 /*   /\** Set the spacing and dimention information for the set filename. *\/ */
 /*   virtual void ReadVectorDataInformation(); */
- 
+
   /** Reads the data from disk into the memory buffer provided. */
   virtual void Read(VectorDataPointerType data);
 
@@ -104,7 +104,7 @@ public:
   /** Writes the data to disk from the memory buffer provided. Make sure
    * that the IORegion has been set properly. */
   virtual void Write(VectorDataConstPointerType data);
-  
+
 protected:
   /** Construtor.*/
   SHPVectorDataIO();
@@ -115,7 +115,7 @@ protected:
 
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-  
+
   /** Conversion tools */
 
   static DataNodePointerType ConvertGeometryToPointNode(const OGRGeometry * ogrGeometry);
@@ -131,7 +131,7 @@ private:
   void operator=(const Self&); //purposely not implemented
 
   OGRDataSource * m_DataSource;
-  
+
   /** Is this necessary ? */
 
   /** Internal method to read header informations */
diff --git a/Code/IO/otbSHPVectorDataIO.txx b/Code/IO/otbSHPVectorDataIO.txx
index 79790eab1c..4fbed8c469 100644
--- a/Code/IO/otbSHPVectorDataIO.txx
+++ b/Code/IO/otbSHPVectorDataIO.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -48,7 +48,7 @@ namespace otb
       }
   }
   template<class TData>
-  bool 
+  bool
   SHPVectorDataIO<TData>::CanReadFile( const char* filename )
   {
 
@@ -58,7 +58,7 @@ namespace otb
       {
 	return false;
       }
-	
+
     OGRDataSource::DestroyDataSource(poDS);
     return true;
   }
@@ -66,7 +66,7 @@ namespace otb
 
   // Used to print information about this object
   template<class TData>
-  void 
+  void
   SHPVectorDataIO<TData>::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
     Superclass::PrintSelf(os, indent);
@@ -74,7 +74,7 @@ namespace otb
 
   // Read vector data
   template<class TData>
-  void 
+  void
   SHPVectorDataIO<TData>
   ::Read(VectorDataPointerType data)
   {
@@ -96,7 +96,7 @@ namespace otb
 
     // Reading layers
     otbMsgDebugMacro(<<"Number of layers: "<<m_DataSource->GetLayerCount());
-  
+
     // Retrieving root node
     DataTreePointerType tree = data->GetDataTree();
     DataNodePointerType root = tree->GetRoot()->Get();
@@ -129,7 +129,7 @@ namespace otb
 	OGRFeature * feature;
 
 	layer->ResetReading();
-      
+
 	while((feature = layer->GetNextFeature())!=NULL)
 	  {
 	    DataNodePointerType folder = DataNodeType::New();
@@ -150,7 +150,7 @@ namespace otb
 	    /** Temporary geometry container */
 	    OGRGeometry * geometry = feature->GetGeometryRef();
 
-  
+
 	    if(geometry != NULL)
 	      {
 		switch(geometry->getGeometryType())
@@ -377,7 +377,7 @@ namespace otb
 		      break;
 		    }
 		  }
-	      
+
 	      }
 	  }
       }
@@ -390,13 +390,13 @@ namespace otb
   SHPVectorDataIO<TData>
   ::ConvertGeometryToPointNode(const OGRGeometry * ogrGeometry)
   {
-    OGRPoint * ogrPoint = (OGRPoint *) ogrGeometry; 
-  
+    OGRPoint * ogrPoint = (OGRPoint *) ogrGeometry;
+
     if(ogrPoint == NULL)
       {
 	itkGenericExceptionMacro(<<"Failed to convert OGRGeometry to OGRPoint");
       }
-  
+
     PointType otbPoint;
     otbPoint.Fill(0);
     otbPoint[0] = static_cast<typename DataNodeType::PrecisionType>(ogrPoint->getX());
@@ -406,7 +406,7 @@ namespace otb
       {
 	otbPoint[2]=static_cast<typename DataNodeType::PrecisionType>(ogrPoint->getZ());
       }
-  
+
     DataNodePointerType node = DataNodeType::New();
     node->SetPoint(otbPoint);
     return node;
@@ -427,16 +427,16 @@ namespace otb
 
 
     LinePointerType line = LineType::New();
-  
+
     OGRPoint * ogrTmpPoint = new OGRPoint();
-  
+
     for(int pIndex = 0;pIndex<ogrLine->getNumPoints();++pIndex)
       {
-      
+
 	ogrLine->getPoint(pIndex,ogrTmpPoint);
-      
+
 	typename LineType::VertexType vertex;
-      
+
 	vertex[0] = ogrTmpPoint->getX();
 	vertex[1] = ogrTmpPoint->getY();
 
@@ -444,7 +444,7 @@ namespace otb
 	  {
 	    vertex[2]= ogrTmpPoint->getZ();
 	  }
-      
+
 	line->AddVertex(vertex);
       }
     delete ogrTmpPoint;
@@ -462,18 +462,18 @@ namespace otb
   ::ConvertGeometryToPolygonNode(const OGRGeometry * ogrGeometry)
   {
     OGRPolygon * ogrPolygon = (OGRPolygon *)ogrGeometry;
-  
+
     if(ogrPolygon == NULL)
       {
 	itkGenericExceptionMacro(<<"Failed to convert OGRGeometry to OGRPolygon");
       }
-  
+
     OGRPoint * ogrTmpPoint = new OGRPoint();
-  
+
     OGRLinearRing *  ogrRing = ogrPolygon->getExteriorRing();
 
-    PolygonPointerType extRing = PolygonType::New();  
-      
+    PolygonPointerType extRing = PolygonType::New();
+
     for(int pIndex = 0;pIndex<ogrRing->getNumPoints();++pIndex)
       {
 	ogrRing->getPoint(pIndex,ogrTmpPoint);
@@ -510,7 +510,7 @@ namespace otb
 	  }
 	intRings->PushBack(ring);
       }
- 
+
     delete ogrTmpPoint;
 
     DataNodePointerType node = DataNodeType::New();
@@ -543,7 +543,7 @@ namespace otb
   {
     //  // try to create an ogr driver
     OGRSFDriver * ogrDriver = OGRSFDriverRegistrar::GetRegistrar()->GetDriverByName("ESRI Shapefile");
- 
+
     if(ogrDriver == NULL)
       {
 	itkExceptionMacro(<<"No OGR driver found to write file "<<this->m_FileName);
@@ -556,8 +556,8 @@ namespace otb
       }
     // m_DataSource = OGRSFDriverRegistrar::Open(this->m_FileName.c_str(), TRUE);
     m_DataSource = ogrDriver->CreateDataSource(this->m_FileName.c_str(),NULL);
-  
-  
+
+
     // check the created data source
     if(m_DataSource == NULL)
       {
@@ -567,14 +567,14 @@ namespace otb
     // Retrieving root node
     DataTreeConstPointerType tree = data->GetDataTree();
     DataNodePointerType root = tree->GetRoot()->Get();
-  
+
     typedef itk::PreOrderTreeIterator<DataTreeType> TreeIteratorType;
 
     OGRLayer * ogrCurrentLayer = NULL;
     std::vector<OGRFeature *> ogrFeatures;
     OGRGeometryCollection * ogrCollection = NULL;
     // OGRGeometry * ogrCurrentGeometry = NULL;
-  
+
 
     TreeIteratorType it(tree);
     it.GoToBegin();
@@ -592,7 +592,7 @@ namespace otb
 	      if(ogrCurrentLayer!=NULL && ogrFeatures.size()>0)
 		{
 		  std::vector<OGRFeature*>::iterator fIt = ogrFeatures.begin();
-		  
+
 		  while(fIt!=ogrFeatures.end())
 		    {
 		      if(ogrCurrentLayer->CreateFeature(*fIt) != OGRERR_NONE)
@@ -619,10 +619,10 @@ namespace otb
 		      delete ogrCollection;
 		      ogrCollection = NULL;
 		    }
-	     
+
 		  ogrFeatures.push_back(OGRFeature::CreateFeature(ogrCurrentLayer->GetLayerDefn()));
-		  ogrFeatures.back()->SetField("Name",it.Get()->GetNodeId());  
-	  
+		  ogrFeatures.back()->SetField("Name",it.Get()->GetNodeId());
+
 		  break;
 		}
 	    case FEATURE_POINT:
@@ -652,7 +652,7 @@ namespace otb
  	      {
 		OGRLineString ogrLine;
 		VertexListConstPointerType vertexList = it.Get()->GetLine()->GetVertexList();
-	    
+
 		typename VertexListType::ConstIterator vIt = vertexList->Begin();
 
 		while(vIt != vertexList->End())
@@ -667,7 +667,7 @@ namespace otb
 		    ogrLine.addPoint(&ogrPoint);
 		    ++vIt;
 		  }
-		
+
 		if(ogrCollection == NULL)
 		  {
 		    ogrFeatures.back()->GetDefnRef()->SetGeomType(wkbLineString);
@@ -685,7 +685,7 @@ namespace otb
 		OGRPolygon * ogrPolygon = new OGRPolygon();
 		OGRLinearRing * ogrExternalRing = new OGRLinearRing();
 		VertexListConstPointerType vertexList = it.Get()->GetPolygonExteriorRing()->GetVertexList();
-	    
+
 		typename VertexListType::ConstIterator vIt = vertexList->Begin();
 
 		while(vIt != vertexList->End())
@@ -709,7 +709,7 @@ namespace otb
 		    pIt!=it.Get()->GetPolygonInteriorRings()->End();++pIt)
 		  {
 		    OGRLinearRing * ogrInternalRing = new OGRLinearRing();
-		    vertexList = pIt.Get()->GetVertexList();	    
+		    vertexList = pIt.Get()->GetVertexList();
 		    vIt = vertexList->Begin();
 
 		    while(vIt != vertexList->End())
@@ -793,7 +793,7 @@ namespace otb
   if(ogrCurrentLayer!=NULL && ogrFeatures.size()>0)
       {
 	std::vector<OGRFeature*>::iterator fIt = ogrFeatures.begin();
-	
+
 	while(fIt!=ogrFeatures.end())
 	  {
 	    if(ogrCurrentLayer->CreateFeature(*fIt) != OGRERR_NONE)
@@ -805,10 +805,10 @@ namespace otb
 	  }
       }
     ogrFeatures.clear();
-    
+
     otbMsgDevMacro( <<" SHPVectorDataIO::Write()  ");
   }
- 
+
   } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbSHPVectorDataIOFactory.h b/Code/IO/otbSHPVectorDataIOFactory.h
index 65dd14aab0..b4860ed412 100644
--- a/Code/IO/otbSHPVectorDataIOFactory.h
+++ b/Code/IO/otbSHPVectorDataIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,17 +27,17 @@ namespace otb
  */
 template <class TData> class ITK_EXPORT SHPVectorDataIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef SHPVectorDataIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -60,8 +60,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 
diff --git a/Code/IO/otbSHPVectorDataIOFactory.txx b/Code/IO/otbSHPVectorDataIOFactory.txx
index 768c281b93..46a57387c5 100644
--- a/Code/IO/otbSHPVectorDataIOFactory.txx
+++ b/Code/IO/otbSHPVectorDataIOFactory.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,13 +40,13 @@ SHPVectorDataIOFactory<TData>::~SHPVectorDataIOFactory()
 {
 }
 template<class TData>
-const char* 
+const char*
 SHPVectorDataIOFactory<TData>::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 template<class TData>
-const char* 
+const char*
 SHPVectorDataIOFactory<TData>::GetDescription() const
 {
   return "SHP VectorDataIO Factory, allows the loading of SHP vector data into OTB";
diff --git a/Code/IO/otbSpatialObjectDXFReader.h b/Code/IO/otbSpatialObjectDXFReader.h
index 4c731f6aac..eb47926c38 100644
--- a/Code/IO/otbSpatialObjectDXFReader.h
+++ b/Code/IO/otbSpatialObjectDXFReader.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ namespace otb
    *
    */
 template <class TSpatialObject>
-class ITK_EXPORT SpatialObjectDXFReader 
+class ITK_EXPORT SpatialObjectDXFReader
   : public SpatialObjectSource< TSpatialObject >
 {
  public:
@@ -40,33 +40,33 @@ class ITK_EXPORT SpatialObjectDXFReader
   typedef SpatialObjectSource<TSpatialObject> Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
- 		
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(SpatialObjectDXFReader, SpatialObjectSource);
-  
+
  /** Superclass Typedefs */
  typedef TSpatialObject GroupSpatialObjectType;
  typedef typename GroupSpatialObjectType::Pointer GroupSpatialObjectPointerType;
- 
+
   /** Set the filename  */
   void SetFileName(char * filename);
-  
+
   /** Get the filename */
   itkGetStringMacro(FileName);
-  
+
  /** Set The layer name */
  itkSetStringMacro(LayerName);
- 
+
  /** Get The layer name */
  itkGetStringMacro(LayerName);
 
  /** Workaround while waiting for the SpatialObject bug to be fixed */
  virtual void Update(void);
-  
- protected: 
+
+ protected:
  /** Constructor */
   SpatialObjectDXFReader();
  /** Destructor */
@@ -79,14 +79,14 @@ class ITK_EXPORT SpatialObjectDXFReader
   void operator=(const Self&); //purposely not implemented
 
   /** Test whether the given filename exist and it is readable,
-      this is intended to be called before attempting to use 
+      this is intended to be called before attempting to use
       ImageIO classes for actually reading the file. If the file
       doesn't exist or it is not readable, and exception with an
       approriate message will be thrown. */
   void TestFileExistanceAndReadability();
-  
+
   std::string m_FileName;
-  std::string  m_LayerName;	
+  std::string  m_LayerName;
 };
 } // end namespace otb
 
diff --git a/Code/IO/otbSpatialObjectDXFReader.txx b/Code/IO/otbSpatialObjectDXFReader.txx
index 7ad35242f0..550e709e32 100644
--- a/Code/IO/otbSpatialObjectDXFReader.txx
+++ b/Code/IO/otbSpatialObjectDXFReader.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -59,7 +59,7 @@ SpatialObjectDXFReader<TSpatialObject>
   this->Modified();
 }
  /** Test whether the given filename exist and it is readable,
-      this is intended to be called before attempting to use 
+      this is intended to be called before attempting to use
       ImageIO classes for actually reading the file. If the file
       doesn't exist or it is not readable, and exception with an
       approriate message will be thrown. */
diff --git a/Code/IO/otbStreamingImageFileWriter.h b/Code/IO/otbStreamingImageFileWriter.h
index 7c42ec7bec..d67a041a51 100644
--- a/Code/IO/otbStreamingImageFileWriter.h
+++ b/Code/IO/otbStreamingImageFileWriter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,13 +35,13 @@ namespace otb
  * StreamingImageFileWriter interfaces with an ImageIO class to write out the
  * data whith streaming process.
  *
- * StreamingImageFileWriter will divide the output into severalpieces 
+ * StreamingImageFileWriter will divide the output into severalpieces
  * (controlled by SetNumberOfStreamDivisions), and call the upstream
  * pipeline for each piece, tiling the individual outputs into one large
  * output. This reduces the memory footprint for the application since
  * each filter does not have to process the entire dataset at once.
  * StreamingImageFileWriter will write directly the streaming buffer in the image file.
- * The output image is not completely allocated ; just streaming size, 
+ * The output image is not completely allocated ; just streaming size,
  * calculate whith the NumberOfStreamDivisions, is allocate.
  *
  * \sa ImageFileWriter
@@ -60,19 +60,19 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(StreamingImageFileWriter,itk::ImageToImageFilter);
 
   /** Some typedefs for the input and output. */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::Pointer InputImagePointer;
-  typedef typename InputImageType::RegionType InputImageRegionType; 
-  typedef typename InputImageType::PixelType InputImagePixelType; 
+  typedef typename InputImageType::RegionType InputImageRegionType;
+  typedef typename InputImageType::PixelType InputImagePixelType;
   typedef TInputImage OutputImageType;
   typedef typename OutputImageType::Pointer OutputImagePointer;
-  typedef typename OutputImageType::RegionType OutputImageRegionType; 
-  typedef typename OutputImageType::PixelType OutputImagePixelType; 
+  typedef typename OutputImageType::RegionType OutputImageRegionType;
+  typedef typename OutputImageType::PixelType OutputImagePixelType;
   typedef typename Superclass::DataObjectPointer DataObjectPointer;
 
   /** Streaming traits helper typedef */
@@ -85,19 +85,19 @@ public:
   /** SmartPointer to a region splitting object */
   typedef itk::ImageRegionSplitter<itkGetStaticConstMacro(InputImageDimension)>  SplitterType;
   typedef typename SplitterType::Pointer RegionSplitterPointer;
-  
+
   /**  Set buffer memory size (in bytes) use to calculate the number of stream divisions */
   void SetBufferMemorySize(unsigned long );
- 
+
   /**  Set the buffer number of lines use to calculate the number of stream divisions */
   void SetBufferNumberOfLinesDivisions(unsigned long);
- 
-  /**  The number of stream divisions is calculate by using 
-   * OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING and 
+
+  /**  The number of stream divisions is calculate by using
+   * OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING and
    * OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING cmake variables.
    */
   void SetAutomaticNumberOfStreamDivisions(void);
-	
+
 	/** Set the tiling automatic mode for streaming division */
 	void SetTilingStreamDivisions(void);
 	/** Choose number of divisions in tiling streaming division */
@@ -109,7 +109,7 @@ public:
   /** Set the number of pieces to divide the input.  The upstream pipeline
    * will be executed this many times. */
   void SetNumberOfStreamDivisions(unsigned long);
-  
+
   /** Get the number of pieces to divide the input. The upstream pipeline
    * will be executed this many times. */
   unsigned long GetNumberOfStreamDivisions(void);
@@ -129,7 +129,7 @@ public:
 
 
   /** ImageFileWriter Methods */
-  
+
   /** Specify the name of the output file to write. */
   itkGetStringMacro(FileName);
 
@@ -144,7 +144,7 @@ public:
       this->Modified();
     }
 
-  
+
   /** Specify the region to write. If left NULL, then the whole image
    * is written. */
   void SetIORegion(const itk::ImageIORegion & region);
@@ -155,10 +155,10 @@ public:
   itkGetConstReferenceMacro(UseCompression,bool);
   itkBooleanMacro(UseCompression);
 
-  /** By default the MetaDataDictionary is taken from the input image and 
-   *  passed to the ImageIO. In some cases, however, a user may prefer to 
+  /** By default the MetaDataDictionary is taken from the input image and
+   *  passed to the ImageIO. In some cases, however, a user may prefer to
    *  introduce her/his own MetaDataDictionary. This is often the case of
-   *  the ImageSeriesWriter. This flag defined whether the MetaDataDictionary 
+   *  the ImageSeriesWriter. This flag defined whether the MetaDataDictionary
    *  to use will be the one from the input image or the one already set in
    *  the ImageIO object. */
   itkSetMacro(UseInputMetaDataDictionary,bool);
@@ -183,27 +183,27 @@ protected:
 private:
   StreamingImageFileWriter(const StreamingImageFileWriter&); //purposely not implemented
   void operator=(const StreamingImageFileWriter&); //purposely not implemented
-  
+
   /** This method calculate the number of stream divisions, by using the CalculationDivision type */
   unsigned long CalculateNumberOfStreamDivisions(void);
-  
-  /** Use to define the method used to calculate number of divisions */ 
+
+  /** Use to define the method used to calculate number of divisions */
   unsigned long m_BufferMemorySize;
   unsigned long m_BufferNumberOfLinesDivisions;
   unsigned long m_NumberOfStreamDivisions;
-  
+
   RegionSplitterPointer m_RegionSplitter;
- 
+
   /** Use to determine method of calculation number of divisions */
   CalculationDivisionEnumType m_CalculationDivision;
-  
+
   /** ImageFileWriter Parameters */
   std::string        m_FileName;
-  
+
   itk::ImageIOBase::Pointer m_ImageIO;
-  
+
   bool m_UserSpecifiedImageIO; //track whether the ImageIO is user specified
-  
+
   itk::ImageIORegion m_IORegion;
   bool m_UserSpecifiedIORegion; //
                                 //track whether the region is user specified
diff --git a/Code/IO/otbStreamingImageFileWriter.txx b/Code/IO/otbStreamingImageFileWriter.txx
index 5f760eac9a..7807222877 100644
--- a/Code/IO/otbStreamingImageFileWriter.txx
+++ b/Code/IO/otbStreamingImageFileWriter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -45,7 +45,7 @@ StreamingImageFileWriter<TInputImage>
   m_NumberOfStreamDivisions = 0;
   // default to AUTOMATIC_NUMBER_OF_DIVISIONS
   m_CalculationDivision = SET_AUTOMATIC_NUMBER_OF_STREAM_DIVISIONS;
-  
+
   // create default region splitter
   m_RegionSplitter = itk::ImageRegionSplitter<InputImageDimension>::New();
 
@@ -68,7 +68,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::SetBufferMemorySize(unsigned long memory_size_divisions)
 {
@@ -81,7 +81,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::SetBufferNumberOfLinesDivisions(unsigned long nb_lines_divisions)
 {
@@ -94,7 +94,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::SetNumberOfStreamDivisions(unsigned long nb_divisions)
 {
@@ -107,7 +107,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::SetAutomaticNumberOfStreamDivisions(void)
 {
@@ -119,7 +119,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::SetTilingStreamDivisions(void)
 {
@@ -129,7 +129,7 @@ StreamingImageFileWriter<TInputImage>
 }
 
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::SetTilingStreamDivisions(unsigned long nb_divisions)
 {
@@ -143,7 +143,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-unsigned long 
+unsigned long
 StreamingImageFileWriter<TInputImage>
 ::GetNumberOfStreamDivisions(void)
 {
@@ -154,7 +154,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-std::string 
+std::string
 StreamingImageFileWriter<TInputImage>
 ::GetMethodUseToCalculateNumberOfStreamDivisions(void)
 {
@@ -165,13 +165,13 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os,indent);
 
-  os << indent << "File Name: " 
+  os << indent << "File Name: "
      << (m_FileName.data() ? m_FileName.data() : "(none)") << std::endl;
 
   os << indent << "Image IO: ";
@@ -229,9 +229,9 @@ StreamingImageFileWriter<TInputImage>
 
 //---------------------------------------------------------
 template<class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
-::SetIORegion (const itk::ImageIORegion& region) 
+::SetIORegion (const itk::ImageIORegion& region)
 {
   itkDebugMacro("setting IORegion to " << region );
   if ( m_IORegion != region)
@@ -240,17 +240,17 @@ StreamingImageFileWriter<TInputImage>
     this->Modified();
     m_UserSpecifiedIORegion = true;
     }
-} 
+}
 
 /**
  *
  */
 template<class TInputImage>
-unsigned long 
+unsigned long
 StreamingImageFileWriter<TInputImage>
 ::CalculateNumberOfStreamDivisions(void)
 {
-        
+
         return StreamingTraitsType
     ::CalculateNumberOfStreamDivisions(this->GetInput(),
                                        this->GetInput()->GetLargestPossibleRegion(),
@@ -266,7 +266,7 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template<class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::UpdateOutputData(itk::DataObject *itkNotUsed(output))
 {
@@ -299,7 +299,7 @@ StreamingImageFileWriter<TInputImage>
   this->SetAbortGenerateData(0);
   this->SetProgress(0.0);
   this->m_Updating = true;
-    
+
 
   /**
    * Tell all Observers that the filter is starting
@@ -307,13 +307,13 @@ StreamingImageFileWriter<TInputImage>
   this->InvokeEvent( itk::StartEvent() );
 
   /**
-   * Allocate the output buffer. 
+   * Allocate the output buffer.
    */
   OutputImagePointer outputPtr = this->GetOutput(0);
   OutputImageRegionType outputRegion = outputPtr->GetLargestPossibleRegion();
 
   /** Prepare ImageIO  : create ImageFactory */
-  
+
   // Make sure that we can write the file given the name
   //
   if ( m_FileName == "" )
@@ -323,12 +323,12 @@ StreamingImageFileWriter<TInputImage>
 
   if ( m_ImageIO.IsNull() ) //try creating via factory
     {
-    itkDebugMacro(<<"Attempting factory creation of ImageIO for file: " 
+    itkDebugMacro(<<"Attempting factory creation of ImageIO for file: "
                   << m_FileName);
-    this->SetImageIO( ImageIOFactory::CreateImageIO( m_FileName.c_str(), 
+    this->SetImageIO( ImageIOFactory::CreateImageIO( m_FileName.c_str(),
                                                itk::ImageIOFactory::WriteMode ) );
 
-/*    m_ImageIO = ImageIOFactory::CreateImageIO( m_FileName.c_str(), 
+/*    m_ImageIO = ImageIOFactory::CreateImageIO( m_FileName.c_str(),
                                                itk::ImageIOFactory::WriteMode );*/
     m_FactorySpecifiedImageIO = true;
     }
@@ -336,11 +336,11 @@ StreamingImageFileWriter<TInputImage>
     {
     if( m_FactorySpecifiedImageIO && !m_ImageIO->CanWriteFile( m_FileName.c_str() ) )
       {
-      itkDebugMacro(<<"ImageIO exists but doesn't know how to write file:" 
+      itkDebugMacro(<<"ImageIO exists but doesn't know how to write file:"
                     << m_FileName );
       itkDebugMacro(<<"Attempting creation of ImageIO with a factory for file:"
                     << m_FileName);
-      m_ImageIO = ImageIOFactory::CreateImageIO( m_FileName.c_str(), 
+      m_ImageIO = ImageIOFactory::CreateImageIO( m_FileName.c_str(),
                                                  itk::ImageIOFactory::WriteMode );
       m_FactorySpecifiedImageIO = true;
       }
@@ -353,13 +353,13 @@ StreamingImageFileWriter<TInputImage>
     msg << " Could not create IO object for file "
         << m_FileName.c_str() << std::endl;
     msg << "  Tried to create one of the following:" << std::endl;
-    std::list<itk::LightObject::Pointer> allobjects = 
+    std::list<itk::LightObject::Pointer> allobjects =
       itk::ObjectFactoryBase::CreateAllInstance("itkImageIOBase");
     for(std::list<itk::LightObject::Pointer>::iterator i = allobjects.begin();
         i != allobjects.end(); ++i)
       {
       itk::ImageIOBase* io = dynamic_cast<itk::ImageIOBase*>(i->GetPointer());
-      msg << "    " << io->GetNameOfClass() << std::endl; 
+      msg << "    " << io->GetNameOfClass() << std::endl;
       }
     msg << "  You probably failed to set a file suffix, or" << std::endl;
     msg << "    set the suffix to an unsupported type." << std::endl;
@@ -374,7 +374,7 @@ StreamingImageFileWriter<TInputImage>
   /**
    * Grab the input
    */
-  InputImagePointer inputPtr = 
+  InputImagePointer inputPtr =
     const_cast< InputImageType * >( this->GetInput(0) );
 
   /**
@@ -403,7 +403,7 @@ StreamingImageFileWriter<TInputImage>
                         otbDebugMacro(<< "NumberOfStreamDivisions : " << numDivisions);
                         numDivisionsFromSplitter = m_RegionSplitter->GetNumberOfSplits(outputRegion, numDivisions);
                         otbDebugMacro(<< "NumberOfStreamSplitterDivisions : " << numDivisionsFromSplitter);
-                        
+
                         // In tiling streaming mode, we keep the number of divisions calculed by splitter
                         if ((numDivisionsFromSplitter < numDivisions)||(m_CalculationDivision==SET_TILING_STREAM_DIVISIONS))
                   {
@@ -411,7 +411,7 @@ StreamingImageFileWriter<TInputImage>
                   }
 */
     }
-  
+
   /**
    * Loop over the number of pieces, execute the upstream pipeline on each
    * piece, and copy the results into the output image.
@@ -451,7 +451,7 @@ StreamingImageFileWriter<TInputImage>
    //
    m_ImageIO->SetFileName(m_FileName.c_str());
    m_ImageIO->WriteImageInformation();
-  
+
 
   /**
    * Loop over the number of pieces, execute the upstream pipeline on each
@@ -468,14 +468,14 @@ StreamingImageFileWriter<TInputImage>
     {
                 streamRegion = m_RegionSplitter->GetSplit(piece, numDivisions,
                                               outputRegion);
-      
+
 		otbMsgDebugMacro(<<"Piece : " << piece );
 		otbMsgDebugMacro(<<"RegionSplit : Index(" << streamRegion.GetIndex()[0]
 				 << "," << streamRegion.GetIndex()[1]
 				 << ") Size(" << streamRegion.GetSize()[0]
 				 << "," << streamRegion.GetSize()[1] << ")");
-		
-                        
+
+
                 inputPtr->SetRequestedRegion(streamRegion);
                 inputPtr->PropagateRequestedRegion();
                 inputPtr->UpdateOutputData();
@@ -519,12 +519,12 @@ StreamingImageFileWriter<TInputImage>
       this->GetOutput(idx)->DataHasBeenGenerated();
       }
     }
-  
+
   /**
    * Release any inputs if marked for release
    */
   this->ReleaseInputs();
-  
+
   // Mark that we are no longer updating the data in this filter
   this->m_Updating = false;
 }
@@ -536,30 +536,30 @@ StreamingImageFileWriter<TInputImage>
  *
  */
 template<class TInputImage>
-void 
+void
 StreamingImageFileWriter<TInputImage>
 ::GenerateData(void)
 {
  // otbGenericMsgDebugMacro(<< "TEST GenerateData");
-        
+
         const InputImageType * input = this->GetInput();
-  
-  // Make sure that the image is the right type and no more than 
+
+  // Make sure that the image is the right type and no more than
   // four components.
   typedef typename InputImageType::PixelType ScalarType;
 
-  if( strcmp( input->GetNameOfClass(), "VectorImage" ) == 0 ) 
+  if( strcmp( input->GetNameOfClass(), "VectorImage" ) == 0 )
     {
     typedef typename InputImageType::InternalPixelType VectorImageScalarType;
     m_ImageIO->SetPixelTypeInfo( typeid(VectorImageScalarType) );
-    
+
     typedef typename InputImageType::AccessorFunctorType AccessorFunctorType;
     m_ImageIO->SetNumberOfComponents( AccessorFunctorType::GetVectorLength(input) );
     }
   else
     {
     // Set the pixel and component type; the number of components.
-    m_ImageIO->SetPixelTypeInfo(typeid(ScalarType));  
+    m_ImageIO->SetPixelTypeInfo(typeid(ScalarType));
     }
 
   // Setup the image IO for writing.
diff --git a/Code/IO/otbStreamingImageVirtualWriter.h b/Code/IO/otbStreamingImageVirtualWriter.h
index 5a09e99695..42c2257290 100644
--- a/Code/IO/otbStreamingImageVirtualWriter.h
+++ b/Code/IO/otbStreamingImageVirtualWriter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,10 +30,10 @@ namespace otb
  *  \brief This class acts like a StreamingImageFileWriter, but without actually
  *  writing data to the disk.
  *
- *  This allows to stream the whole image through persistent filters such as 
+ *  This allows to stream the whole image through persistent filters such as
  *  PersitentStatisticsImageFilter in order to get the global statistics of an image.
- * 
- *  This filter is not intended to be used with classic ImageToImageFilter, though it 
+ *
+ *  This filter is not intended to be used with classic ImageToImageFilter, though it
  *  will not generate any error.
  *
  *  This filter proposes the same streaming setup methods than the StreamingImageFileWriter.
@@ -57,15 +57,15 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(StreamingImageVirtualWriter,itk::ImageToImageFilter);
 
   /** Some typedefs for the input and output. */
   typedef TInputImage InputImageType;
   typedef typename InputImageType::Pointer InputImagePointer;
-  typedef typename InputImageType::RegionType InputImageRegionType; 
-  typedef typename InputImageType::PixelType InputImagePixelType; 
+  typedef typename InputImageType::RegionType InputImageRegionType;
+  typedef typename InputImageType::PixelType InputImagePixelType;
 
   /** Streaming traits helper typedef */
   typedef StreamingTraits<InputImageType> StreamingTraitsType;
@@ -82,19 +82,19 @@ public:
   /** SmartPointer to a region splitting object */
   typedef itk::ImageRegionSplitter<itkGetStaticConstMacro(InputImageDimension)>  SplitterType;
   typedef typename SplitterType::Pointer RegionSplitterPointer;
-  
+
   /**  Set buffer memory size (in bytes) use to calculate the number of stream divisions */
   void SetBufferMemorySize(unsigned long );
- 
+
   /**  Set the buffer number of lines use to calculate the number of stream divisions */
   void SetBufferNumberOfLinesDivisions(unsigned long);
- 
-  /**  The number of stream divisions is calculate by using 
-   * OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING and 
+
+  /**  The number of stream divisions is calculate by using
+   * OTB_STREAM_IMAGE_SIZE_TO_ACTIVATE_STREAMING and
    * OTB_STREAM_MAX_SIZE_BUFFER_FOR_STREAMING cmake variables.
    */
   void SetAutomaticNumberOfStreamDivisions(void);
-	
+
   /** Set the tiling automatic mode for streaming division */
   void SetTilingStreamDivisions(void);
   /** Choose number of divisions in tiling streaming division */
@@ -106,7 +106,7 @@ public:
   /** Set the number of pieces to divide the input.  The upstream pipeline
    * will be executed this many times. */
   void SetNumberOfStreamDivisions(unsigned long);
-  
+
   /** Get the number of pieces to divide the input. The upstream pipeline
    * will be executed this many times. */
   unsigned long GetNumberOfStreamDivisions(void);
@@ -117,11 +117,11 @@ public:
   /** Get the helper class for dividing the input into chunks. */
   itkGetObjectMacro(RegionSplitter, SplitterType);
 
-  
+
   /** Type use to define number of divisions */
   typedef StreamingMode CalculationDivisionEnumType;
 
- 
+
   virtual void GenerateInputRequestedRegion(void);
 
 protected:
@@ -134,17 +134,17 @@ protected:
 private:
   StreamingImageVirtualWriter(const StreamingImageVirtualWriter&); //purposely not implemented
   void operator=(const StreamingImageVirtualWriter&); //purposely not implemented
-  
+
   /** This method calculate the number of stream divisions, by using the CalculationDivision type */
   unsigned long CalculateNumberOfStreamDivisions(void);
-  
-  /** Use to define the method used to calculate number of divisions */ 
+
+  /** Use to define the method used to calculate number of divisions */
   unsigned long m_BufferMemorySize;
   unsigned long m_BufferNumberOfLinesDivisions;
   unsigned long m_NumberOfStreamDivisions;
-  
+
   RegionSplitterPointer m_RegionSplitter;
- 
+
   /** Use to determine method of calculation number of divisions */
   CalculationDivisionEnumType m_CalculationDivision;
 };
diff --git a/Code/IO/otbStreamingImageVirtualWriter.txx b/Code/IO/otbStreamingImageVirtualWriter.txx
index 44a5f7971a..79f7f3cb4b 100644
--- a/Code/IO/otbStreamingImageVirtualWriter.txx
+++ b/Code/IO/otbStreamingImageVirtualWriter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,7 +43,7 @@ StreamingImageVirtualWriter<TInputImage>
   m_NumberOfStreamDivisions = 0;
   // default to AUTOMATIC_NUMBER_OF_DIVISIONS
   m_CalculationDivision = SET_AUTOMATIC_NUMBER_OF_STREAM_DIVISIONS;
-  
+
   // create default region splitter
   m_RegionSplitter = itk::ImageRegionSplitter<InputImageDimension>::New();
 }
@@ -61,7 +61,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetBufferMemorySize(unsigned long memory_size_divisions)
 {
@@ -74,7 +74,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetBufferNumberOfLinesDivisions(unsigned long nb_lines_divisions)
 {
@@ -87,7 +87,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetNumberOfStreamDivisions(unsigned long nb_divisions)
 {
@@ -100,7 +100,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetAutomaticNumberOfStreamDivisions(void)
 {
@@ -112,7 +112,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetTilingStreamDivisions(void)
 {
@@ -122,7 +122,7 @@ StreamingImageVirtualWriter<TInputImage>
 }
 
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetTilingStreamDivisions(unsigned long nb_divisions)
 {
@@ -133,12 +133,12 @@ StreamingImageVirtualWriter<TInputImage>
 }
 
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::SetInput(const InputImageType *input)
 {
   // ProcessObject is not const_correct so this cast is required here.
-  this->itk::ProcessObject::SetNthInput(0, 
+  this->itk::ProcessObject::SetNthInput(0,
                                    const_cast<TInputImage *>(input ) );
 }
 
@@ -153,7 +153,7 @@ StreamingImageVirtualWriter<TInputImage>
     {
     return 0;
     }
-  
+
   return static_cast<TInputImage*>
     (this->itk::ProcessObject::GetInput(0));
 }
@@ -179,23 +179,23 @@ StreamingImageVirtualWriter<TInputImage>
   size.Fill(0);
   region.SetSize(size);
   region.SetIndex(index);
-  inputPtr->SetRequestedRegion(region);  
+  inputPtr->SetRequestedRegion(region);
 }
 /**
  *
  */
 template <class TInputImage>
-unsigned long 
+unsigned long
 StreamingImageVirtualWriter<TInputImage>
 ::GetNumberOfStreamDivisions(void)
 {
   return(CalculateNumberOfStreamDivisions());
 }
 template<class TInputImage>
-unsigned long 
+unsigned long
 StreamingImageVirtualWriter<TInputImage>
 ::CalculateNumberOfStreamDivisions(void)
-{	
+{
 	return StreamingTraitsType
     ::CalculateNumberOfStreamDivisions(this->GetInput(),
 				       this->GetInput()->GetLargestPossibleRegion(),
@@ -209,7 +209,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-std::string 
+std::string
 StreamingImageVirtualWriter<TInputImage>
 ::GetMethodUseToCalculateNumberOfStreamDivisions(void)
 {
@@ -219,7 +219,7 @@ StreamingImageVirtualWriter<TInputImage>
  *
  */
 template <class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -236,7 +236,7 @@ StreamingImageVirtualWriter<TInputImage>
     }
 }
 template<class TInputImage>
-void 
+void
 StreamingImageVirtualWriter<TInputImage>
 ::GenerateData(void)
 {
diff --git a/Code/IO/otbTileMapImageIO.cxx b/Code/IO/otbTileMapImageIO.cxx
index 84aefacf87..eee7d624a7 100644
--- a/Code/IO/otbTileMapImageIO.cxx
+++ b/Code/IO/otbTileMapImageIO.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -44,7 +44,7 @@
 #include <fstream>
 
 //This is to check the file existence
-#include <sys/stat.h> 
+#include <sys/stat.h>
 
 #include "base/ossimFilename.h"
 
@@ -72,15 +72,15 @@ namespace otb
     m_Origin[1] = 0.0;
 
     m_currentfile = NULL;
-  
+
     m_NbBands = 3;
     m_FlagWriteImageInformation = true;
-  
+
   //Resolution depth
     m_Depth = 8;
-  
+
     m_NbOctetPixel=1;
-  
+
     useCache=false;
     m_ServerName="";
     m_CacheDirectory="";
@@ -148,9 +148,9 @@ namespace otb
     otbMsgDevMacro( <<" Image size  : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
     otbMsgDevMacro( <<" Region read (IORegion)  : "<<this->GetIORegion());
     otbMsgDevMacro( <<" Nb Of Components  : "<<this->GetNumberOfComponents());
-        
+
     std::streamoff lNbPixels = (static_cast<std::streamoff>(totSamples))*(static_cast<std::streamoff>(totLines));
-        
+
     //otbMsgDevMacro( <<" Allocation buff tempon taille : "<<lNbPixels<<"*"<<m_NbOctetPixel<<" (NbOctetPixel) = "<<lTailleBuffer);
     otbMsgDevMacro( <<" sizeof(streamsize)    : "<<sizeof(std::streamsize));
     otbMsgDevMacro( <<" sizeof(streampos)     : "<<sizeof(std::streampos));
@@ -164,7 +164,7 @@ namespace otb
     int nTilesX = (int) ceil(totSamples/256.)+1;
     int nTilesY = (int) ceil(totLines/256.)+1;
     unsigned char * bufferTile = new unsigned char[256*256*nComponents];
-        
+
     //Read all the required tiles
     //FIXME assume RGB image
     for(int numTileY=0; numTileY<nTilesY; numTileY++)
@@ -205,7 +205,7 @@ namespace otb
           }
         }//end of tile copy
 
- 
+
       }
     }//end of full image copy
 
@@ -258,7 +258,7 @@ namespace otb
       }
       lCanRead = imageIO->CanReadFile(filename.str().c_str());
     }
-  
+
     if ( lCanRead == true)
     {
       imageIO->SetFileName(filename.str().c_str());
@@ -272,21 +272,21 @@ namespace otb
         FillCacheFaults(bufferCacheFault);
       }
       memcpy(buffer, bufferCacheFault,256*256*3 );
-    
+
     }
-  
-  
+
+
   }
 
   void TileMapImageIO::BuildFileName(std::ostringstream& quad, std::ostringstream& filename) {
-  
+
     int quadsize=quad.str().size();
     std::ostringstream directory;
     directory << m_CacheDirectory;
-  
+
   //build directory name
     int i=0;
-    while ((i<8) && (i<quadsize)) 
+    while ((i<8) && (i<quadsize))
     {
       directory << "/";
       directory << (quad.str().c_str())[i];
@@ -294,23 +294,23 @@ namespace otb
     }
     ossimFilename directoryOssim(directory.str().c_str());
     directoryOssim.createDirectory();
-  
-  
+
+
     filename << directory.str();
     filename << "/";
     filename << "otb-";
     filename << quad.str();
     filename << "." << m_FileSuffix;
-    
+
   }
 
   /** Get the file from net in a qtrssrtstr.jpg fashion */
   void TileMapImageIO::GetFromNetGM(std::ostringstream& filename, double x, double y)
   {
-    
+
     std::ostringstream quad;
     XYToQuadTree(x, y, quad);
-    
+
     std::ostringstream urlStream;
     urlStream << m_ServerName;
     urlStream << quad.str();
@@ -323,10 +323,10 @@ namespace otb
     {
       itkExceptionMacro(<<"TileMap read : bad file name.");
     }
-  
+
     std::ostringstream browserStream;
     browserStream   << "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11";
-  
+
     CURL *curl;
     CURLcode res;
     curl = curl_easy_init();
@@ -336,7 +336,7 @@ namespace otb
 
     char url[200];
     strcpy(url,urlStream.str().data());
-  
+
     char browser[200];
     strcpy(browser,browserStream.str().data());
 
@@ -354,13 +354,13 @@ namespace otb
       /* always cleanup */
       curl_easy_cleanup(curl);
     }
-  
+
   }
 
   /** Get the file from net in a 132/153.png fashion */
   void TileMapImageIO::GetFromNetOSM(std::ostringstream& filename, double x, double y)
   {
-    otbMsgDevMacro( << "(x,y): (" << x << "," << y << ")"); 
+    otbMsgDevMacro( << "(x,y): (" << x << "," << y << ")");
     std::ostringstream urlStream;
     urlStream << m_ServerName;
 //   urlStream << quad.str();
@@ -370,8 +370,8 @@ namespace otb
     urlStream << "/";
     urlStream << (long int) (((double) y*(1 << m_Depth)));
     urlStream << "." << m_FileSuffix;
-  
-  
+
+
 
 //     std::ostringstream filename;
 //     BuildFileName(quad, filename);
@@ -381,10 +381,10 @@ namespace otb
     {
       itkExceptionMacro(<<"TileMap read : bad file name.");
     }
-  
+
     std::ostringstream browserStream;
     browserStream   << "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11";
-  
+
     CURL *curl;
     CURLcode res;
     curl = curl_easy_init();
@@ -394,7 +394,7 @@ namespace otb
 
     char url[200];
     strcpy(url,urlStream.str().data());
-  
+
     char browser[200];
     strcpy(browser,browserStream.str().data());
 
@@ -412,7 +412,7 @@ namespace otb
       /* always cleanup */
       curl_easy_cleanup(curl);
     }
-  
+
   }
 
   void TileMapImageIO::ReadImageInformation()
@@ -422,7 +422,7 @@ namespace otb
     {
       itkExceptionMacro(<<"TileMap read : empty image file name file.");
     }
-  
+
     m_Dimensions[0] = (1 << m_Depth)*256;
     m_Dimensions[1] = (1 << m_Depth)*256;
     otbMsgDevMacro(<<"Get Dimensions : x="<<m_Dimensions[0]<<" & y="<<m_Dimensions[1]);
@@ -452,17 +452,17 @@ namespace otb
   }
 
 
-  
+
   bool TileMapImageIO::CanWriteFile( const char* name )
   {
-  
+
   // First if filename is provided
     if(  name == NULL )
     {
       itkDebugMacro(<<"No filename specified.");
       return false;
     }
-  
+
   // Check for file extension
     std::string filename = name;
     std::string::size_type gmPos = filename.rfind(".otb");
@@ -472,7 +472,7 @@ namespace otb
       return true;
     }
     return false;
-  
+
   }
 
   void TileMapImageIO::WriteImageInformation(void)
@@ -481,20 +481,20 @@ namespace otb
 
   void TileMapImageIO::Write(const void* buffer)
   {
-  
+
     const unsigned char * p = static_cast<const unsigned char *>(buffer);
     if(p==NULL)
     {
       itkExceptionMacro(<<"Memory allocation error");
       return;
     }
-  
+
     if( m_FlagWriteImageInformation == true )
     {
       this->WriteImageInformation();
       m_FlagWriteImageInformation = false;
     }
-  
+
     int totLines   = this->GetIORegion().GetSize()[1];
     int totSamples = this->GetIORegion().GetSize()[0];
     int firstLine   = this->GetIORegion().GetIndex()[1];
@@ -502,19 +502,19 @@ namespace otb
     int originLine   = (int)this->GetOrigin(1);
     int originSample = (int)this->GetOrigin(0);
     int nComponents = this->GetNumberOfComponents();
-    
+
     std::cout << "TileMapImageIO::Write: Size " << totLines << ", "<< totSamples << std::endl;
     std::cout << "TileMapImageIO::Write: Index" << firstLine << ", "<< firstSample << std::endl;
     std::cout << "TileMapImageIO::Write: Origin" << originLine << ", "<< originSample << std::endl;
-    
+
     otbMsgDevMacro( <<" TileMapImageIO::Read()  ");
     otbMsgDevMacro( <<" Image size  : "<<m_Dimensions[0]<<","<<m_Dimensions[1]);
     otbMsgDevMacro( <<" Region read (IORegion)  : "<<this->GetIORegion());
     otbMsgDevMacro( <<" Nb Of Components  : "<<this->GetNumberOfComponents());
-        
+
     std::streamoff lNbPixels = (static_cast<std::streamoff>(totSamples))*(static_cast<std::streamoff>(totLines));
     std::streamoff lTailleBuffer = static_cast<std::streamoff>(m_NbOctetPixel)*lNbPixels;
-        
+
     otbMsgDevMacro( <<" Allocation buff tempon taille : "<<lNbPixels<<"*"<<m_NbOctetPixel<<" (NbOctetPixel) = "<<lTailleBuffer);
     otbMsgDevMacro( <<" sizeof(streamsize)    : "<<sizeof(std::streamsize));
     otbMsgDevMacro( <<" sizeof(streampos)     : "<<sizeof(std::streampos));
@@ -524,17 +524,17 @@ namespace otb
         //otbMsgDevMacro( <<" sizeof(pos_type)      : "<<sizeof(pos_type));
         //otbMsgDevMacro( <<" sizeof(off_type)      : "<<sizeof(off_type));
     otbMsgDevMacro( <<" sizeof(unsigned long) : "<<sizeof(unsigned long));
-  
+
     double x = (originSample+firstSample)/((1 << m_Depth)*256.);
     double y = (originLine+firstLine)/((1 << m_Depth)*256.);
     std::cout << x << std::endl;
     std::cout << y << std::endl;
-    
+
     int nTilesX = (int) ceil(totSamples/256.)+1;
     int nTilesY = (int) ceil(totLines/256.)+1;
     unsigned char * bufferTile = new unsigned char[256*256*nComponents];
-    
-        
+
+
   //Read all the required tiles
     for(int numTileY=0; numTileY<nTilesY; numTileY++)
     {
@@ -546,7 +546,7 @@ namespace otb
           bufferTile[iInit]=0;
         }
 
-        
+
         for(int tileJ=0; tileJ<256; tileJ++)
         {
           long int yImageOffset=(long int) (256*floor((originLine+firstLine)/256.)+256*numTileY-(originLine+firstLine)+tileJ);
@@ -574,14 +574,14 @@ namespace otb
 
           }
         }//end of tile copy
-        
+
 
         double xTile = (originSample+firstSample+256*numTileX)/((1 << m_Depth)*256.);
         double yTile = (originLine+firstLine+256*numTileY)/((1 << m_Depth)*256.);
       //Write the tile
         InternalWrite(xTile, yTile, bufferTile);
-      
- 
+
+
       }
     }//end of full image copy
 
@@ -589,24 +589,24 @@ namespace otb
 
 
     otbMsgDevMacro( << "TileMapImageIO::Write() completed");
-  
-  
-  
+
+
+
   }
 
 
   void TileMapImageIO::InternalWrite(double x, double y, const void* buffer)
   {
     std::ostringstream quad;
-    
+
     std::cout << x << ", " << y  << std::endl;
     std::cout.flush();
-    
+
     XYToQuadTree2(x, y, quad);
-    
+
     std::ostringstream filename;
     BuildFileName(quad, filename);
-  
+
     itk::ImageIOBase::Pointer imageIO;
   //Open the file to write the buffer
     if (m_AddressMode[0] == '0')
@@ -617,11 +617,11 @@ namespace otb
     {
       imageIO = itk::PNGImageIO::New();
     }
-  
+
     bool lCanWrite(false);
     lCanWrite = imageIO->CanWriteFile(filename.str().c_str());
     std::cout << filename.str() << std::endl;
-  
+
     if ( lCanWrite == true)
     {
       imageIO->SetNumberOfDimensions(2);
@@ -632,7 +632,7 @@ namespace otb
       imageIO->SetOrigin(0,0);
       imageIO->SetOrigin(1,0);
       imageIO->SetNumberOfComponents(3);
-      
+
       vnl_vector< double > axisDirection(2);
 
         axisDirection[0] = 1;
@@ -643,10 +643,10 @@ namespace otb
       imageIO->SetDirection( 1, axisDirection );
 
     imageIO->SetUseCompression(1);
-      
+
       imageIO->SetFileName(filename.str().c_str());
       imageIO->WriteImageInformation();
-      
+
       itk::ImageIORegion ioRegion(2);
       for(unsigned int i=0; i<2; i++)
       {
@@ -654,14 +654,14 @@ namespace otb
         ioRegion.SetIndex(i,0);
       }
       imageIO->SetIORegion(ioRegion);
-      
+
       imageIO->Write(buffer);
     }
     else
     {
       itkExceptionMacro(<<"TileMap write : bad file name.");
     }
-  
+
   }
 
   /** Generate the quadtree address in qrts style */
@@ -694,7 +694,7 @@ namespace otb
       x *= 2;
       y *= 2;
     }
-  
+
     return 0;
   }
 
@@ -728,10 +728,10 @@ namespace otb
       x *= 2;
       y *= 2;
     }
-  
+
     return 0;
   }
-  
+
   /** RGB buffer filling when the tile is not found */
   void TileMapImageIO::FillCacheFaults(void* buffer)
   {
@@ -1374,7 +1374,7 @@ namespace otb
     }
 
   }
-     
+
 
 
 } // end namespace otb
diff --git a/Code/IO/otbTileMapImageIO.h b/Code/IO/otbTileMapImageIO.h
index f4140467ea..2d43e7aaf0 100644
--- a/Code/IO/otbTileMapImageIO.h
+++ b/Code/IO/otbTileMapImageIO.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -61,12 +61,12 @@ namespace otb
     public:
 
       typedef unsigned char InputPixelType;
-  
+
       /** Standard class typedefs. */
       typedef TileMapImageIO            Self;
       typedef itk::ImageIOBase  Superclass;
       typedef itk::SmartPointer<Self>  Pointer;
-  
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
 
@@ -77,32 +77,32 @@ namespace otb
    *  0-9; 0 = none, 9 = maximum. */
       itkSetMacro(CompressionLevel, int);
       itkGetMacro(CompressionLevel, int);
-  
+
       virtual void SetCacheDirectory (const char* _arg)
       {
-        if ( _arg && (_arg == this->m_CacheDirectory) ) { return;} 
+        if ( _arg && (_arg == this->m_CacheDirectory) ) { return;}
         if (_arg)
-        { 
+        {
           this->m_CacheDirectory = _arg;
           this->useCache=true;
         }
-        else 
-        { 
-          this->m_CacheDirectory = ""; 
+        else
+        {
+          this->m_CacheDirectory = "";
           this->useCache=false;
-        } 
-        this->Modified(); 
-      } 
-  
-      virtual void SetCacheDirectory (const std::string & _arg) 
-      { 
-        this->SetCacheDirectory( _arg.c_str() ); 
+        }
+        this->Modified();
+      }
+
+      virtual void SetCacheDirectory (const std::string & _arg)
+      {
+        this->SetCacheDirectory( _arg.c_str() );
         this->useCache=true;
-      } 
-          
+      }
+
       itkSetMacro(Depth, int);
       itkGetMacro(Depth, int);
-  
+
       itkGetStringMacro(CacheDirectory);
 
       /*-------- This part of the interface deals with reading data. ------ */
@@ -110,16 +110,16 @@ namespace otb
   /** Determine the file type. Returns true if this ImageIO can read the
    * file specified. */
       virtual bool CanReadFile(const char*);
-  
+
       /** Determine the file type. Returns true if the ImageIO can stream read the specified file */
       virtual bool CanStreamRead(){  return true; };
 
       /** Set the spacing and dimention information for the set filename. */
       virtual void ReadImageInformation();
- 
+
       /** Reads the data from disk into the memory buffer provided. */
       virtual void Read(void* buffer);
-    
+
       /** Reads 3D data from multiple files assuming one slice per file. */
       virtual void ReadVolume(void* buffer);
 
@@ -143,13 +143,13 @@ namespace otb
 
   // JULIEN: NOT USED, NOT IMPLEMENTED
   //void SampleImage(void* buffer,int XBegin, int YBegin, int SizeXRead, int SizeYRead, int XSample, int YSample);
-  
+
     protected:
       /** Construtor.*/
       TileMapImageIO();
       /** Destructor.*/
       ~TileMapImageIO();
-  
+
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
       /** Read all information on the image*/
       void InternalReadImageInformation();
@@ -163,8 +163,8 @@ namespace otb
       int m_NbBands;
       /** Buffer*/
   //float **pafimas;
-  
-  /** Determines the level of compression for written files. 
+
+  /** Determines the level of compression for written files.
    *  Range 0-9; 0 = none, 9 = maximum , default = 4 */
       int m_CompressionLevel;
       const char* m_currentfile;
@@ -184,7 +184,7 @@ namespace otb
 
       /** Nombre d'octets par pixel */
       int           m_NbOctetPixel;
-  
+
       /** Resolution depth*/
       int m_Depth;
       bool useCache;
@@ -192,7 +192,7 @@ namespace otb
       std::string m_ServerName;
       std::string m_FileSuffix;
       std::string m_AddressMode;
-  
+
       bool m_FlagWriteImageInformation;
 
   };
diff --git a/Code/IO/otbTileMapImageIOFactory.cxx b/Code/IO/otbTileMapImageIOFactory.cxx
index 545f59d255..1447c4d929 100644
--- a/Code/IO/otbTileMapImageIOFactory.cxx
+++ b/Code/IO/otbTileMapImageIOFactory.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbTileMapImageIO.h"
 #include "itkVersion.h"
 
-  
+
 namespace otb
 {
 
@@ -33,18 +33,18 @@ TileMapImageIOFactory::TileMapImageIOFactory()
                          1,
                          itk::CreateObjectFunction<TileMapImageIO>::New());
 }
-  
+
 TileMapImageIOFactory::~TileMapImageIOFactory()
 {
 }
 
-const char* 
+const char*
 TileMapImageIOFactory::GetITKSourceVersion(void) const
 {
   return ITK_SOURCE_VERSION;
 }
 
-const char* 
+const char*
 TileMapImageIOFactory::GetDescription() const
 {
   return "TileMap ImageIO Factory, enabling TileMap image format loading in OTB";
diff --git a/Code/IO/otbTileMapImageIOFactory.h b/Code/IO/otbTileMapImageIOFactory.h
index c26632605f..6f28e2aa20 100644
--- a/Code/IO/otbTileMapImageIOFactory.h
+++ b/Code/IO/otbTileMapImageIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,17 +29,17 @@ namespace otb
  */
 class ITK_EXPORT TileMapImageIOFactory : public itk::ObjectFactoryBase
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef TileMapImageIOFactory   Self;
   typedef itk::ObjectFactoryBase  Superclass;
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Class methods used to interface with the registered factories. */
   virtual const char* GetITKSourceVersion(void) const;
   virtual const char* GetDescription(void) const;
-  
+
   /** Method for class instantiation. */
   itkFactorylessNewMacro(Self);
 
@@ -62,8 +62,8 @@ private:
   void operator=(const Self&); //purposely not implemented
 
 };
-  
-  
+
+
 } // end namespace otb
 
 #endif
diff --git a/Code/IO/otbVectorDataBase.cxx b/Code/IO/otbVectorDataBase.cxx
index 594a1f810d..835d84de75 100644
--- a/Code/IO/otbVectorDataBase.cxx
+++ b/Code/IO/otbVectorDataBase.cxx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ VectorDataBase::~VectorDataBase()
 }
 
 
-void 
+void
 VectorDataBase::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os, indent);
diff --git a/Code/IO/otbVectorDataBase.h b/Code/IO/otbVectorDataBase.h
index 11a036961b..aa062a4542 100644
--- a/Code/IO/otbVectorDataBase.h
+++ b/Code/IO/otbVectorDataBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,7 +36,7 @@ namespace otb
  * classes. VectorDataBase does not store any of the vector data values.
  *
  */
-	
+
 class ITK_EXPORT VectorDataBase : public itk::DataObject
 {
 public:
@@ -52,17 +52,17 @@ public:
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(VectorDataBase, itk::DataObject);
-	
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 protected:
 	VectorDataBase();
 	~VectorDataBase();
-	
+
 private:
   VectorDataBase(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-	
+
 } ;
 
 } // end namespace otb
diff --git a/Code/IO/otbVectorDataFileReader.h b/Code/IO/otbVectorDataFileReader.h
index f039355733..b70494d1ae 100644
--- a/Code/IO/otbVectorDataFileReader.h
+++ b/Code/IO/otbVectorDataFileReader.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,14 +28,14 @@ namespace otb
  *
  * \brief Base exception class for IO conflicts.
  */
-class VectorDataFileReaderException : public itk::ExceptionObject 
+class VectorDataFileReaderException : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro( VectorDataFileReaderException, itk::ExceptionObject );
 
   /** Constructor. */
-  VectorDataFileReaderException(const char *file, unsigned int line, 
+  VectorDataFileReaderException(const char *file, unsigned int line,
                            const char* message = "Error in IO",
                            const char* loc = "Unknown") :
     itk::ExceptionObject(file, line, message, loc)
@@ -43,9 +43,9 @@ public:
   }
 
   /** Constructor. */
-  VectorDataFileReaderException(const std::string &file, unsigned int line, 
+  VectorDataFileReaderException(const std::string &file, unsigned int line,
                            const char* message = "Error in IO",
-                           const char* loc = "Unknown") : 
+                           const char* loc = "Unknown") :
     itk::ExceptionObject(file, line, message, loc)
   {
   }
@@ -62,7 +62,7 @@ public:
  *
  * TOutputVectorData is the type expected by the external users of the
  * filter. If data stored in the file is stored in a different format
- * then specified by TOutputVectorData, than this filter converts data 
+ * then specified by TOutputVectorData, than this filter converts data
  * between the file type and the external expected type.
  *
  * A Pluggable factory pattern is used this allows different kinds of readers
@@ -77,7 +77,7 @@ public:
  *
  */
 
- 
+
 template <class TOutputVectorData>
 class ITK_EXPORT VectorDataFileReader : public VectorDataSource<TOutputVectorData>
 {
@@ -94,17 +94,17 @@ public :
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(VectorDataFileReader, VectorDataSource);
-	
+
   typedef TOutputVectorData       OutputVectorType;
   typedef VectorDataIOBase<OutputVectorType> VectorDataIOBaseType;
-	
+
   /** Specify the file to read */
   itkSetStringMacro(FileName);
   itkGetStringMacro(FileName);
-	
+
   /** Set/Get the VectorDataIO helper class. Often this is created via the object
    * factory mechanism that determines whether a particular VectorDataIO can
-   * read a certain file. This method provides a way to get the VectorDataIO 
+   * read a certain file. This method provides a way to get the VectorDataIO
    * instance that is created. Or you can directly specify the VectorDataIO
    * to use to read a particular file in case the factory mechanism will
    * not work properly (e.g., unknown or unusual extension). */
@@ -122,7 +122,7 @@ public :
 protected:
   VectorDataFileReader();
   ~VectorDataFileReader();
-  std::string m_ExceptionMessage;  
+  std::string m_ExceptionMessage;
 
   typename VectorDataIOBaseType::Pointer m_VectorDataIO;
   bool  m_UserSpecifiedVectorDataIO; // keep track whether the
@@ -130,7 +130,7 @@ protected:
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
   std::string m_FileName; // The file to be read
-	
+
 private:
   VectorDataFileReader(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
@@ -151,5 +151,5 @@ private:
 
 #endif // __otbVectorDataFileReader_h
 
-	 
-	 
+
+
diff --git a/Code/IO/otbVectorDataFileReader.txx b/Code/IO/otbVectorDataFileReader.txx
index a424080eaa..cb690a4052 100644
--- a/Code/IO/otbVectorDataFileReader.txx
+++ b/Code/IO/otbVectorDataFileReader.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -58,7 +58,7 @@ SpatialObjectDXFReader<TSpatialObject>
 }*/
 
  /** Test whether the given filename exist and it is readable,
-      this is intended to be called before attempting to use 
+      this is intended to be called before attempting to use
       VectorDataIO classes for actually reading the file. If the file
       doesn't exist or it is not readable, and exception with an
       approriate message will be thrown. */
@@ -107,12 +107,12 @@ void
 VectorDataFileReader<TOutputVectorData>
 ::SetVectorDataIO( VectorDataIOBaseType * vectorDataIO)
 {
-  itkDebugMacro("setting VectorDataIO to " << vectorDataIO ); 
-  if (this->m_VectorDataIO != vectorDataIO ) 
+  itkDebugMacro("setting VectorDataIO to " << vectorDataIO );
+  if (this->m_VectorDataIO != vectorDataIO )
     {
     this->m_VectorDataIO = vectorDataIO;
-    this->Modified(); 
-    } 
+    this->Modified();
+    }
   m_UserSpecifiedVectorDataIO = true;
 }
 
@@ -125,7 +125,7 @@ VectorDataFileReader<TOutputVectorData>
   typename TOutputVectorData::Pointer output = this->GetOutput();
 
   itkDebugMacro(<<"Reading file for GenerateOutputInformation()" << m_FileName);
-  
+
   // Check to see if we can read the file given the name or prefix
   //
   if ( m_FileName == "" )
@@ -150,7 +150,7 @@ VectorDataFileReader<TOutputVectorData>
     {
     m_VectorDataIO = VectorDataIOFactory<TOutputVectorData>::CreateVectorDataIO( m_FileName.c_str(), VectorDataIOFactory<TOutputVectorData>::ReadMode );
     }
-  
+
   if ( m_VectorDataIO.IsNull() )
     {
     itk::OStringStream msg;
@@ -163,13 +163,13 @@ VectorDataFileReader<TOutputVectorData>
     else
       {
       msg << "  Tried to create one of the following:" << std::endl;
-      std::list<itk::LightObject::Pointer> allobjects = 
+      std::list<itk::LightObject::Pointer> allobjects =
         itk::ObjectFactoryBase::CreateAllInstance("otbVectorDataIOBase");
       for(std::list<itk::LightObject::Pointer>::iterator i = allobjects.begin();
           i != allobjects.end(); ++i)
         {
         VectorDataIOBase<TOutputVectorData>* io = dynamic_cast<VectorDataIOBase<TOutputVectorData>*>(i->GetPointer());
-        msg << "    " << io->GetNameOfClass() << std::endl; 
+        msg << "    " << io->GetNameOfClass() << std::endl;
         }
       msg << "  You probably failed to set a file suffix, or" << std::endl;
       msg << "    set the suffix to an unsupported type." << std::endl;
@@ -178,7 +178,7 @@ VectorDataFileReader<TOutputVectorData>
     throw e;
     return;
     }
-  
+
   m_VectorDataIO->SetFileName(m_FileName.c_str());
 //   m_VectorDataIO->ReadVectorDataInformation();
 
@@ -198,7 +198,7 @@ VectorDataFileReader<TOutputVectorData>
 
   typename TOutputVectorData::Pointer output = this->GetOutput();
 
-  itkDebugMacro ( << "VectorDataFileReader::GenerateData() \n"); 
+  itkDebugMacro ( << "VectorDataFileReader::GenerateData() \n");
 
   // Test if the file exist and if it can be open.
   // and exception will be thrown otherwise.
diff --git a/Code/IO/otbVectorDataFileWriter.h b/Code/IO/otbVectorDataFileWriter.h
index e4fbca918c..c64d1bd132 100644
--- a/Code/IO/otbVectorDataFileWriter.h
+++ b/Code/IO/otbVectorDataFileWriter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,22 +28,22 @@ namespace otb
  *
  * \class ImageFileWriterException
  */
-class VectorDataFileWriterException : public itk::ExceptionObject 
+class VectorDataFileWriterException : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro( VectorDataFileWriterException, ExceptionObject );
 
   /** Constructor. */
-  VectorDataFileWriterException(const char *file, unsigned int line, 
+  VectorDataFileWriterException(const char *file, unsigned int line,
                            const char* message = "Error in IO",
-                           const char* loc = "Unknown" ) : 
+                           const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {
   }
 
   /** Constructor. */
-  VectorDataFileWriterException(const std::string &file, unsigned int line, 
+  VectorDataFileWriterException(const std::string &file, unsigned int line,
                            const char* message = "Error in IO",
                            const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
@@ -53,11 +53,11 @@ public:
 
 
   /** \class VectorDataFileWriter
-   *  \brief This class writes vector data file format (shapefile and KML) 
+   *  \brief This class writes vector data file format (shapefile and KML)
    *
    *  \ingroup IO
    */
-	 
+
 template <class TInputVectorData>
 class ITK_EXPORT VectorDataFileWriter : public itk::ProcessObject
 {
@@ -74,16 +74,16 @@ public :
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(VectorDataFileWriter, itk::ProcessObject);
-	
+
   typedef TInputVectorData InputVectorDataType;
   typedef VectorDataIOBase<InputVectorDataType> VectorDataIOBaseType;
 
-	
+
   /** Set/Get the image input of this writer.  */
   void SetInput(const InputVectorDataType *input);
   const InputVectorDataType * GetInput(void);
   const InputVectorDataType * GetInput(unsigned int idx);
-	
+
   /** Does the real work. */
   virtual void Write();
 
@@ -91,7 +91,7 @@ public :
 
   virtual void Update()  {  this->Write(); }
 
-	
+
   /** Specify the name of the output shapefile to write. */
   itkSetStringMacro(FileName);
   itkGetStringMacro(FileName);
@@ -121,5 +121,5 @@ private:
 
 #endif // __otbVectorDataFileWriter_h
 
-	 
-	 
+
+
diff --git a/Code/IO/otbVectorDataFileWriter.txx b/Code/IO/otbVectorDataFileWriter.txx
index 8b66e84f22..78d0ea81a6 100644
--- a/Code/IO/otbVectorDataFileWriter.txx
+++ b/Code/IO/otbVectorDataFileWriter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -33,8 +33,8 @@ namespace otb
 template <class TInputVectorData>
 VectorDataFileWriter<TInputVectorData>
 ::VectorDataFileWriter() :      m_FileName(""),
-                                m_VectorDataIO(0), 
-                                m_UserSpecifiedVectorDataIO(false) 
+                                m_VectorDataIO(0),
+                                m_UserSpecifiedVectorDataIO(false)
 {
 }
 /**
@@ -49,12 +49,12 @@ VectorDataFileWriter<TInputVectorData>
 
 //---------------------------------------------------------
 template <class TInputVectorData>
-void 
+void
 VectorDataFileWriter<TInputVectorData>
 ::SetInput(const InputVectorDataType *input)
 {
 	// ProcessObject is not const_correct so this cast is required here.
-  this->ProcessObject::SetNthInput(0, 
+  this->ProcessObject::SetNthInput(0,
                                    const_cast<TInputVectorData *>(input ) );
 }
 
@@ -69,11 +69,11 @@ VectorDataFileWriter<TInputVectorData>
     {
     return 0;
     }
-  
+
   return static_cast<TInputVectorData*>
     (this->ProcessObject::GetInput(0));
 }
-  
+
 //---------------------------------------------------------
 template <class TInputVectorData>
 const typename VectorDataFileWriter<TInputVectorData>::InputVectorDataType *
@@ -108,9 +108,9 @@ VectorDataFileWriter<TInputVectorData>
 
   if ( m_VectorDataIO.IsNull() ) //try creating via factory
     {
-    itkDebugMacro(<<"Attempting factory creation of VectorDataIO for file: " 
+    itkDebugMacro(<<"Attempting factory creation of VectorDataIO for file: "
                   << m_FileName);
-    m_VectorDataIO = VectorDataIOFactory<TInputVectorData>::CreateVectorDataIO( m_FileName.c_str(), 
+    m_VectorDataIO = VectorDataIOFactory<TInputVectorData>::CreateVectorDataIO( m_FileName.c_str(),
                                                VectorDataIOFactory<TInputVectorData>::WriteMode );
     m_FactorySpecifiedVectorDataIO = true;
     }
@@ -118,11 +118,11 @@ VectorDataFileWriter<TInputVectorData>
     {
     if( m_FactorySpecifiedVectorDataIO && !m_VectorDataIO->CanWriteFile( m_FileName.c_str() ) )
       {
-      itkDebugMacro(<<"VectorDataIO exists but doesn't know how to write file:" 
+      itkDebugMacro(<<"VectorDataIO exists but doesn't know how to write file:"
                     << m_FileName );
       itkDebugMacro(<<"Attempting creation of VectorDataIO with a factory for file:"
                     << m_FileName);
-      m_VectorDataIO = VectorDataIOFactory<TInputVectorData>::CreateVectorDataIO( m_FileName.c_str(), 
+      m_VectorDataIO = VectorDataIOFactory<TInputVectorData>::CreateVectorDataIO( m_FileName.c_str(),
                                                  VectorDataIOFactory<TInputVectorData>::WriteMode );
       m_FactorySpecifiedVectorDataIO = true;
       }
@@ -135,13 +135,13 @@ VectorDataFileWriter<TInputVectorData>
     msg << " Could not create IO object for file "
         << m_FileName.c_str() << std::endl;
     msg << "  Tried to create one of the following:" << std::endl;
-    std::list<itk::LightObject::Pointer> allobjects = 
+    std::list<itk::LightObject::Pointer> allobjects =
       itk::ObjectFactoryBase::CreateAllInstance("otbVectorDataIOBase");
     for(std::list<LightObject::Pointer>::iterator i = allobjects.begin();
         i != allobjects.end(); ++i)
       {
       VectorDataIOBase<TInputVectorData>* io = dynamic_cast<VectorDataIOBase<TInputVectorData>*>(i->GetPointer());
-      msg << "    " << io->GetNameOfClass() << std::endl; 
+      msg << "    " << io->GetNameOfClass() << std::endl;
       }
     msg << "  You probably failed to set a file suffix, or" << std::endl;
     msg << "    set the suffix to an unsupported type." << std::endl;
@@ -166,7 +166,7 @@ VectorDataFileWriter<TInputVectorData>
 
   // Actually do something
   this->GenerateData();
-  
+
   // Notify end event observers
   this->InvokeEvent( itk::EndEvent() );
 
@@ -187,7 +187,7 @@ VectorDataFileWriter<TInputVectorData>
   const InputVectorDataType * input = this->GetInput();
 
   itkDebugMacro(<<"Writing file: " << m_FileName);
-  
+
   // Setup the vector data IO for writing.
   //
   m_VectorDataIO->SetFileName(m_FileName.c_str());
diff --git a/Code/IO/otbVectorDataIOBase.h b/Code/IO/otbVectorDataIOBase.h
index c25e5a62e1..da66ca2f5e 100644
--- a/Code/IO/otbVectorDataIOBase.h
+++ b/Code/IO/otbVectorDataIOBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,7 +35,7 @@ namespace otb
  * of a particular format (such as PNG or raw binary). The
  * VectorDataIOBase encapsulates both the reading and writing of data. The
  * VectorDataIOBase is used by the VectorDataFileReader class (to read data)
- * and the VectorDataFileWriter (to write data) into a single file. 
+ * and the VectorDataFileWriter (to write data) into a single file.
  * Normally the user does not directly
  * manipulate this class other than to instantiate it, set the FileName,
  * and assign it to a VectorDataFileReader/VectorDataFileWriter.
@@ -172,7 +172,7 @@ private:
 
 };
 
-} // end namespace otb 
+} // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbVectorDataIOBase.txx"
diff --git a/Code/IO/otbVectorDataIOBase.txx b/Code/IO/otbVectorDataIOBase.txx
index 3723f91d50..f5e68c092f 100644
--- a/Code/IO/otbVectorDataIOBase.txx
+++ b/Code/IO/otbVectorDataIOBase.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -69,7 +69,7 @@ VectorDataIOBase<TData>
 
 
 template <class TData>
-void 
+void
 VectorDataIOBase<TData>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/IO/otbVectorDataIOFactory.h b/Code/IO/otbVectorDataIOFactory.h
index ef3c19d111..20e8950ba7 100644
--- a/Code/IO/otbVectorDataIOFactory.h
+++ b/Code/IO/otbVectorDataIOFactory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,21 +28,21 @@ namespace otb
  */
 template <class TData> class ITK_EXPORT VectorDataIOFactory : public itk::Object
 {
-public:  
+public:
   /** Standard class typedefs. */
   typedef VectorDataIOFactory           Self;
   typedef itk::Object                   Superclass;
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   typedef TData DataType;
   typedef typename DataType::Pointer DataPointerType;
   typedef otb::VectorDataIOBase<DataType> VectorDataIOBaseType;
   typedef typename VectorDataIOBaseType::Pointer VectorDataIOBasePointerType;
-  
+
 
   /** Class Methods used to interface with the registered factories */
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(VectorDataIOFactory, Object);
 
@@ -51,7 +51,7 @@ public:
 
   /** Mode in which the files is intended to be used */
   typedef enum { ReadMode, WriteMode } FileModeType;
-  
+
   /** Create the appropriate VectorDataIO depending on the particulars of the file. */
   static VectorDataIOBasePointerType CreateVectorDataIO(const char* path, FileModeType mode);
 
@@ -65,10 +65,10 @@ protected:
 private:
   VectorDataIOFactory(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
-  
-  
+
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/IO/otbVectorDataIOFactory.txx b/Code/IO/otbVectorDataIOFactory.txx
index 41f09eeba6..c545426ebb 100644
--- a/Code/IO/otbVectorDataIOFactory.txx
+++ b/Code/IO/otbVectorDataIOFactory.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
diff --git a/Code/IO/otbVectorDataSource.h b/Code/IO/otbVectorDataSource.h
index cb237baff4..a9cac82544 100644
--- a/Code/IO/otbVectorDataSource.h
+++ b/Code/IO/otbVectorDataSource.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,11 +32,11 @@ namespace otb
 /** \class VectorDataSource
  * \brief Famille de filtres ayant un object de type shapeFile en sortie
  *
- * 
+ *
  * \ingroup IO
  *
  */
- 
+
 template <class TOutputVectorData>
 class ITK_EXPORT VectorDataSource : public itk::ProcessObject
 {
@@ -53,9 +53,9 @@ public :
 
   /** Run-time type information (and related methods). */
   itkTypeMacro(VectorDataSource, itk::ProcessObject);
-	
+
   typedef TOutputVectorData     OutputVectorDataType;
-	
+
 
   /** Overriding GetOutput() method */
   virtual OutputVectorDataType* GetOutput(void);
@@ -67,7 +67,7 @@ protected:
 
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-	
+
 private:
   VectorDataSource(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
diff --git a/Code/IO/otbVectorDataSource.txx b/Code/IO/otbVectorDataSource.txx
index 1517f92199..e0dd5b34aa 100644
--- a/Code/IO/otbVectorDataSource.txx
+++ b/Code/IO/otbVectorDataSource.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/IO/otbVectorImage.h b/Code/IO/otbVectorImage.h
index 3a1405e8d4..7e718a3e9f 100644
--- a/Code/IO/otbVectorImage.h
+++ b/Code/IO/otbVectorImage.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,11 +38,11 @@ namespace otb
  * \brief Creation of an "otb" vector image which contains metadata.
  *
  */
-template <class TPixel, unsigned int VImageDimension=2> 
+template <class TPixel, unsigned int VImageDimension=2>
 class ITK_EXPORT VectorImage : public itk::VectorImage<TPixel, VImageDimension>,
 			 public ImageBase
 {
-public: 
+public:
 
   /** Standard class typedefs. */
   typedef VectorImage   Self;
@@ -50,9 +50,9 @@ public:
   typedef itk::SmartPointer<Self>  Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
   typedef itk::WeakPointer<const Self> ConstWeakPointer;
-  
-  typedef ImageBase::VectorType	VectorType;	
-  typedef ImageBase::ImageKeywordlistType	ImageKeywordlistType;	
+
+  typedef ImageBase::VectorType	VectorType;
+  typedef ImageBase::ImageKeywordlistType	ImageKeywordlistType;
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
@@ -78,13 +78,13 @@ public:
    /** Accessor type that convert data between internal and external
    *  representations.  */
   typedef itk::DefaultVectorPixelAccessor< InternalPixelType > AccessorType;
- 
+
   /** Functor to provide a common API between DefaultPixelAccessor and
    * DefaultVectorPixelAccessor */
   typedef itk::DefaultVectorPixelAccessorFunctor< Self >       AccessorFunctorType;
 
   /** Tyepdef for the functor used to access a neighborhood of pixel pointers.*/
-  typedef itk::VectorImageNeighborhoodAccessorFunctor< 
+  typedef itk::VectorImageNeighborhoodAccessorFunctor<
                           Self >              NeighborhoodAccessorFunctorType;
 
   /** Dimension of the image.  This constant is used by functions that are
@@ -122,25 +122,25 @@ public:
 
   /** Get the projection coordinate system of the image. */
   virtual std::string GetProjectionRef( void );
-  
+
   /** Get the GCP projection coordinates of the image. */
   virtual std::string GetGCPProjection( void );
-  
+
   virtual unsigned int GetGCPCount( void );
-  
+
   virtual OTB_GCP & GetGCPs ( unsigned int GCPnum );
-    
-  virtual std::string GetGCPId( unsigned int GCPnum );   
+
+  virtual std::string GetGCPId( unsigned int GCPnum );
   virtual std::string GetGCPInfo( unsigned int GCPnum );
-  virtual double GetGCPRow( unsigned int GCPnum ); 
-  virtual double GetGCPCol( unsigned int GCPnum ); 	
-  virtual double GetGCPX( unsigned int GCPnum ); 
-  virtual double GetGCPY( unsigned int GCPnum ); 
+  virtual double GetGCPRow( unsigned int GCPnum );
+  virtual double GetGCPCol( unsigned int GCPnum );
+  virtual double GetGCPX( unsigned int GCPnum );
+  virtual double GetGCPY( unsigned int GCPnum );
   virtual double GetGCPZ( unsigned int GCPnum );
-  
+
   /** Get the six coefficients of affine geoTtransform. */
-  virtual VectorType GetGeoTransform( void ); 
-  
+  virtual VectorType GetGeoTransform( void );
+
   /** Get image corners. */
   virtual VectorType GetUpperLeftCorner( void );
   virtual VectorType GetUpperRightCorner( void );
@@ -152,11 +152,11 @@ public:
 
   /// Copy metadata from a DataObject
   virtual void CopyInformation(const itk::DataObject *);
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
-  /** Return the Pixel Accessor object */	
-  AccessorType GetPixelAccessor( void ) 
+  /** Return the Pixel Accessor object */
+  AccessorType GetPixelAccessor( void )
     { return AccessorType( this->GetNumberOfComponentsPerPixel() ); }
 
   /** Return the Pixel Accesor object */
@@ -164,9 +164,9 @@ public:
     { return AccessorType( this->GetNumberOfComponentsPerPixel() ); }
 
   /** Return the NeighborhoodAccessor functor */
-  NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() 
+  NeighborhoodAccessorFunctorType GetNeighborhoodAccessor()
     { return NeighborhoodAccessorFunctorType( this->GetNumberOfComponentsPerPixel() ); }
-  
+
   /** Return the NeighborhoodAccessor functor */
   const NeighborhoodAccessorFunctorType GetNeighborhoodAccessor() const
     { return NeighborhoodAccessorFunctorType(this->GetNumberOfComponentsPerPixel()); }
@@ -178,10 +178,10 @@ protected:
 private:
   VectorImage(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
 };
-  
-  
+
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/IO/otbVectorImage.txx b/Code/IO/otbVectorImage.txx
index f0d6dffb8f..ddc6e63a24 100644
--- a/Code/IO/otbVectorImage.txx
+++ b/Code/IO/otbVectorImage.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,116 +28,116 @@
 namespace otb
 {
 
-template <class TPixel, unsigned int VImageDimension> 
+template <class TPixel, unsigned int VImageDimension>
 VectorImage<TPixel,VImageDimension>::VectorImage()
 {
 }
 
-template <class TPixel, unsigned int VImageDimension> 
+template <class TPixel, unsigned int VImageDimension>
 std::string VectorImage<TPixel, VImageDimension>::GetProjectionRef( void )
 {
-   return ( ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetProjectionRef( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension> 
+template <class TPixel, unsigned int VImageDimension>
 std::string VectorImage<TPixel, VImageDimension>::GetGCPProjection( void )
 {
-   return ( ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetGCPProjection( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
-unsigned int VectorImage<TPixel, VImageDimension>::GetGCPCount( void  ) 
+template <class TPixel, unsigned int VImageDimension>
+unsigned int VectorImage<TPixel, VImageDimension>::GetGCPCount( void  )
 {
-   return ( ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetGCPCount( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 OTB_GCP & VectorImage<TPixel, VImageDimension>::GetGCPs ( unsigned int GCPnum )
 {
-   return ( this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( this->ImageBase::GetGCPs( this->GetMetaDataDictionary(), GCPnum ) );
 }
-    
-template <class TPixel, unsigned int VImageDimension>   
-std::string VectorImage<TPixel, VImageDimension>::GetGCPId( unsigned int GCPnum  ) 
+
+template <class TPixel, unsigned int VImageDimension>
+std::string VectorImage<TPixel, VImageDimension>::GetGCPId( unsigned int GCPnum  )
 {
-   return ( ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPId( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
+
+template <class TPixel, unsigned int VImageDimension>
 std::string VectorImage<TPixel, VImageDimension>::GetGCPInfo( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPInfo( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double VectorImage<TPixel, VImageDimension>::GetGCPRow( unsigned int GCPnum ) 
+
+template <class TPixel, unsigned int VImageDimension>
+double VectorImage<TPixel, VImageDimension>::GetGCPRow( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPRow( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double VectorImage<TPixel, VImageDimension>::GetGCPCol( unsigned int GCPnum )	
+
+template <class TPixel, unsigned int VImageDimension>
+double VectorImage<TPixel, VImageDimension>::GetGCPCol( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPCol( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double VectorImage<TPixel, VImageDimension>::GetGCPX( unsigned int GCPnum ) 
-{	
-   return ( ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );	
+
+template <class TPixel, unsigned int VImageDimension>
+double VectorImage<TPixel, VImageDimension>::GetGCPX( unsigned int GCPnum )
+{
+   return ( ImageBase::GetGCPX( this->GetMetaDataDictionary(), GCPnum ) );
 }
- 
-template <class TPixel, unsigned int VImageDimension>   
-double VectorImage<TPixel, VImageDimension>::GetGCPY( unsigned int GCPnum ) 
+
+template <class TPixel, unsigned int VImageDimension>
+double VectorImage<TPixel, VImageDimension>::GetGCPY( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPY( this->GetMetaDataDictionary(), GCPnum ) );
 }
-  
-template <class TPixel, unsigned int VImageDimension>   
-double VectorImage<TPixel, VImageDimension>::GetGCPZ( unsigned int GCPnum ) 
+
+template <class TPixel, unsigned int VImageDimension>
+double VectorImage<TPixel, VImageDimension>::GetGCPZ( unsigned int GCPnum )
 {
-   return ( ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );	
+   return ( ImageBase::GetGCPZ( this->GetMetaDataDictionary(), GCPnum ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
-ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetGeoTransform( void ) 
+template <class TPixel, unsigned int VImageDimension>
+ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetGeoTransform( void )
 {
-   return ( ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetGeoTransform( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetUpperLeftCorner( void )
 {
-   return ( ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetUpperLeftCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetUpperRightCorner( void )
 {
-   return ( ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetUpperRightCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetLowerLeftCorner( void )
 {
-   return ( ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetLowerLeftCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::VectorType VectorImage<TPixel, VImageDimension>::GetLowerRightCorner( void )
 {
-   return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetLowerRightCorner( this->GetMetaDataDictionary() ) );
 }
 
-template <class TPixel, unsigned int VImageDimension>   
+template <class TPixel, unsigned int VImageDimension>
 ImageBase::ImageKeywordlistType VectorImage<TPixel, VImageDimension>::GetImageKeywordlist( void )
 {
-   return ( ImageBase::GetImageKeywordlist( this->GetMetaDataDictionary() ) );	
+   return ( ImageBase::GetImageKeywordlist( this->GetMetaDataDictionary() ) );
 }
 
 
-template <class TPixel, unsigned int VImageDimension> 
-void 
+template <class TPixel, unsigned int VImageDimension>
+void
 VectorImage<TPixel, VImageDimension>
 ::CopyInformation(const itk::DataObject * data)
 {
@@ -145,14 +145,14 @@ VectorImage<TPixel, VImageDimension>
   this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary());
 }
 
-template <class TPixel, unsigned int VImageDimension> 
-void 
+template <class TPixel, unsigned int VImageDimension>
+void
 VectorImage<TPixel, VImageDimension>::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os,indent);
-  
+
   this->ImageBase::PrintSelf( os, indent, this->GetMetaDataDictionary() );
-  
+
 }
 
 
diff --git a/Code/Learning/otbChangeProfileKernelFunctor.h b/Code/Learning/otbChangeProfileKernelFunctor.h
index bf07b8575f..fd6d2dc28e 100644
--- a/Code/Learning/otbChangeProfileKernelFunctor.h
+++ b/Code/Learning/otbChangeProfileKernelFunctor.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,13 +31,13 @@ class ChangeProfileKernelFunctor
 public:
 	/** Change Profile Kernel.
 	 * Performs a decision point of view dedicated to the multiscale
-	 * change profile delivered by 
+	 * change profile delivered by
 	 * \subdoxygen{otb}{KullbackLeiblerProfileImageFilter}.
 	 *
 	 * It is implemented as a polynomial kernel:
 	 * $\exp - \left( \gamma \left( \max_i | x_i - y_i | \right)^\textrm{degree} + \textrm{coef} \right)$.
 	 *
-	 * The parameters $\gamma$, $\textrm{coef}$ and $\textrm{degree}$ are 
+	 * The parameters $\gamma$, $\textrm{coef}$ and $\textrm{degree}$ are
 	 * to be fixed through \code SetValue \endcode with keywords: Gamma (def 1.0),
 	 * Coef (def 1.0) and Degree (def 1.0).
 	 */
diff --git a/Code/Learning/otbChangeProfileKernelFunctor.txx b/Code/Learning/otbChangeProfileKernelFunctor.txx
index e067ca7bba..1bbe231b32 100644
--- a/Code/Learning/otbChangeProfileKernelFunctor.txx
+++ b/Code/Learning/otbChangeProfileKernelFunctor.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@
 
 #include "otbChangeProfileKernelFunctor.h"
 
-namespace otb 
+namespace otb
 {
 
 ChangeProfileKernelFunctor
@@ -32,13 +32,13 @@ ChangeProfileKernelFunctor
 	m_Coef = 0.0;
 	m_Degree = 1.0;
 	m_Gamma = 1.0;
-	
+
 	SetValue( "Coef", m_Coef );
 	SetValue( "Degree", m_Degree );
 	SetValue( "Gamma", m_Gamma );
 }
 
-void 
+void
 ChangeProfileKernelFunctor
 ::Update ()
 {
diff --git a/Code/Learning/otbCzihoSOMLearningBehaviorFunctor.h b/Code/Learning/otbCzihoSOMLearningBehaviorFunctor.h
index c31018ac4a..9a0e285933 100644
--- a/Code/Learning/otbCzihoSOMLearningBehaviorFunctor.h
+++ b/Code/Learning/otbCzihoSOMLearningBehaviorFunctor.h
@@ -9,11 +9,11 @@ Version:   $Revision$
 Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
-Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved. 
+Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
 See ITCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,8 +37,8 @@ namespace Functor {
 	*
 	*	Its behavior is decomposed into two steps depending on the number of iterations:
 	*	\f[
-                \beta = 
-                \begin{cases} \beta_0 \left( 1 - \frac{t}{t_0} \right) & \textrm{ if $t < t_0$} 
+                \beta =
+                \begin{cases} \beta_0 \left( 1 - \frac{t}{t_0} \right) & \textrm{ if $t < t_0$}
                 \\
                 \beta_{\textrm{end}} \left( 1- \frac{t-t_O}{t_{\textrm{end}}-t_0} \right) & \textrm{ if $ t_0 \leqslant t < t_{\textrm{end}}$}
                 \end{cases}
@@ -46,10 +46,10 @@ namespace Functor {
         * where \f$ t_0 \f$ stands for IterationThreshold.
 	*
 	*	CzihoSOMLearningBehaviorFunctor uses some parameters of the SOM class such as:
-	*	BetaInit, BetaEnd, NumberOfIterations, but also NeighborhoodSizeInit which may be 
+	*	BetaInit, BetaEnd, NumberOfIterations, but also NeighborhoodSizeInit which may be
 	*	(surprisingly) required for the IterationThreshold.
 	*
-	*	The functor function uses \code NumberOfIterations \endcode, \code BetaInit \endcode, \code BetaEnd \endcode parameters, that is 
+	*	The functor function uses \code NumberOfIterations \endcode, \code BetaInit \endcode, \code BetaEnd \endcode parameters, that is
 	*	why it is necessary to call a specific method for \code IterationThreshold \endcode intialisation.
 	*
 	*	\sa SOM
@@ -65,7 +65,7 @@ namespace Functor {
 			unsigned int GetIterationThreshold () { return this->m_IterationThreshold; }
 
 			template < unsigned int VDimension >
-			void SetIterationThreshold ( const itk::Size<VDimension> & sizeInit, unsigned int iterMax ) 
+			void SetIterationThreshold ( const itk::Size<VDimension> & sizeInit, unsigned int iterMax )
 			{
 				double V0 = static_cast<double>( sizeInit[0] );
 				for (unsigned int i = 1; i < VDimension; i++ )
@@ -73,25 +73,25 @@ namespace Functor {
 					if ( V0 < static_cast<double>( sizeInit[i] ) )
 						V0 = static_cast<double>( sizeInit[i] );
 				}
-					
+
 				m_IterationThreshold = static_cast<unsigned int>(
 					static_cast<double>( iterMax ) * ( 1.0 - 1.0 / ::vcl_sqrt( V0 ) ) );
 			}
 
 			/** Functor */
-			virtual double operator() ( unsigned int currentIteration, 
+			virtual double operator() ( unsigned int currentIteration,
 										unsigned int numberOfIterations,
 										double betaInit, double betaEnd )
 			{
 				if ( currentIteration < m_IterationThreshold )
 				{
-					return betaInit * ( 1.0 
+					return betaInit * ( 1.0
 							- static_cast<double>( currentIteration )
 								/ static_cast<double>(  numberOfIterations ) );
 				}
 				else
 				{
-					return betaEnd * ( 1.0 
+					return betaEnd * ( 1.0
 							- static_cast<double>( currentIteration - m_IterationThreshold )
 							/ static_cast<double>(  numberOfIterations - m_IterationThreshold ) );
 				}
diff --git a/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h b/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h
index 353c87f5a9..da109abba5 100644
--- a/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h
+++ b/Code/Learning/otbCzihoSOMNeighborhoodBehaviorFunctor.h
@@ -9,11 +9,11 @@ Version:   $Revision$
 Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
-Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved. 
+Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
 See ITCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -54,18 +54,18 @@ namespace Functor {
 
 			/** Functor */
 			template < unsigned int VDimension >
-			itk::Size<VDimension> operator() ( unsigned int currentIteration, 
+			itk::Size<VDimension> operator() ( unsigned int currentIteration,
 											unsigned int numberOfIterations,
 											const itk::Size<VDimension> & sizeInit )
 			{
 				itk::Size<VDimension> theSize;
-				double weightening = ::vcl_pow( 1.0 
+				double weightening = ::vcl_pow( 1.0
 										- static_cast<double>( currentIteration )
 											/ static_cast<double>( numberOfIterations ),
 											2.0 );
 				for (unsigned int i = 0; i < VDimension; i++ )
 				{
-					theSize[i] = static_cast<typename itk::Size<VDimension>::SizeValueType> ( 
+					theSize[i] = static_cast<typename itk::Size<VDimension>::SizeValueType> (
 									static_cast<double>( sizeInit[i] ) * weightening );
 				}
 
diff --git a/Code/Learning/otbGaussianModelComponent.h b/Code/Learning/otbGaussianModelComponent.h
index 57ade825cd..472c9a52a4 100644
--- a/Code/Learning/otbGaussianModelComponent.h
+++ b/Code/Learning/otbGaussianModelComponent.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Some parts of this code are covered by the GET copyright. 
+  Some parts of this code are covered by the GET copyright.
   See GETCopyright.txt for details.
 
      This software is distributed WITHOUT ANY WARRANTY; without even
@@ -26,16 +26,16 @@
 
 #include "otbModelComponentBase.h"
 
-namespace otb { 
+namespace otb {
 namespace Statistics {
-  
+
 /** \class GaussianModelComponent
  * \brief is a component (derived from ModelComponentBase) for
  * Gaussian class. This class is used in SEMClassifier
  *
  * <b>Recent API changes:</b>
  * N/A
- * 
+ *
  * \sa ModelComponentBase, SEMClassifier
  */
 
@@ -56,22 +56,22 @@ public:
 
   /** Typedefs from the superclass */
   typedef typename Superclass::MeasurementVectorType MeasurementVectorType ;
-  typedef typename Superclass::MeasurementVectorSizeType 
+  typedef typename Superclass::MeasurementVectorSizeType
       MeasurementVectorSizeType ;
   typedef typename Superclass::MembershipFunctionType MembershipFunctionType ;
   typedef typename Superclass::ParametersType ParametersType ;
 
   /** Type of the membership function. Gaussian density function */
-  typedef itk::Statistics::GaussianDensityFunction< MeasurementVectorType > 
+  typedef itk::Statistics::GaussianDensityFunction< MeasurementVectorType >
       NativeMembershipFunctionType ;
-  
+
   /** Types of the mean and the covariance calculator that will update
    *  this component's distribution parameters */
   typedef itk::Statistics::MeanCalculator< TSample > MeanEstimatorType ;
-  typedef itk::Statistics::CovarianceCalculator< TSample > 
+  typedef itk::Statistics::CovarianceCalculator< TSample >
       CovarianceEstimatorType ;
 
-  /** types of the mean and covariance to be used by 
+  /** types of the mean and covariance to be used by
    *  NativeMembershipFunctionType */
   typedef itk::Array< double > MeanType;
   typedef itk::VariableSizeMatrix< double > CovarianceType;
@@ -79,18 +79,18 @@ public:
   /** Sets the input sample */
   virtual void SetSample(const TSample* sample) ;
 
-  /** Sets the component's distribution parameters. 
+  /** Sets the component's distribution parameters.
    *  e.g. Then user can call directly Pdf( MeasurementVectorType & )  */
   void SetParameters(const ParametersType &parameters) ;
 
   /** Show the parameters in a minimal form in comparison to PrintSelf */
   virtual void ShowParameters ( std::ostream& os, itk::Indent indent) const;
-  
+
 protected:
   GaussianModelComponent() ;
   virtual ~GaussianModelComponent() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
   void GenerateData ();
 
 private:
@@ -103,9 +103,9 @@ private:
   CovarianceType m_Covariance;
 
 } ; // end of class
-    
-} // end of namespace Statistics 
-} // end of namespace otb 
+
+} // end of namespace Statistics
+} // end of namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbGaussianModelComponent.txx"
diff --git a/Code/Learning/otbGaussianModelComponent.txx b/Code/Learning/otbGaussianModelComponent.txx
index e8933f680b..b30f257f3a 100644
--- a/Code/Learning/otbGaussianModelComponent.txx
+++ b/Code/Learning/otbGaussianModelComponent.txx
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Some parts of this code are covered by the GET copyright. 
+  Some parts of this code are covered by the GET copyright.
   See GETCopyright.txt for details.
 
      This software is distributed WITHOUT ANY WARRANTY; without even
@@ -75,20 +75,20 @@ void
 GaussianModelComponent< TSample >
 ::SetSample(const TSample* sample)
 {
-  Superclass::SetSample(sample); 
+  Superclass::SetSample(sample);
 
-  const MeasurementVectorSizeType measurementVectorLength 
+  const MeasurementVectorSizeType measurementVectorLength
       = sample->GetMeasurementVectorSize();
-  
-  this->m_Parameters.SetSize( measurementVectorLength 
+
+  this->m_Parameters.SetSize( measurementVectorLength
               * ( 1 + measurementVectorLength ) );
 
   m_Mean.SetSize( measurementVectorLength );
-  
+
   m_MeanEstimator = MeanEstimatorType::New() ;
   m_MeanEstimator->SetInputSample(sample) ;
   //m_MeanEstimator->Update();
-  
+
   m_Covariance.SetSize( measurementVectorLength,
               measurementVectorLength );
 
@@ -99,11 +99,11 @@ GaussianModelComponent< TSample >
 
   m_GaussianDensityFunction = NativeMembershipFunctionType::New() ;
   this->m_PdfFunction = (MembershipFunctionType *) m_GaussianDensityFunction ;
-  m_GaussianDensityFunction->SetMeasurementVectorSize( 
+  m_GaussianDensityFunction->SetMeasurementVectorSize(
       measurementVectorLength );
   this->SetPdfMembershipFunction( (MembershipFunctionType *)
       m_GaussianDensityFunction.GetPointer() ) ;
-  
+
 }
 
 template< class TSample >
@@ -116,7 +116,7 @@ GaussianModelComponent< TSample >
   unsigned int paramIndex = 0 ;
   unsigned int i, j ;
 
-  MeasurementVectorSizeType measurementVectorSize 
+  MeasurementVectorSizeType measurementVectorSize
     = this->GetSample()->GetMeasurementVectorSize();
 
   m_Mean.SetSize ( measurementVectorSize );
@@ -146,8 +146,8 @@ GaussianModelComponent< TSample >
 {
   if ( this->IsSampleModified() == 0 )
     return;
-  
-  MeasurementVectorSizeType measurementVectorSize 
+
+  MeasurementVectorSizeType measurementVectorSize
     = this->GetSample()->GetMeasurementVectorSize();
 
   unsigned int i, j ;
@@ -167,18 +167,18 @@ GaussianModelComponent< TSample >
   m_CovarianceEstimator->Update() ;
   // m_Covariance.SetSize( m_CovarianceEstimator->GetOutput()->Rows(),
   //     m_CovarianceEstimator->GetOutput()->Cols() );
-  
+
   const CovarianceType * covariance = m_CovarianceEstimator->GetOutput();
 
   for ( i = 0 ; i < measurementVectorSize ; i++ )
     for ( j = 0 ; j < measurementVectorSize ; j++ )
     {
-      this->m_Parameters[paramIndex] 
+      this->m_Parameters[paramIndex]
         = m_Covariance(i,j)
         = covariance->GetVnlMatrix().get(i, j);
       ++paramIndex;
     }
-  
+
   this->m_GaussianDensityFunction->SetMean(&m_Mean) ;
   this->m_GaussianDensityFunction->SetCovariance(&m_Covariance) ;
 
diff --git a/Code/Learning/otbKMeansImageClassificationFilter.h b/Code/Learning/otbKMeansImageClassificationFilter.h
index 1fbb8eaf8c..b0123d4c1e 100644
--- a/Code/Learning/otbKMeansImageClassificationFilter.h
+++ b/Code/Learning/otbKMeansImageClassificationFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -48,10 +48,10 @@ namespace otb
     typedef itk::InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
     typedef itk::SmartPointer<Self>                           Pointer;
     typedef itk::SmartPointer<const Self>                     ConstPointer;
-    
+
     /** Type macro */
     itkNewMacro(Self);
-    
+
     /** Creation through object factory macro */
     itkTypeMacro(KMeansImageClassificationFilter,InPlaceImageFilter);
 
@@ -79,7 +79,7 @@ namespace otb
     typedef itk::Array<double>                            KMeansParametersType;
     typedef std::map<LabelType,SampleType>                CentroidsMapType;
     typedef itk::Statistics::EuclideanDistance<SampleType> DistanceType;
-    
+
     /** Set/Get the centroids */
     itkSetMacro(Centroids,KMeansParametersType);
     itkGetConstReferenceMacro(Centroids,KMeansParametersType);
@@ -112,7 +112,7 @@ namespace otb
     virtual void BeforeThreadedGenerateData();
     /**PrintSelf method */
     virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
     private:
     KMeansImageClassificationFilter(const Self&); //purposely not implemented
     void operator=(const Self&); //purposely not implemented
diff --git a/Code/Learning/otbKMeansImageClassificationFilter.txx b/Code/Learning/otbKMeansImageClassificationFilter.txx
index f799b2f3bd..8002c03972 100644
--- a/Code/Learning/otbKMeansImageClassificationFilter.txx
+++ b/Code/Learning/otbKMeansImageClassificationFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -90,7 +90,7 @@ KMeansImageClassificationFilter<TInputImage,TOutputImage,VMaxSampleDimension,TMa
   typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
   typedef itk::ImageRegionConstIterator<MaskImageType> MaskIteratorType;
   typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
-   
+
   InputIteratorType inIt(inputPtr,outputRegionForThread);
   OutputIteratorType outIt(outputPtr,outputRegionForThread);
 
@@ -135,7 +135,7 @@ KMeansImageClassificationFilter<TInputImage,TOutputImage,VMaxSampleDimension,TMa
 	     {
 	       pixel[i]=inIt.Get()[i];
 	     }
-	   
+
 	   double current_distance = distance->Evaluate(pixel,m_CentroidsMap[label]);
 
 	   for(label=2;label<=static_cast<LabelType>(m_CentroidsMap.size());++label)
@@ -150,7 +150,7 @@ KMeansImageClassificationFilter<TInputImage,TOutputImage,VMaxSampleDimension,TMa
 	   outIt.Set(current_label);
 	 }
        ++outIt;
-       ++inIt; 
+       ++inIt;
      }
 }
 /**
diff --git a/Code/Learning/otbMixturePolyRBFKernelFunctor.h b/Code/Learning/otbMixturePolyRBFKernelFunctor.h
index 79a408d8ab..225e5f94e6 100644
--- a/Code/Learning/otbMixturePolyRBFKernelFunctor.h
+++ b/Code/Learning/otbMixturePolyRBFKernelFunctor.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,9 +31,9 @@ class MixturePolyRBFKernelFunctor
 public:
 	/** Mixture of kernels.
 	 * Performs the mixture of kind: $\mu k_1(x,y) + (1-\mu) k_2(x,y)$
-	 * with $k_1(x,y)=\left( \gamma_1 x\cdot y + c_0 \right) ^d$ a 
-	 * polynomial kernel and 
-	 * $k_2(x,y) = \exp\left( - \gamma_2 \| x-y\-^2 \right)$ an RBF one. 
+	 * with $k_1(x,y)=\left( \gamma_1 x\cdot y + c_0 \right) ^d$ a
+	 * polynomial kernel and
+	 * $k_2(x,y) = \exp\left( - \gamma_2 \| x-y\-^2 \right)$ an RBF one.
 	 *
 	 * Variable to be instanciated (through \code SetValue \endcode) are:
 	 * Mixture (def=0.5), GammaPoly (def=1.0), CoefPoly (def=1.0),
diff --git a/Code/Learning/otbMixturePolyRBFKernelFunctor.txx b/Code/Learning/otbMixturePolyRBFKernelFunctor.txx
index 12d7e91a11..e0c0f5aa26 100644
--- a/Code/Learning/otbMixturePolyRBFKernelFunctor.txx
+++ b/Code/Learning/otbMixturePolyRBFKernelFunctor.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,7 +36,7 @@ MixturePolyRBFKernelFunctor
 	m_CoefPoly = 1.0;
 	m_DegreePoly = 2;
 	m_GammaRBF = 1.0;
-	
+
 	SetValue( "Mixture", m_Mixture );
 	SetValue( "GammaPoly", m_GammaPoly );
 	SetValue( "CoefPoly", m_CoefPoly );
@@ -51,9 +51,9 @@ MixturePolyRBFKernelFunctor
 {
 	double kernel_poly = 0.0;
 	if ( m_Mixture > 0.0 )
-		kernel_poly = powi( m_GammaPoly * this->dot( x, y ) + m_CoefPoly, 
+		kernel_poly = powi( m_GammaPoly * this->dot( x, y ) + m_CoefPoly,
 							m_DegreePoly );
-	
+
 	double kernel_rbf = 0.0;
 	if ( m_Mixture < 1.0 )
 	{
@@ -70,7 +70,7 @@ MixturePolyRBFKernelFunctor
 			else
 			{
 				if ( x->index > y->index )
-				{	
+				{
 					sum += y->value * y->value;
 					++y;
 				}
@@ -119,7 +119,7 @@ MixturePolyRBFKernelFunctor
 #endif
 }
 
-double 
+double
 MixturePolyRBFKernelFunctor
 ::powi ( double base, int times ) const
 {
diff --git a/Code/Learning/otbModelComponentBase.h b/Code/Learning/otbModelComponentBase.h
index d7f3eb4123..e13d2a6856 100644
--- a/Code/Learning/otbModelComponentBase.h
+++ b/Code/Learning/otbModelComponentBase.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Some parts of this code are covered by the GET copyright. 
+  Some parts of this code are covered by the GET copyright.
   See GETCopyright.txt for details.
 
      This software is distributed WITHOUT ANY WARRANTY; without even
@@ -27,31 +27,31 @@
 #include "itkArray.h"
 #include "itkMembershipFunctionBase.h"
 
-namespace otb { 
+namespace otb {
 namespace Statistics {
-  
+
 /** \class ModelComponentBase
- * \brief base class for distribution representation that supports 
- * analytical way to update the distribution parameters 
+ * \brief base class for distribution representation that supports
+ * analytical way to update the distribution parameters
  *
  * This class expects that its subclasses (distribution components) should
- * have analytical expressions for updating its paraters using only 
+ * have analytical expressions for updating its paraters using only
  * the measurement vectors.
  *
  * The difference from MixtureModelComponentBase is that it does not have
- * the knownledge of a mixture. Hence, no weights have to define. 
+ * the knownledge of a mixture. Hence, no weights have to define.
  *
- * This class can be considered as a macro class that encapsulates the 
+ * This class can be considered as a macro class that encapsulates the
  * storage for the model (subclasses of MembershipFunctionBase) and
  * model parameter estimators (implemenation of analytical expressions).
- * 
+ *
  * Subclasses of this class should define their own distribution specific
- * membership function. For example, GaussianModelComponent class 
+ * membership function. For example, GaussianModelComponent class
  * defines and creates a GaussianDensityFunction object for that matter.
- * Subclasses should also cast such membership function object to 
- * MembershipFunctionBase object. By doing that, users can get pointers 
+ * Subclasses should also cast such membership function object to
+ * MembershipFunctionBase object. By doing that, users can get pointers
  * to membership functions from different distributional model
- *  
+ *
  * \sa FIXME: StochasticExpectationMaximizationMixtureModelEstimator
  */
 
@@ -69,34 +69,34 @@ public:
   /**Standard Macros */
   itkNewMacro(Self) ;
   itkTypeMacro(ModelComponentBase, Object);
-  
+
   typedef typename TSample::MeasurementVectorType    MeasurementVectorType ;
   typedef typename TSample::MeasurementVectorSizeType MeasurementVectorSizeType;
 
   /** typedef for the MembershipFunctionBase */
-  typedef itk::Statistics::MembershipFunctionBase< MeasurementVectorType > 
+  typedef itk::Statistics::MembershipFunctionBase< MeasurementVectorType >
     MembershipFunctionType ;
 
   typedef itk::Array< double > ParametersType ;
 
   /** stores the sample pointer (does not update the estimation by itself) */
   virtual void SetSample(const TSample* sample) ;
-  
+
   /** returns the sample pointer */
   const TSample* GetSample() const;
 
   /** returns the pointer to the membership function object.
    * Subclasses of this class are responsible for creating the
-   * actual membership function objects and cast them to 
+   * actual membership function objects and cast them to
    * MembershipFunctionBase objects */
   MembershipFunctionType* GetPdfMembershipFunction() ;
   MembershipFunctionType* GetCdfMembershipFunction() ;
 
   /** stores the pointer to the membership function.
    * subclasses use this funtion to store their membership function
-   * object after dynamic creation, when available (the Pdf part is 
-   * protected as soon as it consodered to be known for all 
-   * ModelComponent)*/ 
+   * object after dynamic creation, when available (the Pdf part is
+   * protected as soon as it consodered to be known for all
+   * ModelComponent)*/
   void SetCdfMembershipFunction( MembershipFunctionType* function ) ;
 
   /** Gets/Sets the parameter(s) required for the component */
@@ -113,12 +113,12 @@ public:
   /** Update parameter estimation if necessary
    * (mainly when sample has changed) */
   virtual void Update() ;
-  
+
   /** Show the parameters in a minimal form in comparison to PrintSelf */
   virtual void ShowParameters ( std::ostream& os, itk::Indent indent) const;
 
   // TODO: Distance entre distribution via une sorte de fonction membre...
-  
+
 protected:
   ModelComponentBase() ;
   virtual ~ModelComponentBase() {}
@@ -128,13 +128,13 @@ protected:
 
   /** stores the pointer to the membership function.
    * subclasses use this funtion to store their membership function
-   * object after dynamic creation, when available */ 
+   * object after dynamic creation, when available */
   void SetPdfMembershipFunction(MembershipFunctionType* function) ;
 
   /** Test on new data */
   int IsSampleModified ();
 
-  /** Set of parameters necessary for the statistical models */ 
+  /** Set of parameters necessary for the statistical models */
   ParametersType m_Parameters ;
 
 private:
@@ -148,11 +148,11 @@ protected:
   MembershipFunctionType* m_CdfFunction ;
   /** indicative flag of membership function's parameter changes */
   int m_SampleModified ;
-  
+
 } ; // end of class
-    
-} // end of namespace Statistics 
-} // end of namespace otb 
+
+} // end of namespace Statistics
+} // end of namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbModelComponentBase.txx"
diff --git a/Code/Learning/otbModelComponentBase.txx b/Code/Learning/otbModelComponentBase.txx
index 4da3ee98c7..9324eca29b 100644
--- a/Code/Learning/otbModelComponentBase.txx
+++ b/Code/Learning/otbModelComponentBase.txx
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Some parts of this code are covered by the GET copyright. 
+  Some parts of this code are covered by the GET copyright.
   See GETCopyright.txt for details.
 
      This software is distributed WITHOUT ANY WARRANTY; without even
@@ -26,7 +26,7 @@
 #include "otbMacro.h"
 #include "otbModelComponentBase.h"
 
-namespace otb{ 
+namespace otb{
 namespace Statistics{
 
 template< class TSample >
@@ -97,7 +97,7 @@ ModelComponentBase< TSample >
 {
   m_Sample = sample ;
   m_SampleModified = 1;
-} 
+}
 
 template< class TSample >
 const TSample*
@@ -105,7 +105,7 @@ ModelComponentBase< TSample >
 ::GetSample() const
 {
   return m_Sample ;
-} 
+}
 
 template< class TSample >
 void
@@ -151,7 +151,7 @@ ModelComponentBase< TSample >
 template< class TSample >
 inline double
 ModelComponentBase< TSample >
-::Pdf(MeasurementVectorType& measurements) 
+::Pdf(MeasurementVectorType& measurements)
 {
   return this->m_PdfFunction->Evaluate(measurements) ;
 }
@@ -159,7 +159,7 @@ ModelComponentBase< TSample >
 template< class TSample >
 inline double
 ModelComponentBase< TSample >
-::Cdf(MeasurementVectorType& measurements) 
+::Cdf(MeasurementVectorType& measurements)
 {
   return m_CdfFunction->Evaluate(measurements) ;
 }
@@ -175,7 +175,7 @@ ModelComponentBase< TSample >
 template< class TSample >
 void
 ModelComponentBase< TSample >
-::Update() 
+::Update()
 {
   if ( m_SampleModified )
     this->GenerateData();
@@ -187,14 +187,14 @@ void
 ModelComponentBase< TSample >
 ::GenerateData ()
 {
-  /** subclasses should override this function to perform 
+  /** subclasses should override this function to perform
    *  parameter estimation. But it allows to switch m_SampleModified
    *  when necessary.
    */
   m_SampleModified = 0;
 }
 
-} // end of namespace Statistics 
+} // end of namespace Statistics
 } // end of namespace otb
 
 #endif
diff --git a/Code/Learning/otbNonGaussianRBFKernelFunctor.h b/Code/Learning/otbNonGaussianRBFKernelFunctor.h
index 6e9ac919d8..6d23bb6dfd 100644
--- a/Code/Learning/otbNonGaussianRBFKernelFunctor.h
+++ b/Code/Learning/otbNonGaussianRBFKernelFunctor.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,9 +28,9 @@ namespace otb
   /** \class NonGaussianRBFKernelFunctor
    * \brief Performs an RBF kernel evaluation that better suit sample distribution with high Kurtosis.
    *
-   * It is of kind 
+   * It is of kind
    * $\exp\left( - \gamma \sum_i | x_i^\alpha - y_i^\alpha |^\beta \right)$
-   * where $0 \leqslant \alpha \leqslant 1$ and 
+   * where $0 \leqslant \alpha \leqslant 1$ and
    * $0 \leqslant \beta \leqslant 2$.
    *
    * Variables to be instanciated (through \code SetValue \endcode) are:
@@ -43,14 +43,14 @@ public:
 
 	double operator() ( const svm_node * x, const svm_node * y,
 						const svm_parameter & param ) const;
-	
+
 	NonGaussianRBFKernelFunctor ();
 	virtual ~NonGaussianRBFKernelFunctor () { }
 
 	/** Specific implementation of \code Update \endcode to split m_MapParameters
 	 * into specific variables to speed up kernel evaluations */
 	void Update ();
-	
+
 protected:
 	double m_Alpha;
 	double m_Beta;
diff --git a/Code/Learning/otbNonGaussianRBFKernelFunctor.txx b/Code/Learning/otbNonGaussianRBFKernelFunctor.txx
index c546be2c30..fe065f532c 100644
--- a/Code/Learning/otbNonGaussianRBFKernelFunctor.txx
+++ b/Code/Learning/otbNonGaussianRBFKernelFunctor.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -45,12 +45,12 @@ NonGaussianRBFKernelFunctor
 				const svm_parameter & param ) const
 {
 	double pr_x, pr_y, diff, sum = 0.0;
-	
+
 	while ( x->index != -1 && y->index != -1 )
 	{
-		pr_x = pow( x->value, m_Alpha ); 
-		pr_y = pow( y->value, m_Alpha ); 
-		
+		pr_x = pow( x->value, m_Alpha );
+		pr_y = pow( y->value, m_Alpha );
+
 		diff = pow( fabs( pr_x - pr_y ), m_Beta );
 
 		sum += diff;
@@ -78,4 +78,4 @@ NonGaussianRBFKernelFunctor
 #endif
 
 
-	
+
diff --git a/Code/Learning/otbPeriodicSOM.h b/Code/Learning/otbPeriodicSOM.h
index 835f1f67d7..4b5287aeca 100644
--- a/Code/Learning/otbPeriodicSOM.h
+++ b/Code/Learning/otbPeriodicSOM.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved. 
+  Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
   See ITCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,23 +27,23 @@ namespace otb {
 
 /**
  * \class PeriodicSOM
- * \brief This class is responsible for the learning of a self organizing 
+ * \brief This class is responsible for the learning of a self organizing
  * map when considered as a torus.
  *
- * This class extends the SOM object which implements the Self 
+ * This class extends the SOM object which implements the Self
  * Organizing Map (or Kohonen map) learning.
- * 
+ *
  * The learning process iteratively select the best-response neuron for each input vector,
- * enhancing its response and the response of its neighbors with respect to a certain radius, 
+ * enhancing its response and the response of its neighbors with respect to a certain radius,
  * computed from an initial radius, and to a certain learning factor, decreasing at each iteration.
  *
  * The behavior of the neighborhood is given by a functor (templated) which parameter is the current
  * iteration. It returns a neighborhood of type \code SizeType \endcode.
  *
- * The behavior of the learning factor (hold by a beta variable) is given by an other functor 
+ * The behavior of the learning factor (hold by a beta variable) is given by an other functor
  * which parameter is the current iteration. It returns a beta value of type \code double \endcode.
  *
- * The SOMMap produced as output can be either initialized with a constant custom value or randomly 
+ * The SOMMap produced as output can be either initialized with a constant custom value or randomly
  * generated following a normal law. The seed for the random intialization can be modified.
  *
  * \sa SOMMap
@@ -52,16 +52,16 @@ namespace otb {
  * \sa CzihoSOMNeighborhoodBehaviorFunctor
  */
 template <class TListSample, class TMap,
-		 class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor, 
-		 class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor > 
-class ITK_EXPORT PeriodicSOM  
+		 class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
+		 class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor >
+class ITK_EXPORT PeriodicSOM
 	: public SOM< TListSample, TMap, TSOMLearningBehaviorFunctor, TSOMNeighborhoodBehaviorFunctor >
 {
 public:
 	/** Standard typedefs */
 	typedef PeriodicSOM Self;
-	typedef SOM< TListSample, TMap, 
-					TSOMLearningBehaviorFunctor, 
+	typedef SOM< TListSample, TMap,
+					TSOMLearningBehaviorFunctor,
 					TSOMNeighborhoodBehaviorFunctor > Superclass;
 	typedef itk::SmartPointer<Self> Pointer;
 	typedef itk::SmartPointer<const Self> ConstPointer;
@@ -113,8 +113,8 @@ protected:
 		Superclass::PrintSelf(os,indent); }
 
 private:
-	PeriodicSOM(const Self&); // purposely not implemented 
-	void operator=(const Self&); // purposely not implemented 
+	PeriodicSOM(const Self&); // purposely not implemented
+	void operator=(const Self&); // purposely not implemented
 
 }; // end of class
 
diff --git a/Code/Learning/otbPeriodicSOM.txx b/Code/Learning/otbPeriodicSOM.txx
index f2729a69bf..642bb31d62 100644
--- a/Code/Learning/otbPeriodicSOM.txx
+++ b/Code/Learning/otbPeriodicSOM.txx
@@ -12,8 +12,8 @@
   Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
   See ITCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -57,7 +57,7 @@ PeriodicSOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehavio
 	typename MapType::RegionType mapRegion = map->GetLargestPossibleRegion();
 	NeighborhoodIteratorType it ( radius, map, mapRegion );
 
-	// Here, the periodic update is achieved 'by hand' since 
+	// Here, the periodic update is achieved 'by hand' since
 	// PeriodicBoundaryCondition does not allow to modifiy
 	// VectorImage contents
 	SizeType mapSize = mapRegion.GetSize();
@@ -69,7 +69,7 @@ PeriodicSOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehavio
 	for ( i = 0; i < it.Size(); i++ )
 	{
 		typename NeighborhoodIteratorType::OffsetType offset = it.GetOffset(i);
-		
+
 		// The neighborhood is of elliptic shape
 		double theDistance = itk::NumericTraits< double >::Zero;
 		for ( j = 0; j < MapType::ImageDimension; j++ )
@@ -81,7 +81,7 @@ PeriodicSOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehavio
 			for ( j = 0; j < MapType::ImageDimension; j++ )
 			{
 				int pos = offset[j] + position[j];
-				positionToUpdate[j] = ( pos >= 0 ) ? 
+				positionToUpdate[j] = ( pos >= 0 ) ?
 					pos % mapSize[j] :
 					( mapSize[j] - ( (-pos) % mapSize[j] ) ) % mapSize[j];
 			}
diff --git a/Code/Learning/otbROIdataConversion.h b/Code/Learning/otbROIdataConversion.h
index e63e484f17..004b3a429e 100644
--- a/Code/Learning/otbROIdataConversion.h
+++ b/Code/Learning/otbROIdataConversion.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,10 +30,10 @@ namespace otb {
 /** ROIdataConversion class.
  * \brief image data to vector conversion.
  *
- * A class that extract pixel value from an input image according to a ROI 
+ * A class that extract pixel value from an input image according to a ROI
  * image and outputs it on a vector of PixelType.
  */
-template < class TInputImage, class TInputROIImage > 
+template < class TInputImage, class TInputROIImage >
 class ROIdataConversion
   : public itk::ImageToImageFilter< TInputImage, otb::Image<typename TInputImage::PixelType, 1> >
 {
@@ -57,11 +57,11 @@ public:
 	typedef typename OutputImageType::SizeType::SizeValueType SizeValueType;
 
 	/** Gets/Sets the input image */
-	const InputImageType * GetInputImage () { 
+	const InputImageType * GetInputImage () {
 		return this->Superclass::GetInput();
 	}
-	void SetInputImage ( const InputImageType * img ) {  
-		this->Superclass::SetInput(img); 
+	void SetInputImage ( const InputImageType * img ) {
+		this->Superclass::SetInput(img);
 	}
 
 	/** Gets/Sets the ROI image */
@@ -71,14 +71,14 @@ public:
 	void SetROIImage ( const InputROIImageType * img ) {
 		this->itk::ProcessObject::SetNthInput( 1, const_cast<InputROIImageType *>(img) );
 	}
-		
+
 protected:
 	ROIdataConversion();
 	virtual ~ROIdataConversion() { }
 	virtual void GenerateOutputInformation();
 	virtual void GenerateInputRequestedRegion();
 	void PrintSelf(std::ostream& os, itk::Indent indent) const {
-		Superclass::PrintSelf( os, indent ); 
+		Superclass::PrintSelf( os, indent );
 	}
 
 	/** Performs its job! */
diff --git a/Code/Learning/otbROIdataConversion.txx b/Code/Learning/otbROIdataConversion.txx
index dde3b119fd..879debec78 100644
--- a/Code/Learning/otbROIdataConversion.txx
+++ b/Code/Learning/otbROIdataConversion.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -43,8 +43,8 @@ ROIdataConversion< TInputImage, TInputROIImage >
 ::GenerateOutputInformation(void)
 {
   typename OutputImageType::Pointer outputPtr = this->GetOutput();
-  typename OutputImageType::SizeType outputSize 
-    = outputPtr->GetRequestedRegion().GetSize(); 
+  typename OutputImageType::SizeType outputSize
+    = outputPtr->GetRequestedRegion().GetSize();
   outputSize[0] = GetNumberOfSample();
   outputPtr->SetRegions( outputSize );
 }
@@ -100,12 +100,12 @@ ROIdataConversion< TInputImage, TInputROIImage >
 template < class TInputImage, class TInputROIImage >
 typename ROIdataConversion< TInputImage, TInputROIImage >::SizeValueType
 ROIdataConversion< TInputImage, TInputROIImage >
-::GetNumberOfSample () 
+::GetNumberOfSample ()
 {
 	InputROIImagePointerType inputROIPtr = GetROIImage();
 	itk::ImageRegionConstIterator< InputROIImageType > trainingIter
 		( inputROIPtr, inputROIPtr->GetRequestedRegion() );
-	
+
 	trainingIter.GoToBegin();
 
 	SizeValueType count = 0L;
diff --git a/Code/Learning/otbSEMClassifier.h b/Code/Learning/otbSEMClassifier.h
index 37b1b484c6..0d834264b3 100644
--- a/Code/Learning/otbSEMClassifier.h
+++ b/Code/Learning/otbSEMClassifier.h
@@ -12,37 +12,37 @@
 
 
 namespace otb {
-  
+
 /** \class SEMClassifier
-   *  \brief This class implements the Stochastic Expectation 
-   *  Maximization algorithm to perform an estimation of a mixture model. 
+   *  \brief This class implements the Stochastic Expectation
+   *  Maximization algorithm to perform an estimation of a mixture model.
    *
    * The first template argument is the type of the target sample
-   * data. This estimator expects one or more model component objects 
-   * of the classes derived from the ModelComponentBase. The actual 
-   * component (or module) parameters are updated by each component. 
-   * Users can think this class as a strategy or a integration point 
-   * for the SEM procedure. 
+   * data. This estimator expects one or more model component objects
+   * of the classes derived from the ModelComponentBase. The actual
+   * component (or module) parameters are updated by each component.
+   * Users can think this class as a strategy or a integration point
+   * for the SEM procedure.
    *
-   * The number of classes (SetNumberOfClasses), the initial 
-   * proportion (SetInitialProportions), the input sample (SetSample), 
-   * the model components (AddComponent), and the maximum iteration 
-   * (SetMaximumIteration) are required. The SEM procedure terminates 
-   * when the current iteration reaches the maximum iteration or the model 
+   * The number of classes (SetNumberOfClasses), the initial
+   * proportion (SetInitialProportions), the input sample (SetSample),
+   * the model components (AddComponent), and the maximum iteration
+   * (SetMaximumIteration) are required. The SEM procedure terminates
+   * when the current iteration reaches the maximum iteration or the model
    * parameters converge.
    *
-   * The difference from ExpectationMaximizationMixtureModelEstimator is 
-   * that SEMClassifier include the maximum a posteriori decition on each 
+   * The difference from ExpectationMaximizationMixtureModelEstimator is
+   * that SEMClassifier include the maximum a posteriori decition on each
    * sample. The class is to be seen as a classification and not an estimator.
    *
    * <b>Recent API changes:</b>
    * N/A
-   * 
+   *
    * \sa ModelComponentBase, GaussianModelComponent
  */
 template< class TInputImage, class TOutputImage >
-class ITK_EXPORT SEMClassifier 
-  : public itk::Statistics::SampleClassifier< 
+class ITK_EXPORT SEMClassifier
+  : public itk::Statistics::SampleClassifier<
       typename itk::Statistics::ListSample< typename TInputImage::PixelType > >
 {
 public:
@@ -62,24 +62,24 @@ public:
   /** TSample template argument related typedefs */
   typedef typename itk::Statistics::ListSample< typename TInputImage::PixelType > SampleType;
   typedef typename itk::Statistics::Subsample< SampleType > ClassSampleType;
-  
+
   typedef typename SampleType::MeasurementType MeasurementType ;
   typedef typename SampleType::MeasurementVectorType MeasurementVectorType ;
-  
+
   /** Type of the segmentation vector */
   typedef unsigned int ClassLabelType ;
   typedef std::vector< ClassLabelType > ClassLabelVectorType;
-  
+
   /** Output type for GetClassSample method */
   typedef itk::Statistics::MembershipSample< SampleType > OutputType ;
 
   /** Type of the mixture model component base class.
-   * Due to the stochastic purpose, the inital list of sample (from TInputImage) 
+   * Due to the stochastic purpose, the inital list of sample (from TInputImage)
    * is duplicated as many times as the number of classes (into SampleLists). */
-  typedef otb::Statistics::ModelComponentBase< ClassSampleType > ComponentType ; 
+  typedef otb::Statistics::ModelComponentBase< ClassSampleType > ComponentType ;
   typedef typename ComponentType::Pointer ComponentPointerType;
 
-  /** Type of the component pointer storage, one component per class */ 
+  /** Type of the component pointer storage, one component per class */
   typedef std::vector< ComponentPointerType > ComponentVectorType ;
 
   /** type of the parameters needed for the component vectors */
@@ -103,8 +103,8 @@ public:
   SampleType * GetSampleList() const;
 
   /** Set/Gets the initial proportion values. The size of proportion
-   * vector should be same as the number of component (or classes). 
-   * Choose between SetInitialProportions, SetClassLabels or 
+   * vector should be same as the number of component (or classes).
+   * Choose between SetInitialProportions, SetClassLabels or
    * SetNumberOfComponents */
   void SetInitialProportions(ProportionVectorType &propotion) ;
   ProportionVectorType* GetInitialProportions() ;
@@ -112,7 +112,7 @@ public:
   /** Gets the result proportion values */
   ProportionVectorType* GetProportions() ;
 
-  /** Set/Gets the initial segmentation. the size of the vector should be 
+  /** Set/Gets the initial segmentation. the size of the vector should be
    * the same as the number of samples (length of MeasurementVector) */
   void SetClassLabels( OutputType * labels );
   void SetClassLabels( TOutputImage * imgLabels );
@@ -135,7 +135,7 @@ public:
   int GetNeighborhood();
 
   /** Gets the current iteration. */
-  int GetCurrentIteration(); 
+  int GetCurrentIteration();
 
   /** Adds a new component (or class). Has to be called after SetNumberOfClasses */
   int AddComponent( int id, ComponentType* component ) ;
@@ -146,8 +146,8 @@ public:
   /** Termination status after running optimization */
   typedef enum { CONVERGED = 0, NOT_CONVERGED = 1 } TerminationCodeType;
 
-  /** Set/Get the termination threshold (ratio of the number of sample that 
-   * change affected class during interation over the total number of 
+  /** Set/Get the termination threshold (ratio of the number of sample that
+   * change affected class during interation over the total number of
    * samples (def is 1E-5) */
   itkSetMacro(TerminationThreshold,double);
   itkGetMacro(TerminationThreshold,double);
@@ -166,7 +166,7 @@ public:
   virtual ~SEMClassifier() {}
   void PrintSelf(std::ostream& os, itk::Indent indent) const ;
 
-  /** Initialize the first segmentation, either randomly or by using 
+  /** Initialize the first segmentation, either randomly or by using
    *  a ClassLabelVectorType given in SetClassLabels. */
   void InitParameters();
   /** Stochastic part of the SEM */
@@ -174,7 +174,7 @@ public:
   /** Estimation part of the SEM */
   void PerformExpectationProcess();
   /** Maximization part of the SEM.
-   * This method should be upgraded this a contextual point of view... 
+   * This method should be upgraded this a contextual point of view...
    * It required to a Neighborhood knowledge into the TSample type... */
   void PerformMaximizationProcess();
   /** Make Decision through a Maximum a posteriori */
@@ -189,17 +189,17 @@ private:
   int m_NbClasses;
   int m_MaximumIteration ;
   int m_CurrentIteration ;
-  int m_NbChange; 
+  int m_NbChange;
   double m_TerminationThreshold;
   int m_Neighborhood ;
-  
+
   TerminationCodeType    m_TerminationCode ;
   ComponentVectorType    m_ComponentVector ;
   ProportionVectorType  m_InitialProportions ;
   ProportionVectorType  m_Proportions ;
   ProbaByClassVectorType  m_Proba;
   ClassLabelVectorType  m_ClassLabels;
-  
+
   int m_ExternalLabels;
   int m_ComponentDeclared;
 
@@ -207,7 +207,7 @@ private:
   typename OutputType::Pointer m_Output ;
 } ; // end of class
 
-} // end of namespace 
+} // end of namespace
 
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbSEMClassifier.txx"
diff --git a/Code/Learning/otbSEMClassifier.txx b/Code/Learning/otbSEMClassifier.txx
index 0ebaf17414..01b347501a 100644
--- a/Code/Learning/otbSEMClassifier.txx
+++ b/Code/Learning/otbSEMClassifier.txx
@@ -36,7 +36,7 @@ SEMClassifier< TInputImage, TOutputImage >
   m_Output = 0;
 
 }
- 
+
 template< class TInputImage, class TOutputImage >
 void
 SEMClassifier< TInputImage, TOutputImage >
@@ -55,7 +55,7 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 void
 SEMClassifier< TInputImage, TOutputImage >
-::SetNeighborhood(int neighborhood) 
+::SetNeighborhood(int neighborhood)
 {
   m_Neighborhood = 2*(neighborhood/2) + 1 ;
   if ( m_Neighborhood < 1 )
@@ -65,7 +65,7 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 int
 SEMClassifier< TInputImage, TOutputImage >
-::GetNeighborhood() 
+::GetNeighborhood()
 {
   return m_Neighborhood ;
 }
@@ -73,7 +73,7 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 void
 SEMClassifier< TInputImage, TOutputImage >
-::SetInitialProportions(ProportionVectorType &proportions) 
+::SetInitialProportions(ProportionVectorType &proportions)
 {
   m_InitialProportions = proportions ;
   m_ExternalLabels = 0;
@@ -82,7 +82,7 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 typename SEMClassifier< TInputImage, TOutputImage >::ProportionVectorType*
 SEMClassifier< TInputImage, TOutputImage >
-::GetInitialProportions() 
+::GetInitialProportions()
 {
   return m_InitialProportions ;
 }
@@ -95,7 +95,7 @@ SEMClassifier< TInputImage, TOutputImage >
   if ( m_Sample == NULL )
   {
     m_ClassLabels.resize( labels->Size() );
-    
+
     ClassLabelVectorType::iterator iterClassLabel = m_ClassLabels.begin();
     typename OutputType::ConstIterator iterLabels = labels->Begin() ;
     typename OutputType::InstanceIdentifier id = 0;
@@ -111,11 +111,11 @@ SEMClassifier< TInputImage, TOutputImage >
   else if ( labels.size() == m_NbSamples )
   {
     m_ClassLabels.resize( labels->Size() );
-    
+
     ClassLabelVectorType::iterator iterClassLabel = m_ClassLabels.begin();
     typename OutputType::iterator iterLabels = labels->Begin();
     typename OutputType::InstanceIdentifier id = 0;
-    
+
     do {
       *iterClassLabel = iterLabels->GetClassLabel( id );
       ++iterLabels;
@@ -144,11 +144,11 @@ SEMClassifier< TInputImage, TOutputImage >
   if ( m_Sample == NULL )
   {
     m_ClassLabels.resize( theSize );
-    
-    typename itk::ImageRegionIterator< TOutputImage > imgLabelIter ( imgLabels, 
+
+    typename itk::ImageRegionIterator< TOutputImage > imgLabelIter ( imgLabels,
         imgLabels->GetBufferedRegion() );
     imgLabelIter.GoToBegin();
-    typename itk::ImageRegionIterator< TOutputImage > imgLabelIterEnd ( imgLabels, 
+    typename itk::ImageRegionIterator< TOutputImage > imgLabelIterEnd ( imgLabels,
         imgLabels->GetBufferedRegion() );
     imgLabelIterEnd.GoToEnd() ;
 
@@ -164,11 +164,11 @@ SEMClassifier< TInputImage, TOutputImage >
   else if ( theSize == m_NbSamples )
   {
     m_ClassLabels.resize( theSize );
-    
-    typename itk::ImageRegionIterator< TOutputImage > imgLabelIter ( imgLabels, 
+
+    typename itk::ImageRegionIterator< TOutputImage > imgLabelIter ( imgLabels,
         imgLabels->GetBufferedRegion() );
     imgLabelIter.GoToBegin();
-    typename itk::ImageRegionIterator< TOutputImage > imgLabelIterEnd ( imgLabels, 
+    typename itk::ImageRegionIterator< TOutputImage > imgLabelIterEnd ( imgLabels,
         imgLabels->GetBufferedRegion() );
     imgLabelIterEnd.GoToEnd() ;
 
@@ -189,8 +189,8 @@ SEMClassifier< TInputImage, TOutputImage >
   }
 }
 
-template <class TInputImage, class TOutputImage> 
-typename SEMClassifier< TInputImage, TOutputImage >::ClassLabelVectorType & 
+template <class TInputImage, class TOutputImage>
+typename SEMClassifier< TInputImage, TOutputImage >::ClassLabelVectorType &
 SEMClassifier< TInputImage, TOutputImage >
 ::GetClassLabels()
 {
@@ -201,7 +201,7 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 typename SEMClassifier< TInputImage, TOutputImage >::ProportionVectorType*
 SEMClassifier< TInputImage, TOutputImage >
-::GetProportions() 
+::GetProportions()
 {
   return &m_Proportions ;
 }
@@ -209,17 +209,17 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 void
 SEMClassifier< TInputImage, TOutputImage >
-::SetSample ( const TInputImage* sample ) 
+::SetSample ( const TInputImage* sample )
 {
   m_Sample = sample ;
   m_NbSamples = 0;
   m_SampleList = SampleType::New();
   m_SampleList->SetMeasurementVectorSize( m_Sample->GetVectorLength() );
-  
-  itk::ImageRegionIterator< TInputImage > imgIter ( (TInputImage *) m_Sample, 
+
+  itk::ImageRegionIterator< TInputImage > imgIter ( (TInputImage *) m_Sample,
                           m_Sample->GetBufferedRegion() );
   imgIter.GoToBegin();
-  itk::ImageRegionIterator< TInputImage > imgIterEnd ( (TInputImage *) m_Sample, 
+  itk::ImageRegionIterator< TInputImage > imgIterEnd ( (TInputImage *) m_Sample,
                           m_Sample->GetBufferedRegion() );
   imgIterEnd.GoToEnd();
 
@@ -233,7 +233,7 @@ SEMClassifier< TInputImage, TOutputImage >
   {
     typename TInputImage::SizeType size = m_Sample->GetBufferedRegion().GetSize();
     if ( ( size[0] * size[1] ) != m_ClassLabels.size() )
-      throw itk::ExceptionObject( __FILE__, __LINE__, 
+      throw itk::ExceptionObject( __FILE__, __LINE__,
                     "Vector size missmatch", ITK_LOCATION );
   }
 }
@@ -241,7 +241,7 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 const TInputImage *
 SEMClassifier< TInputImage, TOutputImage >
-::GetSample() const 
+::GetSample() const
 {
   return m_Sample ;
 }
@@ -249,13 +249,13 @@ SEMClassifier< TInputImage, TOutputImage >
 template< class TInputImage, class TOutputImage >
 typename SEMClassifier< TInputImage, TOutputImage >::SampleType *
 SEMClassifier< TInputImage, TOutputImage >
-::GetSampleList() const 
+::GetSampleList() const
 {
   return m_SampleList ;
 }
 
 template< class TInputImage, class TOutputImage >
-int 
+int
 SEMClassifier< TInputImage, TOutputImage >
 ::GetCurrentIteration()
 {
@@ -291,7 +291,7 @@ SEMClassifier< TInputImage, TOutputImage >
 
   if ( m_ComponentDeclared == 1 )
     otbMsgDebugMacro( << "Previous component declarations will be lost since called before SetNumberOfClasses" );
-  
+
   m_ComponentDeclared = 0;
 }
 
@@ -324,7 +324,7 @@ SEMClassifier< TInputImage, TOutputImage >
     {
       int label;
       for ( typename ClassLabelVectorType::iterator labelIter = m_ClassLabels.begin();
-          labelIter != m_ClassLabels.end(); 
+          labelIter != m_ClassLabels.end();
           ++labelIter )
       {
         //label = (int) floor( 0.5 + nbClassesDbl * ran / double(RAND_MAX+1) );
@@ -347,7 +347,7 @@ SEMClassifier< TInputImage, TOutputImage >
 
       if ( sumProportion != 1.0 )
       {
-        for ( iterProportion = m_InitialProportions.begin(); 
+        for ( iterProportion = m_InitialProportions.begin();
             iterProportion != m_InitialProportions.end();
             ++iterProportion )
           *iterProportion /= sumProportion;
@@ -357,16 +357,16 @@ SEMClassifier< TInputImage, TOutputImage >
       double sample;
       double cumulativeProportion;
       for ( typename ClassLabelVectorType::iterator labelIter = m_ClassLabels.begin();
-          labelIter != m_ClassLabels.end(); 
+          labelIter != m_ClassLabels.end();
           ++labelIter )
       {
         cumulativeProportion = 0.0;
         sample = double( rand() ) / ( double( RAND_MAX) + 1.0 );
-        
+
         *labelIter = m_NbClasses-1;
         for ( int componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
         {
-          if ( cumulativeProportion <= sample 
+          if ( cumulativeProportion <= sample
               && sample < cumulativeProportion + m_InitialProportions[componentIndex] )
           {
             *labelIter = componentIndex;
@@ -378,18 +378,18 @@ SEMClassifier< TInputImage, TOutputImage >
       }
     }
   }
-  
+
   m_Proportions.resize( m_NbClasses );
   m_Proba.resize( m_NbClasses );
   for ( int i = 0; i < m_NbClasses; i++ )
     m_Proba[i].resize( m_NbSamples );
-  
+
   if ( !m_ComponentDeclared )
   {
-    otbMsgDebugMacro( << "default mixture initialisation with " << m_NbClasses 
+    otbMsgDebugMacro( << "default mixture initialisation with " << m_NbClasses
         << " Gaussian components" );
     typedef otb::Statistics::GaussianModelComponent< ClassSampleType > GaussianType;
-    
+
     for ( int componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
       AddComponent( componentIndex, GaussianType::New() );
   }
@@ -412,22 +412,22 @@ SEMClassifier< TInputImage, TOutputImage >
 
   int posSample = 0;
   for ( typename ClassLabelVectorType::iterator iter = m_ClassLabels.begin();
-      iter != m_ClassLabels.end(); 
+      iter != m_ClassLabels.end();
       ++iter )
   {
-    x = double( rand() ) / ( double(RAND_MAX) + 1.0 ); 
+    x = double( rand() ) / ( double(RAND_MAX) + 1.0 );
     z = 0.0;
-    
+
     for ( int componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
     {
       y = z;
       z += m_Proba[componentIndex][posSample];
-    
+
       if ( ( y < x ) && ( x <= z ) )
       {
         if ( static_cast<unsigned int>(componentIndex) != *iter )
           m_NbChange++;
-          
+
         *iter = componentIndex;
         break;
       }
@@ -437,11 +437,11 @@ SEMClassifier< TInputImage, TOutputImage >
 
   switch ( GetCurrentIteration() )
   {
-    case 0 : case 1 : 
+    case 0 : case 1 :
       otbMsgDebugMacro( << "Doing iteration " << GetCurrentIteration() );
       break;
     default :
-      otbMsgDebugMacro( << m_NbChange << " sample change at iteration " 
+      otbMsgDebugMacro( << m_NbChange << " sample change at iteration "
                 << GetCurrentIteration() );
   }
 }
@@ -460,7 +460,7 @@ SEMClassifier< TInputImage, TOutputImage >
   for ( componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
   {
     coeffByClass.push_back( ClassSampleType::New() );
-    coeffByClass[ componentIndex ]->SetMeasurementVectorSize( 
+    coeffByClass[ componentIndex ]->SetMeasurementVectorSize(
       m_SampleList->GetMeasurementVectorSize() );
     coeffByClass[ componentIndex ]->SetSample( m_SampleList );
   }
@@ -472,13 +472,13 @@ SEMClassifier< TInputImage, TOutputImage >
   ClassLabelVectorType::iterator lastLabel = m_ClassLabels.end() ;
 
   typename SampleType::InstanceIdentifier id = 0;
-  
+
   do {
     coeffByClass[ *iterLabel ]->AddInstance( id );
     m_Proportions[ *iterLabel ] += 1.0;
     id++;
   } while ( ++iterSample != lastSample && ++iterLabel != lastLabel );
-  
+
   for ( componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
   {
     if ( m_Proportions[ componentIndex ] == 0.0 )
@@ -496,8 +496,8 @@ SEMClassifier< TInputImage, TOutputImage >
   for ( componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
     m_Proportions[componentIndex] /= static_cast<double> ( m_NbSamples );
 
-}  
-  
+}
+
 template <class TInputImage, class TOutputImage >
 void
 SEMClassifier< TInputImage, TOutputImage >
@@ -508,7 +508,7 @@ SEMClassifier< TInputImage, TOutputImage >
   int componentIndex;
   double sumPdf, aPdf;
   double neighborhoodWeight = (double) m_Neighborhood * m_Neighborhood;
-  
+
   int line, cols;
   typename TInputImage::SizeType size = m_Sample->GetBufferedRegion().GetSize();
   cols = (int) size[0];
@@ -517,7 +517,7 @@ SEMClassifier< TInputImage, TOutputImage >
   std::vector< double > pdf ( m_NbClasses );
   std::vector< double > localWeight ( m_NbClasses );
   std::vector< double > localCount ( m_NbClasses );
-  
+
   typename SampleType::ConstIterator iterSample = m_SampleList->Begin() ;
   typename SampleType::ConstIterator lastSample = m_SampleList->End() ;
   MeasurementVectorType measurementVector;
@@ -532,7 +532,7 @@ SEMClassifier< TInputImage, TOutputImage >
 
     i = id / cols;
     j = id % cols;
-    
+
     for ( a = (i-voisinage); a <= (i+voisinage); a++ )
       for ( b = (j-voisinage); b <= (j+voisinage); b++ )
       {
@@ -544,27 +544,27 @@ SEMClassifier< TInputImage, TOutputImage >
 
         localCount[ m_ClassLabels[ a*cols+b ] ] += 1.0;
       }
-    
+
     for ( componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
-      localWeight[ componentIndex ] = localCount[ componentIndex ] 
+      localWeight[ componentIndex ] = localCount[ componentIndex ]
                         / neighborhoodWeight;
-    
+
     sumPdf = 0.0;
     for ( componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
     {
       measurementVector = iterSample.GetMeasurementVector();
-      aPdf = localWeight[ componentIndex ] 
+      aPdf = localWeight[ componentIndex ]
           * m_ComponentVector[componentIndex]->Pdf( measurementVector );
       sumPdf += aPdf;
       pdf[componentIndex] = aPdf;
     }
-      
+
     for ( componentIndex = 0; componentIndex < m_NbClasses; componentIndex++ )
     {
       if ( sumPdf == 0.0 )
         m_Proba[componentIndex][iterSample.GetInstanceIdentifier()] = 0.0;
       else
-        m_Proba[componentIndex][iterSample.GetInstanceIdentifier()] 
+        m_Proba[componentIndex][iterSample.GetInstanceIdentifier()]
             = pdf[componentIndex] / sumPdf;
     }
 
@@ -572,7 +572,7 @@ SEMClassifier< TInputImage, TOutputImage >
 }
 
 template < class TInputImage, class TOutputImage >
-void 
+void
 SEMClassifier< TInputImage, TOutputImage >
 ::GetMaximumAposterioriLabels ()
 {
@@ -581,7 +581,7 @@ SEMClassifier< TInputImage, TOutputImage >
   m_Output->SetSample( this->GetSampleList() ) ;
   m_Output->Resize( this->GetSampleList()->Size() ) ;
   m_Output->SetNumberOfClasses( m_NbClasses ) ;
-  
+
   // Image results classification
   m_OutputImage = TOutputImage::New();
   m_OutputImage->SetRegions( GetSample()->GetBufferedRegion() );
@@ -594,15 +594,15 @@ SEMClassifier< TInputImage, TOutputImage >
 
   typename OutputType::ConstIterator outputIter = m_Output->Begin() ;
   typename OutputType::ConstIterator outputIterEnd  = m_Output->End() ;
-  
-  typename itk::ImageRegionIterator< TOutputImage > imgOutputIter ( m_OutputImage, 
+
+  typename itk::ImageRegionIterator< TOutputImage > imgOutputIter ( m_OutputImage,
       m_OutputImage->GetBufferedRegion() );
   imgOutputIter.GoToBegin();
-  typename itk::ImageRegionIterator< TOutputImage > imgOutputIterEnd ( m_OutputImage, 
+  typename itk::ImageRegionIterator< TOutputImage > imgOutputIterEnd ( m_OutputImage,
       m_OutputImage->GetBufferedRegion() );
   imgOutputIterEnd.GoToEnd() ;
 
-  
+
   do {
     cluster = 0;
     for ( componentIndex = 1; componentIndex < m_NbClasses; componentIndex++ )
@@ -611,32 +611,32 @@ SEMClassifier< TInputImage, TOutputImage >
           > m_Proba[cluster][sampleIter.GetInstanceIdentifier()] )
         cluster = componentIndex;
     }
-    
+
     m_Output->AddInstance( cluster, sampleIter.GetInstanceIdentifier() ) ;
     imgOutputIter.Set( cluster );
-    
-  } while ( ++sampleIter != sampleIterEnd 
-        && ++outputIter != outputIterEnd 
+
+  } while ( ++sampleIter != sampleIterEnd
+        && ++outputIter != outputIterEnd
         && ++imgOutputIter != imgOutputIterEnd );
 }
 
 template< class TInputImage, class TOutputImage >
 void
 SEMClassifier< TInputImage, TOutputImage >
-::Update() 
+::Update()
 {
 
   InitParameters();
-  
+
   m_CurrentIteration = 0 ;
   m_TerminationCode = NOT_CONVERGED ;
 
   int oldNbChange = 0;
   double step;
-  
+
   do {
     oldNbChange = m_NbChange;
-    
+
     PerformStochasticProcess() ;
     PerformExpectationProcess();
     PerformMaximizationProcess();
@@ -644,7 +644,7 @@ SEMClassifier< TInputImage, TOutputImage >
     step = static_cast<double>( oldNbChange - m_NbChange );
     if ( step >= 0.0 )
     {
-      if ( ( step / static_cast<double>( m_NbSamples ) ) 
+      if ( ( step / static_cast<double>( m_NbSamples ) )
           < GetTerminationThreshold() )
       {
         m_TerminationCode = CONVERGED;
@@ -653,7 +653,7 @@ SEMClassifier< TInputImage, TOutputImage >
       }
     }
   } while (++m_CurrentIteration < m_MaximumIteration);
-  
+
   GetMaximumAposterioriLabels();
 }
 
diff --git a/Code/Learning/otbSOM.h b/Code/Learning/otbSOM.h
index 52fe3e9b14..eb18a3dd7b 100644
--- a/Code/Learning/otbSOM.h
+++ b/Code/Learning/otbSOM.h
@@ -9,11 +9,11 @@ Version:   $Revision$
 Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
-Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved. 
+Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
 See ITCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,21 +29,21 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /**
- * \class SOM 
- * \brief This class is responsible for the learning of a self organizing map from a 
+ * \class SOM
+ * \brief This class is responsible for the learning of a self organizing map from a
  * set of vector represented by the input image (each vector is a pixel of the image).
  *
  * The learning process iteratively select the best-response neuron for each input vector,
- * enhancing its response and the response of its neighbors with respect to a certain radius, 
+ * enhancing its response and the response of its neighbors with respect to a certain radius,
  * computed from an initial radius, and to a certain learning factor, decreasing at each iteration.
  *
  * The behavior of the neighborhood is given by a functor (templated) which parameter is the current
  * iteration. It returns a neighborhood of type \code SizeType \endcode.
  *
- * The behavior of the learning factor (hold by a beta variable) is given by an other functor 
+ * The behavior of the learning factor (hold by a beta variable) is given by an other functor
  * which parameter is the current iteration. It returns a beta value of type double.
  *
- * The SOMMap produced as output can be either initialized with a constant custom value or randomly 
+ * The SOMMap produced as output can be either initialized with a constant custom value or randomly
  * generated following a normal law. The seed for the random intialization can be modified.
  *
  * \sa SOMMap
@@ -51,10 +51,10 @@ namespace otb
  * \sa CzihoSOMLearningBehaviorFunctor
  * \sa CzihoSOMNeighborhoodBehaviorFunctor
  */
-template < class TListSample, class TMap, 
-		 class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor, 
+template < class TListSample, class TMap,
+		 class TSOMLearningBehaviorFunctor = Functor::CzihoSOMLearningBehaviorFunctor,
 		 class TSOMNeighborhoodBehaviorFunctor = Functor::CzihoSOMNeighborhoodBehaviorFunctor >
-class ITK_EXPORT SOM  
+class ITK_EXPORT SOM
 : public itk::ImageSource<TMap>
 {
   public:
@@ -63,7 +63,7 @@ class ITK_EXPORT SOM
   typedef itk::ImageSource<TMap>        Superclass;
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkNewMacro(Self);
   /** Runtime informations macro */
@@ -78,13 +78,13 @@ class ITK_EXPORT SOM
   typedef typename MapType::SizeType  SizeType;
   typedef typename MapType::RegionType RegionType;
   typedef typename MapType::Pointer MapPointerType;
-  
+
   typedef TSOMLearningBehaviorFunctor SOMLearningBehaviorFunctorType;
   typedef TSOMNeighborhoodBehaviorFunctor SOMNeighborhoodBehaviorFunctorType;
 
   /** Map dimension */
   itkStaticConstMacro(MapDimension,unsigned int, MapType::ImageDimension);
-  
+
   /** Accessors */
   itkSetMacro(NumberOfIterations,unsigned int);
   itkGetMacro(NumberOfIterations,unsigned int);
@@ -134,13 +134,13 @@ class ITK_EXPORT SOM
   /**
    * Step one iteration.
    */
-  virtual void Step(unsigned int currentIteration);  
+  virtual void Step(unsigned int currentIteration);
   /** PrintSelf method */
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   private:
-  SOM(const Self&); // purposely not implemented 
-  void operator=(const Self&); // purposely not implemented 
+  SOM(const Self&); // purposely not implemented
+  void operator=(const Self&); // purposely not implemented
   /** Size of the neurons map */
   SizeType m_MapSize;
   /** Number of iterations */
diff --git a/Code/Learning/otbSOM.txx b/Code/Learning/otbSOM.txx
index d3952afb78..39923c05a2 100644
--- a/Code/Learning/otbSOM.txx
+++ b/Code/Learning/otbSOM.txx
@@ -9,12 +9,12 @@ Version:   $Revision$
 Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
-Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved. 
+Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
 See ITCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,12 +31,12 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-/** 
- * Constructor 
+/**
+ * Constructor
  */
 template < class TListSample, class TMap,
 	class TSOMLearningBehaviorFunctor,
-	class TSOMNeighborhoodBehaviorFunctor >  
+	class TSOMNeighborhoodBehaviorFunctor >
 SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor>
 ::SOM()
 {
@@ -53,12 +53,12 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
   m_RandomInit=false;
   m_Seed=123574651;
 }
-/** 
- * Destructor 
+/**
+ * Destructor
  */
 template < class TListSample, class TMap,
 	class TSOMLearningBehaviorFunctor,
-	class TSOMNeighborhoodBehaviorFunctor > 
+	class TSOMNeighborhoodBehaviorFunctor >
 SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor>
 ::~SOM()
 {
@@ -82,7 +82,7 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
 	// typedefs
 	typedef itk::ImageRegionIteratorWithIndex<MapType> IteratorType;
 	typedef itk::ContinuousIndex<double,MapType::ImageDimension> ContinuousIndexType;
-	typedef itk::Statistics::EuclideanDistance<ContinuousIndexType> DistanceType; 
+	typedef itk::Statistics::EuclideanDistance<ContinuousIndexType> DistanceType;
 	typename DistanceType::Pointer distance = DistanceType::New();
 
 	// winner index in the map
@@ -102,14 +102,14 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
 	localRegion.Crop( map->GetLargestPossibleRegion() );
 	IteratorType it ( map, localRegion );
 
-	// Walk through the map, and evolve each neuron depending on its 
+	// Walk through the map, and evolve each neuron depending on its
 	// distance to the winner.
 	for(it.GoToBegin();!it.IsAtEnd();++it)
 	{
 		NeuronType tempNeuron = it.Get();
 		NeuronType newNeuron ( tempNeuron.Size() );
 		double tempBeta = beta
-						/ ( 1 + 
+						/ ( 1 +
 							distance->Evaluate( ContinuousIndexType(position),
 												ContinuousIndexType(it.GetIndex()) ) );
 
@@ -129,22 +129,22 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
 template < class TListSample, class TMap,
 	class TSOMLearningBehaviorFunctor,
 	class TSOMNeighborhoodBehaviorFunctor >
-void 
+void
 SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor>
 ::Step(unsigned int currentIteration)
-{  
+{
 	// Compute the new learning coefficient
-	double newBeta = m_BetaFunctor( 
+	double newBeta = m_BetaFunctor(
 						currentIteration, m_NumberOfIterations, m_BetaInit, m_BetaEnd );
 
 	// Compute the new neighborhood size
-	SizeType newSize = m_NeighborhoodSizeFunctor( 
+	SizeType newSize = m_NeighborhoodSizeFunctor(
 						currentIteration, m_NumberOfIterations, m_NeighborhoodSizeInit );
 
 	// update the neurons map with each example of the training set.
 	otbMsgDebugMacro(<<"Beta: "<<newBeta<<", radius: "<<newSize);
 	for ( typename ListSampleType::Iterator it = m_ListSample->Begin();
-			it != m_ListSample->End(); 
+			it != m_ListSample->End();
 			++it )
 	{
 		UpdateMap( it.GetMeasurementVector(), newBeta, newSize );
@@ -185,14 +185,14 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
 {
 	if ( this->GetNumberOfOutputs() != 1 )
 		itkExceptionMacro( << "Number of output image should be 1" );
-	
+
 	// output neuron map fill
 	MapPointerType map = this->GetOutput(0);
 	map->Allocate();
-} 
+}
 
-/** 
- * Main computation method 
+/**
+ * Main computation method
  */
 template < class TListSample, class TMap,
 	class TSOMLearningBehaviorFunctor,
@@ -226,7 +226,7 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
 			}
 			it.Set(neuronInit);
 		}
-	}  
+	}
 	else
 	{
 		NeuronType neuronInit ( m_ListSample->GetMeasurementVectorSize() );
@@ -244,13 +244,13 @@ SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor
 
 	this->AfterThreadedGenerateData();
 }
-/** 
- *PrintSelf method 
+/**
+ *PrintSelf method
  */
 template < class TListSample, class TMap,
 	class TSOMLearningBehaviorFunctor,
 	class TSOMNeighborhoodBehaviorFunctor >
-void 
+void
 SOM<TListSample,TMap,TSOMLearningBehaviorFunctor,TSOMNeighborhoodBehaviorFunctor>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/Learning/otbSOMActivationBuilder.h b/Code/Learning/otbSOMActivationBuilder.h
index 826ae576da..b596b9b9e9 100644
--- a/Code/Learning/otbSOMActivationBuilder.h
+++ b/Code/Learning/otbSOMActivationBuilder.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,10 +23,10 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class SOMActivationBuilder
- *  \brief This class takes a self organizing map and an input vector image, and 
+ *  \brief This class takes a self organizing map and an input vector image, and
  *  produce a map counting the number of activation for each vector in the SOM map.
  *
- * SOM map can be set via the SetInput method, and vector image via the SetVectorSet 
+ * SOM map can be set via the SetInput method, and vector image via the SetVectorSet
  * method.
  *
  * \sa SOMMap
@@ -48,7 +48,7 @@ class ITK_EXPORT SOMActivationBuilder
 
   /** Runtime information macro */
   itkTypeMacro(SOMActivationBuilder,ImageToImageFilter);
-  
+
   /** Template related typedefs */
   typedef TListSample ListSampleType;
   typedef TOutputImage OutputImageType;
@@ -76,8 +76,8 @@ class ITK_EXPORT SOMActivationBuilder
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
  private:
-  SOMActivationBuilder(const Self&); // purposely not implemented 
-  void operator=(const Self&);// purposely not implemented 
+  SOMActivationBuilder(const Self&); // purposely not implemented
+  void operator=(const Self&);// purposely not implemented
   /** ListSample object */
   ListSamplePointerType m_ListSample;
 };
diff --git a/Code/Learning/otbSOMActivationBuilder.txx b/Code/Learning/otbSOMActivationBuilder.txx
index 92dca161b6..3e0cb8da55 100644
--- a/Code/Learning/otbSOMActivationBuilder.txx
+++ b/Code/Learning/otbSOMActivationBuilder.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -40,18 +40,18 @@ template <class TInputImage, class TInputMap, class TOutputImage>
 SOMActivationBuilder<TInputImage,TInputMap,TOutputImage>
 ::~SOMActivationBuilder()
 {}
-/** 
- * Main computation method 
+/**
+ * Main computation method
  */
 template <class TInputImage, class TInputMap, class TOutputImage>
-void 
+void
 SOMActivationBuilder<TInputImage,TInputMap,TOutputImage>
 ::GenerateData(void)
 {
   // Retrieve the inputs and output pointers
   InputMapType *  map = const_cast<InputMapType*>(this->GetInput());
   OutputImagePointerType output = this->GetOutput();
-  
+
   // output initialisation
   output->SetRegions(map->GetLargestPossibleRegion());
   output->Allocate();
@@ -74,11 +74,11 @@ SOMActivationBuilder<TInputImage,TInputMap,TOutputImage>
       outIt.Set(outIt.Get()+1);
     }
 }
-/** 
- *PrintSelf method 
+/**
+ *PrintSelf method
  */
 template <class TInputImage, class TInputMap, class TOutputImage>
-void 
+void
 SOMActivationBuilder<TInputImage,TInputMap,TOutputImage>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/Learning/otbSOMClassifier.h b/Code/Learning/otbSOMClassifier.h
index 8c17ae42f5..931e3cd645 100644
--- a/Code/Learning/otbSOMClassifier.h
+++ b/Code/Learning/otbSOMClassifier.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,16 +21,16 @@
 #include "itkProcessObject.h"
 #include "itkMembershipSample.h"
 
-namespace otb{ 
+namespace otb{
 
-/** \class SOMClassifier 
+/** \class SOMClassifier
  *  \brief This class implements a SOM-Based classifier.
  *
- * The classifier iterates on the input list sample, feeding 
- * the output membership sample with the one-dimensionnal index 
- * of the winner neuron. 
+ * The classifier iterates on the input list sample, feeding
+ * the output membership sample with the one-dimensionnal index
+ * of the winner neuron.
  *
- * Since this classifier differs from the base framework of itk in that it 
+ * Since this classifier differs from the base framework of itk in that it
  * does not use DecisionRule and Memberships function, it derives from itk::ProcessObject
  * instead of itk::SampleClassifierBase.
  *
@@ -38,7 +38,7 @@ namespace otb{
  */
 
 template< class TSample, class TSOMMap, class TLabel>
-class ITK_EXPORT SOMClassifier : 
+class ITK_EXPORT SOMClassifier :
       public itk::ProcessObject
 {
 public:
@@ -66,7 +66,7 @@ public:
   /** Output typedefs */
   typedef itk::Statistics::MembershipSample<SampleType> OutputType;
   typedef typename OutputType::Pointer OutputPointerType;
-  
+
   /** Label type typedef */
   typedef TLabel ClassLabelType;
 
@@ -93,7 +93,7 @@ protected:
   SamplePointerType m_Sample;
   /// The output membership sample.
   OutputPointerType m_Output;
- 
+
 } ; // end of class
 } // end of namespace otb
 
diff --git a/Code/Learning/otbSOMClassifier.txx b/Code/Learning/otbSOMClassifier.txx
index 1b060f29fc..6caac331fd 100644
--- a/Code/Learning/otbSOMClassifier.txx
+++ b/Code/Learning/otbSOMClassifier.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,9 +21,9 @@
 #include "otbSOMClassifier.h"
 #include "otbMacro.h"
 
-namespace otb{ 
+namespace otb{
 /**
- * Constructor 
+ * Constructor
  */
 template< class TSample, class TSOMMap, class TLabel >
 SOMClassifier< TSample, TSOMMap, TLabel >
@@ -47,7 +47,7 @@ SOMClassifier< TSample, TSOMMap, TLabel >
 {
   return dynamic_cast<SOMMapType *>(this->itk::ProcessObject::GetInput(0));
 }
-/** 
+/**
  * SOMMap Setter.
  */
 template< class TSample, class TSOMMap, class TLabel >
@@ -85,29 +85,29 @@ SOMClassifier< TSample, TSOMMap, TLabel >
      numberOfClasses*=size[i];
    }
   outputPtr->SetNumberOfClasses(numberOfClasses) ;
- 
+
   typename TSample::Iterator iter = this->GetSample()->Begin() ;
   typename TSample::Iterator end  = this->GetSample()->End() ;
 
-  
+
   typename OutputType::ConstIterator iterO = outputPtr->Begin() ;
   typename OutputType::ConstIterator endO  = outputPtr->End() ;
   typename TSample::MeasurementVectorType measurements ;
-  
+
   typename SOMMapType::IndexType index;
-  
+
   SOMMapPointerType somMap = this->GetMap();
 
    otbMsgDebugMacro(  << "Starting iterations " );
   while (iter != end && iterO != endO)
     {
-    
+
     measurements = iter.GetMeasurementVector() ;
     index = somMap->GetWinner(measurements);
     ClassLabelType classLabel = static_cast<ClassLabelType>((index[1]*size[1])+index[0]);
-    outputPtr->AddInstance(classLabel, iterO.GetInstanceIdentifier()) ; 
+    outputPtr->AddInstance(classLabel, iterO.GetInstanceIdentifier()) ;
     ++iter;
-    ++iterO;    
+    ++iterO;
     }
 }
 } // end of namespace otb
diff --git a/Code/Learning/otbSOMImageClassificationFilter.h b/Code/Learning/otbSOMImageClassificationFilter.h
index 242d0b2388..b2c4cb09e1 100644
--- a/Code/Learning/otbSOMImageClassificationFilter.h
+++ b/Code/Learning/otbSOMImageClassificationFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -47,10 +47,10 @@ namespace otb
     typedef itk::InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
     typedef itk::SmartPointer<Self>                           Pointer;
     typedef itk::SmartPointer<const Self>                     ConstPointer;
-    
+
     /** Type macro */
     itkNewMacro(Self);
-    
+
     /** Creation through object factory macro */
     itkTypeMacro(SOMImageClassificationFilter,InPlaceImageFilter);
 
@@ -75,7 +75,7 @@ namespace otb
     typedef typename ListSampleType::Pointer                             ListSamplePointerType;
     typedef otb::SOMClassifier<ListSampleType,SOMMapType,LabelType>      ClassifierType;
     typedef typename ClassifierType::Pointer                             ClassifierPointerType;
-    
+
     /** Set/Get the svm model */
     itkSetObjectMacro(Map,SOMMapType);
     itkGetObjectMacro(Map,SOMMapType);
@@ -108,7 +108,7 @@ namespace otb
     virtual void BeforeThreadedGenerateData();
     /**PrintSelf method */
     virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
     private:
     SOMImageClassificationFilter(const Self&); //purposely not implemented
     void operator=(const Self&); //purposely not implemented
diff --git a/Code/Learning/otbSOMImageClassificationFilter.txx b/Code/Learning/otbSOMImageClassificationFilter.txx
index 8b7f4aae5f..99902238b4 100644
--- a/Code/Learning/otbSOMImageClassificationFilter.txx
+++ b/Code/Learning/otbSOMImageClassificationFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -80,9 +80,9 @@ SOMImageClassificationFilter<TInputImage,TOutputImage,TSOMMap,TMaskImage>
   typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
   typedef itk::ImageRegionConstIterator<MaskImageType> MaskIteratorType;
   typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
-  
+
   ListSamplePointerType listSample = ListSampleType::New();
-  
+
   InputIteratorType inIt(inputPtr,outputRegionForThread);
 
   MaskIteratorType maskIt;
@@ -119,13 +119,13 @@ SOMImageClassificationFilter<TInputImage,TOutputImage,TSOMMap,TMaskImage>
   classifier->SetMap(m_Map);
   classifier->SetSample(listSample);
   classifier->Update();
-  
+
   typename ClassifierType::OutputType::Pointer membershipSample = classifier->GetOutput();
   typename ClassifierType::OutputType::ConstIterator sampleIter = membershipSample->Begin();
   typename ClassifierType::OutputType::ConstIterator sampleLast = membershipSample->End();
-  
+
   OutputIteratorType outIt(outputPtr,outputRegionForThread);
-  
+
   outIt.GoToBegin();
 
   while(!outIt.IsAtEnd()&&(sampleIter!=sampleLast))
diff --git a/Code/Learning/otbSOMLearningBehaviorFunctor.h b/Code/Learning/otbSOMLearningBehaviorFunctor.h
index cd3bbe7e5d..2d622da4d4 100644
--- a/Code/Learning/otbSOMLearningBehaviorFunctor.h
+++ b/Code/Learning/otbSOMLearningBehaviorFunctor.h
@@ -9,11 +9,11 @@ Version:   $Revision$
 Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
-Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved. 
+Copyright (c) Institut Telecom ; Telecom bretagne. All rights reserved.
 See ITCopyright.txt for details.
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,12 +30,12 @@ namespace Functor {
 	* \brief Classical Beta behavior over SOM training phase
 	*
 	*	This class implements an standart evolution of the \f$ \beta \f$ weightening
-	*	coefficient over the SOM training. 
+	*	coefficient over the SOM training.
 	*
 	*	\f$
 		\beta = \beta_0 + \left( \beta_{\textrm{end}} - \beta_0 \right)
 			\frac{t}{t_{\textrm{end}}}
-		\f$ 
+		\f$
 	*
 	*	\sa SOM
 	*/
@@ -47,7 +47,7 @@ namespace Functor {
 			virtual ~CzihoSOMLearningBehaviorFunctor() { }
 
 			/** Functor */
-			virtual double operator() ( unsigned int currentIteration, 
+			virtual double operator() ( unsigned int currentIteration,
 										unsigned int numberOfIterations,
 										double betaInit, double betaEnd )
 			{
@@ -64,4 +64,4 @@ namespace Functor {
 
 #endif
 
-					
+
diff --git a/Code/Learning/otbSOMMap.h b/Code/Learning/otbSOMMap.h
index d57bd2efb4..45d4fb8185 100644
--- a/Code/Learning/otbSOMMap.h
+++ b/Code/Learning/otbSOMMap.h
@@ -13,8 +13,8 @@ Copyright (c) Institut Telecom ; Telecom Bretagne. All right reserved.
 See GETCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -39,16 +39,16 @@ namespace otb
  * Thanks to the extensiong of the Image object, reading and writing is supported through standard image
  * readers and writers.
  *
- * The training is done via the SOM class, and the activation map can be produced with the SOMActivationBuilder 
+ * The training is done via the SOM class, and the activation map can be produced with the SOMActivationBuilder
  * class.
  *
  * \sa SOM
  * \sa SOMActivationBuilder
  */
-template <class TNeuron=itk::VariableLengthVector<double>, 
+template <class TNeuron=itk::VariableLengthVector<double>,
           class TDistance=itk::Statistics::EuclideanDistance<TNeuron>,
-		  unsigned int VMapDimension=2>  
-class ITK_EXPORT SOMMap  
+		  unsigned int VMapDimension=2>
+class ITK_EXPORT SOMMap
 : public otb::VectorImage<typename TNeuron::ComponentType,VMapDimension>
 {
   public:
@@ -57,20 +57,20 @@ class ITK_EXPORT SOMMap
   typedef otb::VectorImage<typename TNeuron::ComponentType,VMapDimension>  Superclass;
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkNewMacro(Self);
-  /** 
+  /**
    * There is no runtime informations macro since
-   * this class has to be considered to as a simple VectorImage 
+   * this class has to be considered to as a simple VectorImage
    * // itkTypeMacro(SOMMap,VectorImage);
    * */
-  
+
   /** Template parameters related typedefs */
   typedef TNeuron NeuronType;
   typedef TDistance DistanceType;
   typedef typename DistanceType::Pointer DistancePointerType;
-  
+
   /** Superclass related typedefs */
   typedef typename Superclass::IndexType IndexType;
   typedef typename Superclass::SizeType SizeType;
@@ -84,7 +84,7 @@ class ITK_EXPORT SOMMap
    * \return The index of the winning neuron.
    */
   IndexType GetWinner(const NeuronType& sample);
-  
+
   protected:
   /** Constructor */
   SOMMap();
@@ -92,10 +92,10 @@ class ITK_EXPORT SOMMap
   virtual ~SOMMap();
   /** PrintSelf method */
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
   private:
-  SOMMap(const Self&); // purposely not implemented 
-  void operator=(const Self&); // purposely not implemented 
+  SOMMap(const Self&); // purposely not implemented
+  void operator=(const Self&); // purposely not implemented
 };
 } // end namespace otb
 
diff --git a/Code/Learning/otbSOMMap.txx b/Code/Learning/otbSOMMap.txx
index e5aa964299..03a2bec0fb 100644
--- a/Code/Learning/otbSOMMap.txx
+++ b/Code/Learning/otbSOMMap.txx
@@ -13,8 +13,8 @@ Copyright (c) Institut Telecom ; Telecom Bretagne. All right reserved.
 See GETCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,14 +28,14 @@ namespace otb
 /**
  * Constructor
  */
-template <class TNeuron, class TDistance,unsigned int VMapDimension>  
+template <class TNeuron, class TDistance,unsigned int VMapDimension>
 SOMMap<TNeuron,TDistance,VMapDimension>
 ::SOMMap()
 {}
 /**
  * Destructor
  */
-template <class TNeuron, class TDistance,unsigned int VMapDimension>  
+template <class TNeuron, class TDistance,unsigned int VMapDimension>
 SOMMap<TNeuron,TDistance,VMapDimension>
 ::~SOMMap()
 {}
@@ -44,9 +44,9 @@ SOMMap<TNeuron,TDistance,VMapDimension>
  * \param the sample.
  * \return The index of the winning neuron.
  */
-template <class TNeuron,class TDistance, unsigned int VMapDimension>  
+template <class TNeuron,class TDistance, unsigned int VMapDimension>
 typename SOMMap<TNeuron,TDistance,VMapDimension>
-:: IndexType 
+:: IndexType
 SOMMap<TNeuron,TDistance,VMapDimension>
 ::GetWinner(const NeuronType& sample)
 {
@@ -56,15 +56,15 @@ SOMMap<TNeuron,TDistance,VMapDimension>
   // Define the euclidean distance used to compute the neural response
   DistancePointerType activation = DistanceType::New();
 
-  // Define the iterator used to walk through the map  
+  // Define the iterator used to walk through the map
   IteratorType it(this,this->GetLargestPossibleRegion());
   it.GoToBegin();
-  
+
   // Define the minimum distance and position
   IndexType minPos = it.GetIndex();
 
   double minDistance = activation->Evaluate(sample,it.Get());
- 
+
   // Iterate through the map to get the minimum distance position
   for(;!it.IsAtEnd();++it)
     {
diff --git a/Code/Learning/otbSVMClassifier.h b/Code/Learning/otbSVMClassifier.h
index db48496fed..97382233a6 100644
--- a/Code/Learning/otbSVMClassifier.h
+++ b/Code/Learning/otbSVMClassifier.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,13 +22,13 @@
 #include "otbSVMModel.h"
 #include "itkVectorImage.h"
 
-namespace otb{ 
+namespace otb{
 
-/** \class SVMClassifier 
+/** \class SVMClassifier
  *  \brief SVM-based classifier
  *
- * The first template argument is the type of the target sample data 
- * that this classifier will assign a class label for each measurement 
+ * The first template argument is the type of the target sample data
+ * that this classifier will assign a class label for each measurement
  * vector. The second one is the pixel type of the labels to be
  * produced by the classifier.
  *
@@ -37,16 +37,16 @@ namespace otb{
  * target sample data).
  *
  * The classification result is stored in a vector of Subsample object.
- * Each class has its own class sample (Subsample object) that has 
- * InstanceIdentifiers for all measurement vectors belong to the class. 
+ * Each class has its own class sample (Subsample object) that has
+ * InstanceIdentifiers for all measurement vectors belong to the class.
  * The InstanceIdentifiers come from the target sample data. Therefore,
- * the Subsample objects act as separate class masks. 
+ * the Subsample objects act as separate class masks.
  *
  *
  */
 
 template< class TSample, class TLabel >
-class ITK_EXPORT SVMClassifier : 
+class ITK_EXPORT SVMClassifier :
       public itk::Statistics::SampleClassifier< TSample >
 {
 public:
@@ -69,9 +69,9 @@ public:
   /*typedef typename itk::NumericTraits<TSample::ValueType>::RealType
    InputPixelType ;*/
   typedef typename TSample::MeasurementVectorType::ValueType InputPixelType ;
-  
+
   /** typedefs from Superclass */
-  typedef typename Superclass::MembershipFunctionPointerVector 
+  typedef typename Superclass::MembershipFunctionPointerVector
     MembershipFunctionPointerVector ;
 
   /** typedef for label type */
@@ -85,10 +85,10 @@ public:
   /** Type definitions for the SVM Model. */
   typedef SVMModel< InputPixelType, TLabel >   SVMModelType;
   typedef typename SVMModelType::Pointer     SVMModelPointer;
-  
+
   /** Set the model */
   itkSetMacro(Model, SVMModelPointer);
-  
+
   /** Get the number of classes. */
   itkGetConstReferenceMacro(Model, SVMModelPointer);
 
diff --git a/Code/Learning/otbSVMClassifier.txx b/Code/Learning/otbSVMClassifier.txx
index e64a1483b8..d0031a09a2 100644
--- a/Code/Learning/otbSVMClassifier.txx
+++ b/Code/Learning/otbSVMClassifier.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@
 #include "otbSVMClassifier.h"
 #include "otbMacro.h"
 
-namespace otb{ 
+namespace otb{
 
 template< class TSample, class TLabel >
 SVMClassifier< TSample, TLabel >
@@ -60,10 +60,10 @@ SVMClassifier< TSample, TLabel >
 
   m_Output->Resize( this->GetSample()->Size() ) ;
 
-  
+
   otbMsgDevMacro(  << "Resize to " << this->GetSample()->Size() );
   otbMsgDevMacro(  << "Resize to " << m_Output->GetSample()->Size() );
-  
+
   //std::vector< double > discriminantScores ;
   unsigned int numberOfClasses = this->GetNumberOfClasses() ;
   otbMsgDevMacro(  << "NbClass " << numberOfClasses );
@@ -73,18 +73,18 @@ SVMClassifier< TSample, TLabel >
   m_Output->SetNumberOfClasses(numberOfClasses) ;
 
 
-/*typename Superclass::DecisionRuleType::Pointer rule = 
+/*typename Superclass::DecisionRuleType::Pointer rule =
     this->GetDecisionRule() ;*/
   otbMsgDevMacro(  << "Do Classif "  );
   this->DoClassification();
-  otbMsgDevMacro(  << "End of classif" );  
+  otbMsgDevMacro(  << "End of classif" );
 
 }
 
 template< class TSample, class TLabel >
 typename SVMClassifier< TSample, TLabel >::OutputType*
 SVMClassifier< TSample, TLabel >
-::GetOutput() 
+::GetOutput()
 {
   return m_Output ;
 }
@@ -92,7 +92,7 @@ SVMClassifier< TSample, TLabel >
 template< class TSample, class TLabel >
 void
 SVMClassifier< TSample, TLabel >
-::SetOutput( OutputType * output ) 
+::SetOutput( OutputType * output )
 {
   m_Output = output;
 }
@@ -113,7 +113,7 @@ SVMClassifier< TSample, TLabel >
 
 
   int numberOfComponentsPerSample  = iter.GetMeasurementVector().Size() ;//this->GetSample().GetMeasurementVectorSize();//
- 
+
   struct svm_node *x;
   bool predict_probability = 1;
 
@@ -144,8 +144,8 @@ SVMClassifier< TSample, TLabel >
 
   int *labels=(int *) malloc(nr_class*sizeof(int));
   double *prob_estimates=NULL;
-  
-  if(predict_probability) 
+
+  if(predict_probability)
     {
     if (svm_type==NU_SVR || svm_type==EPSILON_SVR)
       printf("Prob. model for test data: target value = predicted value + z,\nz: Laplace distribution e^(-|z|/sigma)/(2sigma),sigma=%g\n",svm_get_svr_probability(model));
@@ -161,7 +161,7 @@ SVMClassifier< TSample, TLabel >
   otbMsgDevMacro(  << "Starting iterations " );
   while (iter != end && iterO != endO)
     {
-    
+
     int i = 0;
     double v;
 
@@ -171,7 +171,7 @@ SVMClassifier< TSample, TLabel >
       {
       x[i].index = i+1 ;
       x[i].value = measurements[i];
-	
+
       }
     x[i].index = -1;
 
@@ -184,7 +184,7 @@ SVMClassifier< TSample, TLabel >
       {
       v = svm_predict(model,x);
       }
-    
+
 
     ClassLabelType classLabel;
     // Julien: Event if we support larger type for class labels,
@@ -195,7 +195,7 @@ SVMClassifier< TSample, TLabel >
 
   ++iter;
   ++iterO;
-        
+
 }
 
 if(predict_probability)
@@ -203,7 +203,7 @@ if(predict_probability)
   free(prob_estimates);
   free(labels);
   }
-  
+
 
 delete [] x;
 }
diff --git a/Code/Learning/otbSVMImageClassificationFilter.h b/Code/Learning/otbSVMImageClassificationFilter.h
index eab0c81b86..424e9c1ef4 100644
--- a/Code/Learning/otbSVMImageClassificationFilter.h
+++ b/Code/Learning/otbSVMImageClassificationFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -48,10 +48,10 @@ namespace otb
     typedef itk::InPlaceImageFilter<TInputImage,TOutputImage> Superclass;
     typedef itk::SmartPointer<Self>                           Pointer;
     typedef itk::SmartPointer<const Self>                     ConstPointer;
-    
+
     /** Type macro */
     itkNewMacro(Self);
-    
+
     /** Creation through object factory macro */
     itkTypeMacro(SVMImageClassificationFilter,InPlaceImageFilter);
 
@@ -81,7 +81,7 @@ namespace otb
     typedef typename ClassifierType::Pointer                   ClassifierPointerType;
     typedef SVMModel< ValueType, LabelType >                   ModelType;
     typedef typename ModelType::Pointer                        ModelPointerType;
-    
+
     /** Set/Get the svm model */
     itkSetObjectMacro(Model,ModelType);
     itkGetObjectMacro(Model,ModelType);
@@ -114,7 +114,7 @@ namespace otb
     virtual void BeforeThreadedGenerateData();
     /**PrintSelf method */
     virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
     private:
     SVMImageClassificationFilter(const Self&); //purposely not implemented
     void operator=(const Self&); //purposely not implemented
diff --git a/Code/Learning/otbSVMImageClassificationFilter.txx b/Code/Learning/otbSVMImageClassificationFilter.txx
index 6f066ebd36..20d63800db 100644
--- a/Code/Learning/otbSVMImageClassificationFilter.txx
+++ b/Code/Learning/otbSVMImageClassificationFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -80,9 +80,9 @@ SVMImageClassificationFilter<TInputImage,TOutputImage,VMaxSampleDimension,TMaskI
   typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
   typedef itk::ImageRegionConstIterator<MaskImageType> MaskIteratorType;
   typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
-  
+
   ListSamplePointerType listSample = ListSampleType::New();
-  
+
   InputIteratorType inIt(inputPtr,outputRegionForThread);
 
   MaskIteratorType maskIt;
@@ -91,7 +91,7 @@ SVMImageClassificationFilter<TInputImage,TOutputImage,VMaxSampleDimension,TMaskI
       maskIt = MaskIteratorType(inputMaskPtr,outputRegionForThread);
       maskIt.GoToBegin();
     }
-    
+
   unsigned int sampleSize = std::min(inputPtr->GetNumberOfComponentsPerPixel(),
 				     VMaxSampleDimension);
 
@@ -120,13 +120,13 @@ SVMImageClassificationFilter<TInputImage,TOutputImage,VMaxSampleDimension,TMaskI
   classifier->SetNumberOfClasses(m_Model->GetNumberOfClasses());
   classifier->SetSample(listSample);
   classifier->Update();
-  
+
   typename ClassifierType::OutputType::Pointer membershipSample = classifier->GetOutput();
   typename ClassifierType::OutputType::ConstIterator sampleIter = membershipSample->Begin();
   typename ClassifierType::OutputType::ConstIterator sampleLast = membershipSample->End();
-  
+
   OutputIteratorType outIt(outputPtr,outputRegionForThread);
-  
+
   outIt.GoToBegin();
 
   while(!outIt.IsAtEnd()&&(sampleIter!=sampleLast))
diff --git a/Code/Learning/otbSVMImageModelEstimator.h b/Code/Learning/otbSVMImageModelEstimator.h
index c3bf1227a0..15a51eec29 100644
--- a/Code/Learning/otbSVMImageModelEstimator.h
+++ b/Code/Learning/otbSVMImageModelEstimator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,10 +28,10 @@ namespace otb
 
 /** \class SVMImageModelEstimator
  * \brief Class for SVM model estimation from images used for classification.
- * 
+ *
  *
  * The basic functionality of the SVMImageModelEstimator is to
- * generate the models used in SVM classification. It 
+ * generate the models used in SVM classification. It
  * requires input images and a training image to be provided by the
  * user.  This object supports data handling of multiband images. The
  * object accepts the input image in vector format only, where each
@@ -43,11 +43,11 @@ namespace otb
  *
  * EstimateModels() uses the libsvm library for SVM learning.
  *
- * \ingroup ClassificationFilters 
+ * \ingroup ClassificationFilters
  */
-template <class TInputImage, 
+template <class TInputImage,
           class TTrainingImage>
-class ITK_EXPORT SVMImageModelEstimator: 
+class ITK_EXPORT SVMImageModelEstimator:
 public SVMModelEstimator<ITK_TYPENAME TInputImage::InternalPixelType, ITK_TYPENAME TTrainingImage::PixelType>
     //public SVMModelEstimator<ITK_TYPENAME TInputImage::PixelType::ComponentType, ITK_TYPENAME TTrainingImage::PixelType>
 {
@@ -70,13 +70,13 @@ public:
   /** Type definition for the input image. */
     /** Type definitions for the training image. */
   typedef typename TInputImage::Pointer   InputImagePointer;
- 
+
   /** Type definitions for the training image. */
   typedef typename TTrainingImage::Pointer TrainingImagePointer;
-    
+
   /** Type definition for the vector associated with
-   * input image pixel type. */     
-  typedef typename TInputImage::PixelType InputImagePixelType;        
+   * input image pixel type. */
+  typedef typename TInputImage::PixelType InputImagePixelType;
 
   /** Type definitions for the vector holding
    * training image pixel type. */
@@ -90,7 +90,7 @@ public:
 
   /** Set the input image. */
   itkSetObjectMacro(InputImage,TInputImage);
-  
+
   /** Get the input image. */
   itkGetObjectMacro(InputImage,TInputImage);
 
@@ -103,7 +103,7 @@ public:
 
 
 
-protected: 
+protected:
   SVMImageModelEstimator();
   ~SVMImageModelEstimator();
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
diff --git a/Code/Learning/otbSVMImageModelEstimator.txx b/Code/Learning/otbSVMImageModelEstimator.txx
index a403f8b256..7c9a30a44e 100644
--- a/Code/Learning/otbSVMImageModelEstimator.txx
+++ b/Code/Learning/otbSVMImageModelEstimator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -67,7 +67,7 @@ SVMImageModelEstimator<TInputImage, TTrainingImage>
 {
 }
 
-template<class TInputImage, 
+template<class TInputImage,
          class TTrainingImage>
 SVMImageModelEstimator<TInputImage, TTrainingImage>
 ::~SVMImageModelEstimator(void)
@@ -77,12 +77,12 @@ SVMImageModelEstimator<TInputImage, TTrainingImage>
 /*
  * PrintSelf
  */
-template<class TInputImage, 
+template<class TInputImage,
          class TTrainingImage>
 void
 SVMImageModelEstimator<TInputImage, TTrainingImage>
 ::PrintSelf( std::ostream& os, itk::Indent indent ) const
-{  
+{
   Superclass::PrintSelf(os,indent);
 }// end PrintSelf
 
@@ -92,7 +92,7 @@ SVMImageModelEstimator<TInputImage, TTrainingImage>
  */
 
 
-template<class TInputImage, 
+template<class TInputImage,
          class TTrainingImage>
 void
 SVMImageModelEstimator<TInputImage,  TTrainingImage>
@@ -108,20 +108,20 @@ SVMImageModelEstimator<TInputImage,  TTrainingImage>
     throw itk::ExceptionObject(__FILE__, __LINE__,"Training and input image dimensions are not the same.",ITK_LOCATION);
     }
 
-  InputImageSizeType 
+  InputImageSizeType
     inputImageSize = inputImage->GetBufferedRegion().GetSize();
 
   typedef InputImageSizeType TrainingImageSizeType;
 
   TrainingImagePointer  trainingImage = this->GetTrainingImage();
 
-  TrainingImageSizeType 
-    trainingImageSize = trainingImage->GetBufferedRegion().GetSize();  
+  TrainingImageSizeType
+    trainingImageSize = trainingImage->GetBufferedRegion().GetSize();
 
   // Check if size of the two inputs are same
   for( unsigned int i = 0; i < TInputImage::ImageDimension; i++)
     {
-    if( inputImageSize[i] != trainingImageSize[i] ) throw itk::ExceptionObject(__FILE__, __LINE__,"Input image size is not the same as the training image size.",ITK_LOCATION); 
+    if( inputImageSize[i] != trainingImageSize[i] ) throw itk::ExceptionObject(__FILE__, __LINE__,"Input image size is not the same as the training image size.",ITK_LOCATION);
     }
 
 
@@ -139,7 +139,7 @@ SVMImageModelEstimator<TInputImage,  TTrainingImage>
   // Erase the vector contents
   this->m_Measures.resize(0);
   this->m_Labels.resize(0);
-  
+
 
 
 
diff --git a/Code/Learning/otbSVMKernels.h b/Code/Learning/otbSVMKernels.h
index c393a1c664..07a9dd73c5 100644
--- a/Code/Learning/otbSVMKernels.h
+++ b/Code/Learning/otbSVMKernels.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ class CustomKernelFunctor : public GenericKernelFunctorBase
     public:
   CustomKernelFunctor(): GenericKernelFunctorBase() { this->SetName("custom"); };
   virtual ~CustomKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       return ( dot(x, x) - 2.0 * dot( x, y) + dot(y, y) );
@@ -42,13 +42,13 @@ class CustomKernelFunctor : public GenericKernelFunctorBase
 class InvMultiQuadricKernelFunctor : public GenericKernelFunctorBase
   {
     public:
-  InvMultiQuadricKernelFunctor(): GenericKernelFunctorBase() 
+  InvMultiQuadricKernelFunctor(): GenericKernelFunctorBase()
     {
-      this->SetName("invMultiQuadric"); 
+      this->SetName("invMultiQuadric");
       this->SetValue<double>("const_coef", 1);
     };
   virtual ~InvMultiQuadricKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       CustomKernelFunctor custom;
@@ -65,18 +65,18 @@ class InvMultiQuadricKernelFunctor : public GenericKernelFunctorBase
 class KModKernelFunctor : public GenericKernelFunctorBase
   {
     public:
-  KModKernelFunctor(): GenericKernelFunctorBase() 
-    { 
-      this->SetName("KMod"); 
+  KModKernelFunctor(): GenericKernelFunctorBase()
+    {
+      this->SetName("KMod");
       this->SetValue<double>("const_coef", 1);
     };
   virtual ~KModKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       CustomKernelFunctor custom;
       double mq = this->GetValue<double>("const_coef") + custom(x, y, param);
-      
+
       if ( mq == 0.0 )
 	{
 	  return itk::NumericTraits<double>::max();
@@ -91,7 +91,7 @@ class SAMKernelFunctor : public GenericKernelFunctorBase
     public:
   SAMKernelFunctor(): GenericKernelFunctorBase() { this->SetName("SAM"); };
   virtual ~SAMKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       double den = dot(x, x) * dot(y, y);
@@ -110,7 +110,7 @@ class RadialSAMKernelFunctor : public GenericKernelFunctorBase
     public:
     RadialSAMKernelFunctor(): GenericKernelFunctorBase() { this->SetName("RadialSAM"); };
     virtual ~RadialSAMKernelFunctor() {};
-    
+
     virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
       {
 	SAMKernelFunctor sam;
@@ -122,18 +122,18 @@ class RadialSAMKernelFunctor : public GenericKernelFunctorBase
 class InvMultiQuadraticSAMKernelFunctor : public GenericKernelFunctorBase
   {
     public:
-  InvMultiQuadraticSAMKernelFunctor(): GenericKernelFunctorBase() 
-    { 
-      this->SetName("invMultiQuadraticSAM"); 
+  InvMultiQuadraticSAMKernelFunctor(): GenericKernelFunctorBase()
+    {
+      this->SetName("invMultiQuadraticSAM");
       this->SetValue<double>("const_coef", 1);
     };
   virtual ~InvMultiQuadraticSAMKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       SAMKernelFunctor sam;
       double mq = this->GetValue<double>("const_coef") + sam( x, y, param );
-      
+
       if ( mq == 0. )
 	{
 	  return itk::NumericTraits<double>::max();
@@ -146,18 +146,18 @@ class InvMultiQuadraticSAMKernelFunctor : public GenericKernelFunctorBase
 class KModSAMKernelFunctor : public GenericKernelFunctorBase
   {
   public:
-    KModSAMKernelFunctor(): GenericKernelFunctorBase() 
-      { 
-	this->SetName("KModSAM"); 
+    KModSAMKernelFunctor(): GenericKernelFunctorBase()
+      {
+	this->SetName("KModSAM");
 	this->SetValue<double>("const_coef", 1);
       };
     virtual ~KModSAMKernelFunctor() {};
-    
+
     virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
       {
 	SAMKernelFunctor sam;
 	double mq = this->GetValue<double>("const_coef") + sam( x, y, param );
-	
+
 	if ( mq == 0. )
 	  {
 	    return itk::NumericTraits<double>::max();
@@ -169,22 +169,22 @@ class KModSAMKernelFunctor : public GenericKernelFunctorBase
 class RBFKernelFunctor : public GenericKernelFunctorBase
   {
   public:
-    RBFKernelFunctor(): GenericKernelFunctorBase() 
-      { 
-	this->SetName("RBF"); 
+    RBFKernelFunctor(): GenericKernelFunctorBase()
+      {
+	this->SetName("RBF");
 	this->SetValue<double>("gamma_coef", 0.5);
       };
     virtual ~RBFKernelFunctor() {};
-      
+
     virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
       {
 	CustomKernelFunctor custom;
 	double res = this->GetValue<double>("gamma_coef") * custom( x, y, param );
-	
+
 	return vcl_exp(-res);
       }
-    
-    virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index, bool isAtEnd, double constValue)const 
+
+    virtual double derivative(const svm_node *x, const svm_node *y, const svm_parameter& param, int degree, int index, bool isAtEnd, double constValue)const
       {
 	double gamma = this->GetValue<double>("gamma_coef");
 	double kernelValue = 0.;
@@ -219,7 +219,7 @@ class RBFKernelFunctor : public GenericKernelFunctorBase
 		  ++ytemp;
 		else
 		  ++xtemp;
-	      }			
+	      }
 	  }
 
 	if (isAtEnd == true)
@@ -230,40 +230,40 @@ class RBFKernelFunctor : public GenericKernelFunctorBase
 	  {
 	    kernelValue = constValue;
 	  }
-	
+
 	if (degree < 0)
 	  {
 	    return 0;
 	  }
 	switch (degree)
 	  {
-	  case 0: 
-	    return kernelValue; 
+	  case 0:
+	    return kernelValue;
 	    break;
-	  case 1: 
-	    return (-2*gamma*(yval - xval)*kernelValue); 
+	  case 1:
+	    return (-2*gamma*(yval - xval)*kernelValue);
 	    break;
-	  default: 
-	    return (-2*gamma*((degree - 1) * this->derivative(x, y, param, degree-2, index, isAtEnd, constValue) + (yval - xval)* derivative(x, y, param, degree-1, index, isAtEnd, constValue))); 
+	  default:
+	    return (-2*gamma*((degree - 1) * this->derivative(x, y, param, degree-2, index, isAtEnd, constValue) + (yval - xval)* derivative(x, y, param, degree-1, index, isAtEnd, constValue)));
 	    break;
 	  }
-	
+
       }
 
 
 
   };
- 
+
 class RBFRBFSAMKernelFunctor : public GenericKernelFunctorBase
   {
     public:
-  RBFRBFSAMKernelFunctor(): GenericKernelFunctorBase() 
-    { 
-      this->SetName("RBFRBFSAM"); 
+  RBFRBFSAMKernelFunctor(): GenericKernelFunctorBase()
+    {
+      this->SetName("RBFRBFSAM");
       this->SetValue<double>("lin_coef", 1.);
     };
   virtual ~RBFRBFSAMKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       CustomKernelFunctor    custom;
@@ -277,14 +277,14 @@ class RBFRBFSAMKernelFunctor : public GenericKernelFunctorBase
 class PolyRBFSAMKernelFunctor : public GenericKernelFunctorBase
   {
     public:
-  PolyRBFSAMKernelFunctor(): GenericKernelFunctorBase() 
+  PolyRBFSAMKernelFunctor(): GenericKernelFunctorBase()
     {
       this->SetName("polyRBFSAM");
       this->SetValue<double>("const_coef", 1);
       this->SetValue<double>("lin_coef", 1);
     };
   virtual ~PolyRBFSAMKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       RadialSAMKernelFunctor radialSam;
@@ -300,12 +300,12 @@ class RBFDiffKernelFunctor : public GenericKernelFunctorBase
     public:
   RBFDiffKernelFunctor(): GenericKernelFunctorBase() { this->SetName("RBFDiff"); };
   virtual ~RBFDiffKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
 
       double total = 0.;
-     
+
        while (x->index != -1 && y->index != -1)
 	{
 	  if (x->index == y->index)
@@ -314,7 +314,7 @@ class RBFDiffKernelFunctor : public GenericKernelFunctorBase
 	      ++x;
 	      ++y;
 	    }
-	  else 
+	  else
 	    {
 	      if(x->index < y->index)
 		{
@@ -329,18 +329,18 @@ class RBFDiffKernelFunctor : public GenericKernelFunctorBase
        return total;
     }
   };
- 
+
 
 class CustomLinearKernelFunctor : public GenericKernelFunctorBase
   {
   public:
   CustomLinearKernelFunctor(): GenericKernelFunctorBase() { this->SetName("customLinear"); };
   virtual ~CustomLinearKernelFunctor() {};
-  
+
   virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
     {
       CustomKernelFunctor custom;
-      return( vcl_exp(-param.gamma*custom(x, y, param)) ); 
+      return( vcl_exp(-param.gamma*custom(x, y, param)) );
     }
   };
 
@@ -350,7 +350,7 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
   public:
     GroupedRBFKernelFunctor(): GenericKernelFunctorBase() { this->SetName("groupedRBF"); };
     virtual ~GroupedRBFKernelFunctor() {};
-       
+
     virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
       {
       const char *parameters = param.custom;
@@ -360,55 +360,55 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
       double total = 0.;
       double value = 0.;
       int numberOfGroups = atoi(parameters);
-      
-      
+
+
       twoPointsPosition = position - parameters;
-      
+
       parameters = parameters + twoPointsPosition + 1;
-      
+
       int i,j;
       std::vector<int> begin;
       begin.resize(numberOfGroups);
       std::vector<int> end;
       end.resize(numberOfGroups);
-      
+
       for (i = 0; i < numberOfGroups; i++)
 	{
 	  begin[i] = atoi(parameters);
 	  position = strpbrk (parameters, twoPoints);
 	  twoPointsPosition = position - parameters;
 	  parameters = parameters + twoPointsPosition + 1;
-	  
+
 	  end[i] = atoi(parameters);
 	  parameters = parameters + twoPointsPosition + 1;
 	}
-      
-     
+
+
      const svm_node * xBuff = x;
      const svm_node * yBuff = y;
-           
+
       int sizeX = 0;
       int sizeY = 0;
-      
+
       while (xBuff->index != 1)
 	{
 	  sizeX++;
 	  ++xBuff;
 	}
-      
+
       while (yBuff->index != 1)
 	{
 	  sizeY++;
 	  ++yBuff;
 	}
-      
-      
+
+
       const svm_node * xTemp = NULL;
       const svm_node * yTemp = NULL;
-      
+
       int index = 0;
-      
-      
+
+
       if (sizeX && sizeY)
 	{
 		svm_node* xGroup = new svm_node[sizeX];
@@ -418,7 +418,7 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
 	      xTemp = x;
 	      yTemp = y;
 	      index = 0;
-	      
+
 	      while (xTemp->index != 1 && yTemp->index != 1)
 		{
 		  xGroup[index].index = xTemp->index;
@@ -434,36 +434,36 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
 		      yGroup[index].value = yTemp->value;
 		    }
 		  ++index;
-		  ++xTemp;	
+		  ++xTemp;
 		  ++yTemp;
 		}
-	  
+
 	      // value can have different value according to j
-	      CustomLinearKernelFunctor customLinear;	
-	      value =  customLinear(xGroup, yGroup, param); 
-	    
+	      CustomLinearKernelFunctor customLinear;
+	      value =  customLinear(xGroup, yGroup, param);
+
 	      total += value;
 	    }
 		delete [] xGroup;
 		delete [] yGroup;
 	}
-      
-      
+
+
       else if ((sizeX > 0) && (sizeY == 0))
 	{
 		svm_node* xGroup = new svm_node[sizeX];
 		svm_node* yGroup = new svm_node[sizeY];
-	  
+
 	  for (j = 0; j < numberOfGroups; j++)
 	    {
 	      xTemp = x;
 	      index = 0;
-	      
+
 	      while (xTemp->index != -1)
 		{
 		  xGroup[index].index = xTemp->index;
 		  yGroup[index].index = xTemp->index;
-		  
+
 		  if((xTemp->index < begin[j]) || (xTemp->index > end[j]))
 		    {
 		      xGroup[index].value = 0;
@@ -474,28 +474,28 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
 		      xGroup[index].value = xTemp->value;
 		      yGroup[index].value = 0;
 		    }
-		  ++index;		
+		  ++index;
 		  ++xTemp;
 		}
-	
+
 	       // value can have different value according to j
-	      CustomLinearKernelFunctor customLinear;	
-	      value =  customLinear(xGroup, yGroup, param); 
-	     	      
-	      total += value;	
+	      CustomLinearKernelFunctor customLinear;
+	      value =  customLinear(xGroup, yGroup, param);
+
+	      total += value;
 	    }
 		delete [] xGroup;
 		delete [] yGroup;
 	}
-      
-      
-      
+
+
+
       else
-	{ 
-	  CustomLinearKernelFunctor customLinear;	
+	{
+	  CustomLinearKernelFunctor customLinear;
 	  total =  static_cast<double>(numberOfGroups) * customLinear(x, y, param);
 	}
-      
+
       if(xTemp != NULL)
 	delete xTemp;
       if(yTemp != NULL)
@@ -504,7 +504,7 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
       return total;
     }
   };
- 
+
 
 
 
@@ -512,14 +512,14 @@ class GroupedRBFKernelFunctor : public GenericKernelFunctorBase
 class GroupingAdaptiveKernelFunctor : public GenericKernelFunctorBase
   {
   public:
-    GroupingAdaptiveKernelFunctor(): GenericKernelFunctorBase() 
-      { 
-	this->SetName("groupingAdaptive"); 
+    GroupingAdaptiveKernelFunctor(): GenericKernelFunctorBase()
+      {
+	this->SetName("groupingAdaptive");
 	this->SetValue<double>("lin_coef", 1.);
 	this->SetValue<double>("const_coef", 1.);
       };
     virtual ~GroupingAdaptiveKernelFunctor() {};
-    
+
     virtual double operator()(const svm_node *x, const svm_node *y, const svm_parameter& param)const
       {
       const char * parameters = param.custom;
@@ -529,67 +529,67 @@ class GroupingAdaptiveKernelFunctor : public GenericKernelFunctorBase
       double total = 0.;
       double value = 0.;
       int numberOfGroups = atoi(parameters);
-      
-      
+
+
       twoPointsPosition = position - parameters;
-      
+
       parameters = parameters + twoPointsPosition + 1;
-      
+
       int i,j;
-      
+
 	  std::vector<int> begin;
 	  begin.resize(numberOfGroups);
 	  std::vector<int> end;
 	  end.resize(numberOfGroups);
-      
+
       for (i = 0; i < numberOfGroups; i++)
 	{
 	  begin[i] = atoi(parameters);
 	  position = strpbrk (parameters, twoPoints);
 	  twoPointsPosition = position - parameters;
 	  parameters = parameters + twoPointsPosition + 1;
-	  
+
 	  end[i] = atoi(parameters);
 	  parameters = parameters + twoPointsPosition + 1;
 	}
-      
-     
+
+
      const svm_node * xBuff = x;
      const svm_node * yBuff = y;
-           
+
      int sizeX = 0;
      int sizeY = 0;
-     
+
      while (xBuff->index != 1)
        {
 	 sizeX++;
 	 ++xBuff;
        }
-     
+
      while (yBuff->index != 1)
        {
 	 sizeY++;
 	 ++yBuff;
        }
-     
-     
+
+
      const svm_node * xTemp = NULL;
      const svm_node * yTemp = NULL;
-     
+
      int index = 0;
-     
-     
+
+
      if (sizeX && sizeY)
        {
 		svm_node* xGroup = new svm_node[sizeX];
 		svm_node* yGroup = new svm_node[sizeY];
-	 
+
 	 for (j = 0; j < numberOfGroups; j++)
 	   {
 	     xTemp = x;
 	     yTemp = y;
-	     index = 0;   
-	     
+	     index = 0;
+
 	     while (xTemp->index != 1 && yTemp->index != 1)
 	       {
 		 xGroup[index].index = xTemp->index;
@@ -605,35 +605,35 @@ class GroupingAdaptiveKernelFunctor : public GenericKernelFunctorBase
 		     yGroup[index].value = yTemp->value;
 		   }
 		 ++index;
-		 ++xTemp;	
+		 ++xTemp;
 		 ++yTemp;
-	       }		
-	     
+	       }
+
 	     // value can have different value according to j
-	     value =  vcl_pow(this->GetValue<double>("lin_coef")*dot(xGroup,yGroup)+this->GetValue<double>("const_coef"),static_cast<double>(param.degree)); 
-	     
+	     value =  vcl_pow(this->GetValue<double>("lin_coef")*dot(xGroup,yGroup)+this->GetValue<double>("const_coef"),static_cast<double>(param.degree));
+
 	     total += value;
 	   }
  		delete [] xGroup;
 		delete [] yGroup;
       }
-     
-	
+
+
      else if ((sizeX > 0) && (sizeY == 0))
        {
 		svm_node* xGroup = new svm_node[sizeX];
 		svm_node* yGroup = new svm_node[sizeY];
-	 
+
 	 for (j = 0; j < numberOfGroups; j++)
 	   {
 	     xTemp = x;
 	     index = 0;
-	     
+
 	     while (xTemp->index != 1)
 	       {
 		 xGroup[index].index = xTemp->index;
 		 yGroup[index].index = xTemp->index;
-		 
+
 		 if((xTemp->index < begin[j]) || (xTemp->index > end[j]))
 		   {
 		     xGroup[index].value = 0;
@@ -644,28 +644,28 @@ class GroupingAdaptiveKernelFunctor : public GenericKernelFunctorBase
 		     xGroup[index].value = xTemp->value;
 		     yGroup[index].value = 0;
 		   }
-		 ++index;		
+		 ++index;
 		 ++xTemp;
 	       }
-	     
+
 	     // value can have different value according to j
 	     value = vcl_pow(this->GetValue<double>("lin_coef")*dot(xGroup,yGroup)+this->GetValue<double>("const_coef"),static_cast<double>(param.degree));
-	       
-	     total += value;	
+
+	     total += value;
 	   }
 		delete [] xGroup;
 		delete [] yGroup;
        }
-        
+
      else
        {
 	 CustomKernelFunctor custom;
 	 total = static_cast<double>(numberOfGroups) * custom(x, y, param);
        }
-     
+
      return total;
       }
   };
- 
+
 }
 #endif
diff --git a/Code/Learning/otbSVMModel.h b/Code/Learning/otbSVMModel.h
index bbe94ca4a7..621f0b8eb2 100644
--- a/Code/Learning/otbSVMModel.h
+++ b/Code/Learning/otbSVMModel.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,34 +30,34 @@ namespace otb
 
 /** \class SVMModel
  * \brief Class for SVM models.
- * 
  *
- * The basic functionality of the SVMModel framework base class is to    
- * generate the models used in SVM classification. It requires input 
+ *
+ * The basic functionality of the SVMModel framework base class is to
+ * generate the models used in SVM classification. It requires input
  * images and a training image to be provided by the user.
  * This object supports data handling of multiband images. The object
- * accepts the input image in vector format only, where each pixel is a 
+ * accepts the input image in vector format only, where each pixel is a
  * vector and each element of the vector corresponds to an entry from
- * 1 particular band of a multiband dataset. A single band image is treated 
+ * 1 particular band of a multiband dataset. A single band image is treated
  * as a vector image with a single element for every vector. The classified
- * image is treated as a single band scalar image. 
+ * image is treated as a single band scalar image.
  *
- * EstimateModels() is a pure virtual function making this an abstract class. 
- * The template parameter is the type of a membership function the 
+ * EstimateModels() is a pure virtual function making this an abstract class.
+ * The template parameter is the type of a membership function the
  * Model populates.
  *
  * A membership function represents a specific knowledge about
  * a class. In other words, it should tell us how "likely" is that a
- * measurement vector (pattern) belong to the class. 
+ * measurement vector (pattern) belong to the class.
  *
- * As the method name indicates, you can have more than one membership 
- * function. One for each classes. The order you put the membership 
+ * As the method name indicates, you can have more than one membership
+ * function. One for each classes. The order you put the membership
  * calculator becomes the class label for the class that is represented
- * by the membership calculator. 
+ * by the membership calculator.
  *
 
  *
- * \ingroup ClassificationFilters 
+ * \ingroup ClassificationFilters
  */
 template <class TInputPixel, class TLabel >
 class ITK_EXPORT SVMModel : public itk::DataObject
@@ -99,12 +99,12 @@ public:
 //   itkGetObjectMacro(InputImage,InputImageType);
 
 //   /** Set the classified image. */
-//   void SetMembershipFunctions(MembershipFunctionPointerVector 
+//   void SetMembershipFunctions(MembershipFunctionPointerVector
 //                               membershipFunctions)
 //   {
 //     m_MembershipFunctions = membershipFunctions;
 //   }
-  
+
 //   /** Method to get mean */
 //   const MembershipFunctionPointerVector GetMembershipFunctions() const
 //   {
@@ -112,13 +112,13 @@ public:
 //   }
 
 //   /** Method to number of membership functions */
-//   unsigned int GetNumberOfMembershipFunctions() 
+//   unsigned int GetNumberOfMembershipFunctions()
 //   {
 //     return static_cast<unsigned int>( m_MembershipFunctions.size() );
 //   }
 
 //   /** Method to reset the membership fucntion mean */
-//   void DeleteAllMembershipFunctions() 
+//   void DeleteAllMembershipFunctions()
 //   {
 //     m_MembershipFunctions.resize(0);
 //   }
@@ -136,7 +136,7 @@ public:
   {
         m_Model->nr_class = (int)nr_class;
   }
-  
+
   /** Get the number of classes. */
   unsigned int GetNumberOfClasses(void)
   {
@@ -169,7 +169,7 @@ public:
   /** Allocates the problem */
   void AllocateProblem(int l, long int elements);
 
-  
+
   /** Sets the model */
   void SetModel(struct svm_model* aModel);
 
@@ -217,7 +217,7 @@ public:
     //return m_Parameters.svm_type;
     return m_Model->param.svm_type;
   }
-  
+
   /** Set the kernel type to LINEAR, POLY, RBF, SIGMOID
 	linear: u'*v
 	polynomial: (gamma*u'*v + coef0)^degree
@@ -296,7 +296,7 @@ public:
       //return m_Parameters.nu;
       return m_Model->param.nu;
     }
-  
+
   /** Set the cache size in MB for the training */
   void SetCacheSize(int cSize)
   {
@@ -352,7 +352,7 @@ public:
     this->Modified();
   }
 
-  
+
   /* Get the value of p for EPSILON_SVR */
   double GetP(void)
   {
@@ -457,11 +457,11 @@ public:
   /** Evaluate model */
   double Evaluate(void);
 
-  /** Evaluate hyperplane distance model. 
+  /** Evaluate hyperplane distance model.
     * Return NumberOfClasses*(NumberOfClasses-1)/2 elements
     */
   ValuesType EvaluateHyperplaneDistance(void);
-  
+
 protected:
   SVMModel();
   ~SVMModel();
@@ -485,8 +485,8 @@ private:
 
   struct svm_problem m_Problem;
   struct svm_node* m_XSpace;
-  
- 
+
+
   /** Pointer to generic kernel functor */
 //  GenericKernelFunctorBase * m_GenericKernelFunctor;
 
diff --git a/Code/Learning/otbSVMModel.txx b/Code/Learning/otbSVMModel.txx
index e31d721fb6..9678b52610 100644
--- a/Code/Learning/otbSVMModel.txx
+++ b/Code/Learning/otbSVMModel.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ SVMModel< TInputPixel, TLabel >::SVMModel()
   m_Problem.y = new double[1];
   m_Problem.x = new struct svm_node*[1];
   m_XSpace = new struct svm_node[1];
- 
+
 
   //m_GenericKernelFunctor = NULL;
   m_Model->param.kernel_generic = NULL;
@@ -102,17 +102,17 @@ SVMModel<TInputPixel, TLabel>
    otbMsgDevMacro(  << "SVMModel::AllocateProblem - x done" );
    delete [] m_XSpace;
    m_XSpace = new struct svm_node[elements];
-   
+
    for(long int i = 0;i<elements;++i)
      {
        m_XSpace[i].value = 0;
        m_XSpace[i].index = -1;
      }
-   
+
    //free(m_XSpace);
    //m_XSpace = Malloc(struct svm_node,elements);
    //otbMsgDevMacro(  << "SVMModel::AllocateProblem - m_XSpace done" );
-   
+
  }
 
 
@@ -135,7 +135,7 @@ SVMModel<TInputPixel, TLabel>
 ::GetProblem()
   {
     return m_Problem;
-    
+
 //     otbMsgDevMacro(  << "SVMModel::GetProblem - enter" );
 //     aProblem.l = m_Problem.l;
 //     aProblem.y = m_Problem.y;
@@ -182,8 +182,8 @@ SVMModel<TInputPixel, TLabel>
 ::GetCopy()
 {
   Pointer modelCopy = New();
-  modelCopy->SetModel( svm_copy_model(m_Model) ); 
-  
+  modelCopy->SetModel( svm_copy_model(m_Model) );
+
   return modelCopy;
 }
 
@@ -192,13 +192,13 @@ template <class TInputPixel, class TLabel >
 void
 SVMModel<TInputPixel, TLabel>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
-{  
-  Superclass::PrintSelf(os,indent); 
+{
+  Superclass::PrintSelf(os,indent);
 }
 
 
 template <class TInputPixel, class TLabel >
-double 
+double
 SVMModel<TInputPixel, TLabel>
 ::Evaluate(void)
 {
@@ -206,14 +206,14 @@ SVMModel<TInputPixel, TLabel>
 }
 
 template <class TInputPixel, class TLabel >
-typename SVMModel<TInputPixel, TLabel>::ValuesType 
+typename SVMModel<TInputPixel, TLabel>::ValuesType
 SVMModel<TInputPixel, TLabel>
 ::EvaluateHyperplaneDistance(void)
 {
   ValuesType values;
-  
+
   values.SetSize( m_Model->nr_class*(m_Model->nr_class-1)/2);
-  
+
   svm_predict_values(m_Model, m_XSpace, (double*)(values.GetDataPointer()));
   return (values);
 }
@@ -223,7 +223,7 @@ template <class TInputPixel, class TLabel >
 void
 SVMModel<TInputPixel, TLabel>
 ::SetSupportVectors(svm_node ** sv, int nbOfSupportVector)
-{     
+{
   // erase the old SV
   // delete just the first element, it destoyes the whole pointers (cf SV filling with x_space)
   delete [] (m_Model->SV[0]);
@@ -240,14 +240,14 @@ SVMModel<TInputPixel, TLabel>
 
   // copy new SV values
   svm_node **SV = m_Model->SV;
-  
+
   // Compute the total number of SV elements.
   unsigned int elements = 0;
   for (int p=0; p<nbOfSupportVector; p++)
     {
-      std::cout<<p<<"  "; 
+      std::cout<<p<<"  ";
       const svm_node *tempNode = sv[p];
-      std::cout<<p<<"  "; 
+      std::cout<<p<<"  ";
       while(tempNode->index != -1)
 	{
 	  tempNode++;
@@ -256,22 +256,22 @@ SVMModel<TInputPixel, TLabel>
       elements++;// for -1 values
     }
 
-  if(m_Model->l>0) 
+  if(m_Model->l>0)
       {
         SV[0] = Malloc(svm_node,elements);
 	memcpy( SV[0],sv[0],sizeof(svm_node*)*elements);
       }
   svm_node *x_space =  SV[0];
-  
+
   int j = 0;
   for(int i=0; i<m_Model->l; i++)
-    {   
+    {
       // SV
-      SV[i] = &x_space[j];   
+      SV[i] = &x_space[j];
       const svm_node *p = sv[i];
       svm_node *pCpy = SV[i];
       while(p->index != -1)
-	{  
+	{
 	  pCpy->index = p->index;
 	  pCpy->value = p->value;
 	  p++;
@@ -295,16 +295,16 @@ SVMModel<TInputPixel, TLabel>
       delete[] m_Model->sv_coef[i];
     }
   delete [] m_Model->sv_coef;
-  
+
   this->SetNumberOfSupportVectors(nbOfSupportVector);
-  
+
   // copy new sv_coef values
   m_Model->sv_coef = Malloc(double *,m_Model->nr_class-1);
   for(int i=0; i<m_Model->nr_class-1; i++)
     m_Model->sv_coef[i] = Malloc(double,m_Model->l);
 
   for(int i=0; i<m_Model->l; i++)
-    { 
+    {
       // sv_coef
       for(int k=0; k<m_Model->nr_class-1; k++)
 	{
diff --git a/Code/Learning/otbSVMModelEstimator.h b/Code/Learning/otbSVMModelEstimator.h
index e80c030cb6..823be116ef 100644
--- a/Code/Learning/otbSVMModelEstimator.h
+++ b/Code/Learning/otbSVMModelEstimator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,34 +26,34 @@ namespace otb
 
 /** \class SVMModelEstimator
  * \brief Class for SVM model estimation from images used for classification.
- * 
  *
- * The basic functionality of the SVMModelEstimator framework base class is to    
- * generate the models used in SVM classification. It requires input 
+ *
+ * The basic functionality of the SVMModelEstimator framework base class is to
+ * generate the models used in SVM classification. It requires input
  * images and a training image to be provided by the user.
  * This object supports data handling of multiband images. The object
- * accepts the input image in vector format only, where each pixel is a 
+ * accepts the input image in vector format only, where each pixel is a
  * vector and each element of the vector corresponds to an entry from
- * 1 particular band of a multiband dataset. A single band image is treated 
+ * 1 particular band of a multiband dataset. A single band image is treated
  * as a vector image with a single element for every vector. The classified
- * image is treated as a single band scalar image. 
+ * image is treated as a single band scalar image.
  *
- * EstimateModels() is a pure virtual function making this an abstract class. 
- * The template parameter is the type of a membership function the 
+ * EstimateModels() is a pure virtual function making this an abstract class.
+ * The template parameter is the type of a membership function the
  * ModelEstimator populates.
  *
  * A membership function represents a specific knowledge about
  * a class. In other words, it should tell us how "likely" is that a
- * measurement vector (pattern) belong to the class. 
+ * measurement vector (pattern) belong to the class.
  *
- * As the method name indicates, you can have more than one membership 
- * function. One for each classes. The order you put the membership 
+ * As the method name indicates, you can have more than one membership
+ * function. One for each classes. The order you put the membership
  * calculator becomes the class label for the class that is represented
- * by the membership calculator. 
+ * by the membership calculator.
  *
 
  *
- * \ingroup ClassificationFilters 
+ * \ingroup ClassificationFilters
  */
 template <class InputPixelType, class LabelPixelType>
 class ITK_EXPORT SVMModelEstimator : public itk::LightProcessObject
@@ -114,7 +114,7 @@ public:
   {
     return m_Model->GetSVMType();
   }
-  
+
   /** Set the kernel type to LINEAR, POLY, RBF, SIGMOID
 	linear: u'*v
 	polynomial: (gamma*u'*v + coef0)^degree
@@ -183,7 +183,7 @@ public:
     {
       return m_Model->GetNu();
     }
-  
+
   /** Set the cache size in MB for the training */
   void SetCacheSize(int cSize)
   {
@@ -232,7 +232,7 @@ public:
     this->Modified();
   }
 
-  
+
   /* Get the value of p for EPSILON_SVR */
   double GetP(void)
   {
@@ -267,7 +267,7 @@ public:
   }
 
   void Update();
-  
+
   /** Get/Set methods for generic kernel functor */
   virtual GenericKernelFunctorBase * GetKernelFunctor(void)const
   {
@@ -281,7 +281,7 @@ public:
 
   virtual void  PrepareData();
 
-protected: 
+protected:
   SVMModelEstimator();
   ~SVMModelEstimator();
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
@@ -293,7 +293,7 @@ protected:
   TrainingMeasuresType m_Measures;
   TrainingLabelsType   m_Labels;
 
-  /** A function that generates the 
+  /** A function that generates the
    * model based on the training input data
    * Achieves the goal of training the classifier. */
   virtual void EstimateModels();
diff --git a/Code/Learning/otbSVMModelEstimator.txx b/Code/Learning/otbSVMModelEstimator.txx
index 6389e4966b..f569ed4805 100644
--- a/Code/Learning/otbSVMModelEstimator.txx
+++ b/Code/Learning/otbSVMModelEstimator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -58,7 +58,7 @@ template<class InputPixelType, class LabelPixelType>
 SVMModelEstimator<InputPixelType, LabelPixelType>
 ::~SVMModelEstimator(void)
 {
-  
+
    svm_destroy_param(&m_Model->GetParameters());
 
 }
@@ -70,7 +70,7 @@ template<class InputPixelType, class LabelPixelType>
 void
 SVMModelEstimator<InputPixelType, LabelPixelType>
 ::PrintSelf( std::ostream& os, itk::Indent indent ) const
-{  
+{
   // FIXME : print useful SVM information
 //   os << indent << "                   " << std::endl;
 //   os << indent << "Gaussian Models generated from the training data." << std::endl;
@@ -84,7 +84,7 @@ SVMModelEstimator<InputPixelType, LabelPixelType>
 }// end PrintSelf
 
 template<class InputPixelType, class LabelPixelType>
-void 
+void
 SVMModelEstimator<InputPixelType, LabelPixelType>
 ::Update()
 {
@@ -96,7 +96,7 @@ SVMModelEstimator<InputPixelType, LabelPixelType>
  * Generate data (start the model building process)
  */
 template<class InputPixelType, class LabelPixelType>
-void 
+void
 SVMModelEstimator<InputPixelType, LabelPixelType>
 ::GenerateData( )
 {
@@ -104,12 +104,12 @@ SVMModelEstimator<InputPixelType, LabelPixelType>
     {
     m_Done = 1;
     this->EstimateModels();
-    } 
+    }
 }// end Generate data
 
 
 template<class InputPixelType, class LabelPixelType>
-void 
+void
 SVMModelEstimator<InputPixelType, LabelPixelType>
 ::EstimateModels()
 {
@@ -122,7 +122,7 @@ SVMModelEstimator<InputPixelType, LabelPixelType>
 
 
   this->BuildProblem();
-  
+
   const char* error_msg = svm_check_parameter(&m_Model->GetProblem(),&m_Model->GetParameters());
 
   if(error_msg)
@@ -138,18 +138,18 @@ SVMModelEstimator<InputPixelType, LabelPixelType>
 
   m_Model->SetModel(tempModel);
   m_Model->SetNumberOfClasses( this->GetNumberOfClasses() );
-  
+
   otbMsgDebugMacro(  << "Training done" );
 
-}// end train classifier 
+}// end train classifier
 
 
 template<class InputPixelType, class LabelPixelType>
-void 
+void
 SVMModelEstimator< InputPixelType, LabelPixelType >
 ::PrepareData()
 {
-  int probl = m_Measures.size();  
+  int probl = m_Measures.size();
 
   long int elements = (m_Measures[0].size()+1)*probl;
 
@@ -189,12 +189,12 @@ SVMModelEstimator< InputPixelType, LabelPixelType >
       typename MeasurementVectorType::iterator compEnd = (*measIt).end();
 
       int k=0;
-      
+
       while(compIt!=compEnd)
 	{
-	// otbMsgDebugMacro(  << "Index " << x_space[j].index );	
+	// otbMsgDebugMacro(  << "Index " << x_space[j].index );
 // 	otbMsgDebugMacro(  << "Value " << x_space[j].value );
-	
+
 	x_space[j].index = k+1;
 	x_space[j].value = (*compIt);
 // 	otbMsgDebugMacro(  << x_space[j].index << ":" << x_space[j].value << " " << "j: " << j << " " );
@@ -210,8 +210,8 @@ SVMModelEstimator< InputPixelType, LabelPixelType >
 
       ++measIt;
       ++labelsIt;
-	
-		  
+
+
     }
 
   otbMsgDebugMacro(  << "Processed " << i << " examples" );
diff --git a/Code/Learning/otbSVMPointSetModelEstimator.h b/Code/Learning/otbSVMPointSetModelEstimator.h
index eb42ffb22e..b74880cf46 100644
--- a/Code/Learning/otbSVMPointSetModelEstimator.h
+++ b/Code/Learning/otbSVMPointSetModelEstimator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,10 +30,10 @@ namespace otb
 
  * \brief Class for SVM model
  * estimation from PointSets used for classification.
- * 
+ *
  *
  * The basic functionality of the SVMPointSetModelEstimator is to
- * generate the models used in SVM classification. It 
+ * generate the models used in SVM classification. It
  * requires one input poinset and a training pointset to be provided by the
  * user.  This object supports data handling of multiband data. The
  * object accepts the input image in vector format only, where each
@@ -45,11 +45,11 @@ namespace otb
  *
  * EstimateModels() uses the libsvm library for SVM learning.
  *
- * \ingroup ClassificationFilters 
+ * \ingroup ClassificationFilters
  */
-template <class TInputPointSet, 
+template <class TInputPointSet,
           class TTrainingPointSet>
-class ITK_EXPORT SVMPointSetModelEstimator: 
+class ITK_EXPORT SVMPointSetModelEstimator:
     public SVMModelEstimator<typename TInputPointSet::PixelType::value_type, typename TTrainingPointSet::PixelType>
 {
 public:
@@ -71,14 +71,14 @@ public:
   /** Type definition for the input image. */
     /** Type definitions for the training image. */
   typedef typename TInputPointSet::Pointer   InputPointSetPointer;
- 
+
   /** Type definitions for the training image. */
   typedef typename TTrainingPointSet::Pointer TrainingPointSetPointer;
-    
+
   /** Type definition for the vector associated with
-   * input image pixel type. */     
+   * input image pixel type. */
   typedef typename TInputPointSet::PixelType InputPointSetPixelType;
-  typedef typename TInputPointSet::PointType InputPointType;        
+  typedef typename TInputPointSet::PointType InputPointType;
 
   /** Type definitions for the vector holding
    * training image pixel type. */
@@ -92,7 +92,7 @@ public:
 
   /** Set the input image. */
   itkSetObjectMacro(InputPointSet,TInputPointSet);
-  
+
   /** Get the input image. */
   itkGetObjectMacro(InputPointSet,TInputPointSet);
 
@@ -105,7 +105,7 @@ public:
 
 
 
-protected: 
+protected:
   SVMPointSetModelEstimator();
   ~SVMPointSetModelEstimator();
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
diff --git a/Code/Learning/otbSVMPointSetModelEstimator.txx b/Code/Learning/otbSVMPointSetModelEstimator.txx
index 49b904066d..c22fc73671 100644
--- a/Code/Learning/otbSVMPointSetModelEstimator.txx
+++ b/Code/Learning/otbSVMPointSetModelEstimator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
-template<class TInputPointSet, 
+template<class TInputPointSet,
          class TTrainingPointSet>
 SVMPointSetModelEstimator<TInputPointSet, TTrainingPointSet>
 ::SVMPointSetModelEstimator(void):  SVMModelEstimator<ITK_TYPENAME TInputPointSet::PixelType::value_type,
@@ -36,7 +36,7 @@ SVMPointSetModelEstimator<TInputPointSet, TTrainingPointSet>
 }
 
 
-template<class TInputPointSet, 
+template<class TInputPointSet,
          class TTrainingPointSet>
 SVMPointSetModelEstimator<TInputPointSet, TTrainingPointSet>
 ::~SVMPointSetModelEstimator(void)
@@ -46,12 +46,12 @@ SVMPointSetModelEstimator<TInputPointSet, TTrainingPointSet>
 /*
  * PrintSelf
  */
-template<class TInputPointSet, 
+template<class TInputPointSet,
          class TTrainingPointSet>
 void
 SVMPointSetModelEstimator<TInputPointSet, TTrainingPointSet>
 ::PrintSelf( std::ostream& os, itk::Indent indent ) const
-{  
+{
   // FIXME : print useful SVM information
 //   os << indent << "                   " << std::endl;
 //   os << indent << "Gaussian Models generated from the training data." << std::endl;
@@ -70,7 +70,7 @@ SVMPointSetModelEstimator<TInputPointSet, TTrainingPointSet>
  */
 
 
-template<class TInputPointSet, 
+template<class TInputPointSet,
          class TTrainingPointSet>
 void
 SVMPointSetModelEstimator<TInputPointSet,  TTrainingPointSet>
@@ -92,8 +92,8 @@ SVMPointSetModelEstimator<TInputPointSet,  TTrainingPointSet>
   int trainingPointSetSize = trainingPointSet->GetNumberOfPoints();
 
   // Check if size of the two inputs are same
-  if( inputPointSetSize != trainingPointSetSize ) throw itk::ExceptionObject(__FILE__, __LINE__,"Input pointset size is not the same as the training pointset size.",ITK_LOCATION); 
-  
+  if( inputPointSetSize != trainingPointSetSize ) throw itk::ExceptionObject(__FILE__, __LINE__,"Input pointset size is not the same as the training pointset size.",ITK_LOCATION);
+
 
   // Declaration of the iterators on the input and training images
 
@@ -105,15 +105,15 @@ SVMPointSetModelEstimator<TInputPointSet,  TTrainingPointSet>
   TrainingPointSetIteratorType trEnd = trainingPointSet->GetPoints()->End();
 
 
-  
+
   // Erase the vector contents
   this->m_Measures.resize(0);
   this->m_Labels.resize(0);
-  
+
 
   otbMsgDevMacro(  << " Input nb points " << inputPointSetSize );
   otbMsgDevMacro(  << " Training nb points " << trainingPointSetSize );
-  
+
 
   otbMsgDevMacro(  << " Before while " );
 
@@ -121,16 +121,16 @@ SVMPointSetModelEstimator<TInputPointSet,  TTrainingPointSet>
   while(inIt!=inEnd && trIt!=trEnd)
     {
 
-    // If label != 0 
+    // If label != 0
 
     typename TTrainingPointSet::PixelType label;
-    trainingPointSet->GetPointData( dataId, & label );   
+    trainingPointSet->GetPointData( dataId, & label );
     this->m_Labels.push_back(label);
 
       otbMsgDevMacro(  << " Label " << label );
 
       typename TInputPointSet::PixelType value;
-      inputPointSet->GetPointData( dataId, & value );   
+      inputPointSet->GetPointData( dataId, & value );
 
       typename Superclass::MeasurementVectorType v;
 
diff --git a/Code/Learning/otbSVMSampleListModelEstimator.h b/Code/Learning/otbSVMSampleListModelEstimator.h
index 0e20fea1a9..2c7309f7ea 100644
--- a/Code/Learning/otbSVMSampleListModelEstimator.h
+++ b/Code/Learning/otbSVMSampleListModelEstimator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,10 +30,10 @@ namespace otb
 
  * \brief Class for SVM model
  * estimation from SampleLists used for classification.
- * 
+ *
  *
  * The basic functionality of the SVMSampleListModelEstimator is to
- * generate the models used in SVM classification. It 
+ * generate the models used in SVM classification. It
  * requires one input poinset and a training pointset to be provided by the
  * user.  This object supports data handling of multiband data. The
  * object accepts the input image in vector format only, where each
@@ -45,11 +45,11 @@ namespace otb
  *
  * EstimateModels() uses the libsvm library for SVM learning.
  *
- * \ingroup ClassificationFilters 
+ * \ingroup ClassificationFilters
  */
-template <class TInputSampleList, 
+template <class TInputSampleList,
           class TTrainingSampleList>
-class ITK_EXPORT SVMSampleListModelEstimator: 
+class ITK_EXPORT SVMSampleListModelEstimator:
     public SVMModelEstimator<typename TInputSampleList::MeasurementType, typename TTrainingSampleList::MeasurementType>
 {
 public:
@@ -71,12 +71,12 @@ public:
   /** Type definition for the input image. */
     /** Type definitions for the training image. */
   typedef typename TInputSampleList::Pointer   InputSampleListPointer;
- 
+
   /** Type definitions for the training image. */
   typedef typename TTrainingSampleList::Pointer TrainingSampleListPointer;
-    
+
   /** Type definition for the vector associated with
-   * input image pixel type. */     
+   * input image pixel type. */
   typedef typename TInputSampleList::ValueType InputSampleListValueType;
 
   /** Type definitions for the vector holding
@@ -91,7 +91,7 @@ public:
 
   /** Set the input image. */
   itkSetObjectMacro(InputSampleList,TInputSampleList);
-  
+
   /** Get the input image. */
   itkGetObjectMacro(InputSampleList,TInputSampleList);
 
@@ -104,7 +104,7 @@ public:
 
 
 
-protected: 
+protected:
   SVMSampleListModelEstimator();
   ~SVMSampleListModelEstimator();
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
diff --git a/Code/Learning/otbSVMSampleListModelEstimator.txx b/Code/Learning/otbSVMSampleListModelEstimator.txx
index 118eb540b0..edf76ff143 100644
--- a/Code/Learning/otbSVMSampleListModelEstimator.txx
+++ b/Code/Learning/otbSVMSampleListModelEstimator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@
 
 namespace otb
 {
-template<class TInputSampleList, 
+template<class TInputSampleList,
          class TTrainingSampleList>
 SVMSampleListModelEstimator<TInputSampleList, TTrainingSampleList>
 ::SVMSampleListModelEstimator(void):  SVMModelEstimator<ITK_TYPENAME TInputSampleList::MeasurementType,
@@ -37,7 +37,7 @@ SVMSampleListModelEstimator<TInputSampleList, TTrainingSampleList>
 }
 
 
-template<class TInputSampleList, 
+template<class TInputSampleList,
          class TTrainingSampleList>
 SVMSampleListModelEstimator<TInputSampleList, TTrainingSampleList>
 ::~SVMSampleListModelEstimator(void)
@@ -47,12 +47,12 @@ SVMSampleListModelEstimator<TInputSampleList, TTrainingSampleList>
 /*
  * PrintSelf
  */
-template<class TInputSampleList, 
+template<class TInputSampleList,
          class TTrainingSampleList>
 void
 SVMSampleListModelEstimator<TInputSampleList, TTrainingSampleList>
 ::PrintSelf( std::ostream& os, itk::Indent indent ) const
-{  
+{
   // FIXME : print useful SVM information
 //   os << indent << "                   " << std::endl;
 //   os << indent << "Gaussian Models generated from the training data." << std::endl;
@@ -71,7 +71,7 @@ SVMSampleListModelEstimator<TInputSampleList, TTrainingSampleList>
  */
 
 
-template<class TInputSampleList, 
+template<class TInputSampleList,
          class TTrainingSampleList>
 void
 SVMSampleListModelEstimator<TInputSampleList,  TTrainingSampleList>
@@ -88,8 +88,8 @@ SVMSampleListModelEstimator<TInputSampleList,  TTrainingSampleList>
   int trainingSampleListSize = trainingSampleList->Size();
 
   // Check if size of the two inputs are same
-  if( inputSampleListSize != trainingSampleListSize ) throw itk::ExceptionObject(__FILE__, __LINE__,"Input pointset size is not the same as the training pointset size.",ITK_LOCATION); 
-  
+  if( inputSampleListSize != trainingSampleListSize ) throw itk::ExceptionObject(__FILE__, __LINE__,"Input pointset size is not the same as the training pointset size.",ITK_LOCATION);
+
 
   // Declaration of the iterators on the input and training images
 
@@ -101,22 +101,22 @@ SVMSampleListModelEstimator<TInputSampleList,  TTrainingSampleList>
   TrainingSampleListIteratorType trEnd = trainingSampleList->End();
 
 
-  
+
   // Erase the vector contents
   this->m_Measures.resize(0);
   this->m_Labels.resize(0);
-  
+
 
   otbMsgDebugMacro(  << " Input nb points " << inputSampleListSize );
   otbMsgDebugMacro(  << " Training nb points " << trainingSampleListSize );
-  
+
 
  //  otbMsgDebugMacro(  << " Before while " );
 
   while(inIt!=inEnd && trIt!=trEnd)
     {
 
-    // If label != 0 
+    // If label != 0
 
     typename TTrainingSampleList::MeasurementType label =
       trIt.GetMeasurementVector()[0];
@@ -129,7 +129,7 @@ SVMSampleListModelEstimator<TInputSampleList,  TTrainingSampleList>
       inIt.GetMeasurementVector();
 
     typename Superclass::MeasurementVectorType v;
-    
+
     typename TInputSampleList::MeasurementVectorType::ConstIterator pIt = value.Begin();
     typename TInputSampleList::MeasurementVectorType::ConstIterator pEnd = value.End();
 
@@ -138,9 +138,9 @@ SVMSampleListModelEstimator<TInputSampleList,  TTrainingSampleList>
       v.push_back(*pIt);
       ++pIt;
       }
-    
+
     this->m_Measures.push_back(v);
-    
+
     ++inIt;
     ++trIt;
     }
diff --git a/Code/Learning/otbSpectralAngleKernelFunctor.h b/Code/Learning/otbSpectralAngleKernelFunctor.h
index a975b1e01b..d65928c092 100644
--- a/Code/Learning/otbSpectralAngleKernelFunctor.h
+++ b/Code/Learning/otbSpectralAngleKernelFunctor.h
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ public:
 	 * spectral data.
 	 * It is of kind:
 	 * $\frac{1}{\sqrt{ c_0 + \cos\textrm{SAM(x,y)} }}$ where $\textrm{SAM(x,y)}$ is
-	 * Spectral Angle Measure: 
+	 * Spectral Angle Measure:
 	 * $\textrm{SAM(x,y) = \acos\left( \frac{x \cdot y}{\|x\| \|y\|} \right)$.
 	 *
 	 * The only parameter $c_0$ is to be fixed by the \code SetValue \endcode
diff --git a/Code/Learning/otbSpectralAngleKernelFunctor.txx b/Code/Learning/otbSpectralAngleKernelFunctor.txx
index 32f9a11c3b..291f200e42 100644
--- a/Code/Learning/otbSpectralAngleKernelFunctor.txx
+++ b/Code/Learning/otbSpectralAngleKernelFunctor.txx
@@ -9,11 +9,11 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  Copyright (c) GET / ENST Bretagne. All rights reserved. 
+  Copyright (c) GET / ENST Bretagne. All rights reserved.
   See GETCopyright.txt for details.
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,14 +36,14 @@ SpectralAngleKernelFunctor
 	SetValue( "Coef", m_Coef );
 }
 
-void 
+void
 SpectralAngleKernelFunctor
 ::Update ()
 {
 	m_Coef = GetValue<double>( "Coef" );
 }
 
-double 
+double
 SpectralAngleKernelFunctor
 ::operator()( const svm_node * x, const svm_node * y,
 				const svm_parameter & param ) const
@@ -56,14 +56,14 @@ SpectralAngleKernelFunctor
 	return 1.0 / sqrt( mq );
 }
 
-double 
+double
 SpectralAngleKernelFunctor
 ::SAM ( const svm_node * x, const svm_node * y ) const
 {
 	double den = dot(x,x) * dot(y,y);
 	if ( den <= 0.0 )
 		return 0.0;
-	
+
 	double ss = dot(x,y);
 	return /*acos*/( ss / sqrt( den ) );
 }
diff --git a/Code/Markov/otbMRFEnergy.h b/Code/Markov/otbMRFEnergy.h
index d94e150a1d..014d1a3916 100644
--- a/Code/Markov/otbMRFEnergy.h
+++ b/Code/Markov/otbMRFEnergy.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -20,16 +20,16 @@
 
 #include "itkConstNeighborhoodIterator.h"
 #include "itkObject.h"
-#include "itkArray.h" 
+#include "itkArray.h"
 
 namespace otb
 {
   /**
    * \class MRFEnergy
    * \brief This is the base class for energy function used in the MRF framework
-   *  
+   *
    * Derived class must reimplement the GetSingleValue() method.
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
    * \ingroup Markov
@@ -42,51 +42,51 @@ class ITK_EXPORT MRFEnergy : public itk::Object
     typedef itk::Object                   Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     typedef TInput1                               InputImageType;
     typedef TInput2                               LabelledImageType;
     typedef typename InputImageType::PixelType    InputImagePixelType;
     typedef typename LabelledImageType::PixelType LabelledImagePixelType;
-    
+
     typedef itk::ConstNeighborhoodIterator< LabelledImageType > LabelledNeighborhoodIterator;
     typedef itk::ConstNeighborhoodIterator< InputImageType >    InputNeighborhoodIterator;
-    
+
     typedef itk::Array< double > ParametersType;
-    
+
     itkNewMacro(Self);
 
     itkTypeMacro(MRFEnergy,itk::Object);
-    
-    
+
+
     itkSetMacro(NumberOfParameters, unsigned int);
     itkGetConstMacro(NumberOfParameters, unsigned int);
-    
+
     // Get the parameters
     const ParametersType& GetParameters( void ) const
       {
 	return this->m_Parameters;
       }
-    
+
     void SetParameters( const ParametersType & parameters )
       {
       	if( parameters.Size() != m_NumberOfParameters )
-	  {	
+	  {
 	    itkExceptionMacro(<<"Invalid number of parameters");
 	  }
 	m_Parameters = parameters;
-	this->Modified();       
+	this->Modified();
     }
-    
+
     virtual double GetSingleValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)
       {
 	itkExceptionMacro(<<"GetSingleValue() has to be declared in child classes.");
       }
-        
+
     double GetValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)
       {
 	return GetSingleValue(value1, value2);
       }
-    
+
     double GetValue(const LabelledNeighborhoodIterator & it,  const LabelledImagePixelType & value2)
       {
 	double result = 0.0;
@@ -107,7 +107,7 @@ class ITK_EXPORT MRFEnergy : public itk::Object
 	  }
 	return result/insideNeighbors;
       }
-    
+
     double GetValue(const InputNeighborhoodIterator & it,  const LabelledImagePixelType & value2)
       {
 	double result = 0.0;
@@ -129,7 +129,7 @@ class ITK_EXPORT MRFEnergy : public itk::Object
 	  }
 	return result/insideNeighbors;
       }
-    
+
   protected:
     // The constructor and destructor.
     MRFEnergy() {m_NumberOfParameters = 1;};
@@ -137,8 +137,8 @@ class ITK_EXPORT MRFEnergy : public itk::Object
     unsigned int m_NumberOfParameters;
     ParametersType m_Parameters;
   };
- 
- 
+
+
 template< class TInput2>
 class ITK_EXPORT MRFEnergy<TInput2,TInput2> : public itk::Object
   {
@@ -147,40 +147,40 @@ class ITK_EXPORT MRFEnergy<TInput2,TInput2> : public itk::Object
     typedef itk::Object                   Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     typedef TInput2                               LabelledImageType;
     typedef typename LabelledImageType::PixelType LabelledImagePixelType;
-    
+
     typedef itk::ConstNeighborhoodIterator< LabelledImageType >  LabelledNeighborhoodIterator;
     typedef itk::Array< double >                                 ParametersType;
 
     itkNewMacro(Self);
 
     itkTypeMacro(MRFEnergy,itk::Object);
-    
-    
+
+
     itkSetMacro(NumberOfParameters, unsigned int);
     itkGetConstMacro(NumberOfParameters, unsigned int);
-    
-    
+
+
     // Get the parameters
     const ParametersType& GetParameters( void ) const
       {
 	return this->m_Parameters;
       }
-      
-      
-    
+
+
+
     void SetParameters( const ParametersType & parameters )
       {
         if( parameters.Size() != m_NumberOfParameters )
-	  {	
+	  {
 	    itkExceptionMacro(<<"Invalid number of parameters");
 	  }
 	m_Parameters = parameters;
 	this->Modified();
       }
-    
+
     virtual double GetSingleValue(const LabelledImagePixelType & value1,  const LabelledImagePixelType & value2)
       {
 	itkExceptionMacro(<<"GetSingleValue() has to be declared in child classes.");
@@ -190,7 +190,7 @@ class ITK_EXPORT MRFEnergy<TInput2,TInput2> : public itk::Object
       {
 	return GetSingleValue(value1, value2);
       }
-    
+
     double GetValue(const LabelledNeighborhoodIterator & it,  const LabelledImagePixelType & value2)
       {
 	double result = 0.0;
@@ -211,12 +211,12 @@ class ITK_EXPORT MRFEnergy<TInput2,TInput2> : public itk::Object
 	  }
 	return result/insideNeighbors;
       }
-    
-    
-    
+
+
+
   protected:
     // The constructor and destructor.
-    MRFEnergy() 
+    MRFEnergy()
     {
       m_NumberOfParameters = 1;
       m_Parameters=0;
diff --git a/Code/Markov/otbMRFEnergyEdgeFidelity.h b/Code/Markov/otbMRFEnergyEdgeFidelity.h
index ad1df0bd97..84323becf8 100644
--- a/Code/Markov/otbMRFEnergyEdgeFidelity.h
+++ b/Code/Markov/otbMRFEnergyEdgeFidelity.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,15 +34,15 @@ namespace otb
  * with
  * - \f$ x_s \f$ the label on site s
  * - \f$ x_t \f$ the label on site t, a neighbor of s
- * - \f$ \Phi \f$ an edge preserving function: 
+ * - \f$ \Phi \f$ an edge preserving function:
  *     \f[ \Phi(u) = \frac{u^2}{1+u^2} \f]
- * 
+ *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
  *
  * \ingroup Markov
 */
-  
-template< class TInput1, class TInput2>    
+
+template< class TInput1, class TInput2>
 class ITK_EXPORT MRFEnergyEdgeFidelity : public MRFEnergy< TInput1, TInput2>
   {
   public:
@@ -50,24 +50,24 @@ class ITK_EXPORT MRFEnergyEdgeFidelity : public MRFEnergy< TInput1, TInput2>
     typedef MRFEnergy< TInput1, TInput2>                    Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     typedef itk::ConstNeighborhoodIterator< TInput1 >  NeighborhoodIterator;
     typedef typename TInput1::PixelType                InputImagePixelType;
     typedef typename TInput2::PixelType                LabelledImagePixelType;
-    
+
     itkNewMacro(Self);
-    
+
     itkTypeMacro(MRFEnergyEdgeFidelity, MRFEnergy);
-    
+
     double GetSingleValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)
       {
 	double val1 = static_cast<double>(value1);
 	double val2 = static_cast<double>(value2);
-	
+
 	return M_SQUARE((val1 - val2))/(1+M_SQUARE(val1 - val2));
       }
-    
-    
+
+
   protected:
     // The constructor and destructor.
     MRFEnergyEdgeFidelity() {};
diff --git a/Code/Markov/otbMRFEnergyGaussian.h b/Code/Markov/otbMRFEnergyGaussian.h
index 375a730ff2..77ca049bce 100644
--- a/Code/Markov/otbMRFEnergyGaussian.h
+++ b/Code/Markov/otbMRFEnergyGaussian.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
  * \class MRFEnergyGaussian
  * \brief This is the implementation of the Gaussian model for Markov classification.
  *
- * This is the implementation of the Gaussian model for Markov classification, 
+ * This is the implementation of the Gaussian model for Markov classification,
  * to be used for data fidelity. Energy is:
  *
  * \f[  U(x_s,x_t) = (x_s-x_t)^2 \f]
@@ -39,13 +39,13 @@ namespace otb
  * with
  * - \f$ x_s \f$ the label on site s
  * - \f$ y_s \f$ the value on the reference image
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
  * \ingroup Markov
  */
-  
-template< class TInput1, class TInput2>    
+
+template< class TInput1, class TInput2>
 class ITK_EXPORT MRFEnergyGaussian:public MRFEnergy< TInput1, TInput2>
   {
   public:
@@ -53,24 +53,24 @@ class ITK_EXPORT MRFEnergyGaussian:public MRFEnergy< TInput1, TInput2>
     typedef MRFEnergy< TInput1, TInput2>  Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     typedef TInput1                               InputImageType;
     typedef TInput2                               LabelledImageType;
     typedef typename InputImageType::PixelType    InputImagePixelType;
     typedef typename LabelledImageType::PixelType LabelledImagePixelType;
 
     typedef itk::Array< double >                  ParametersType;
-    
+
     itkTypeMacro(MRFEnergyGaussian, MRFEnergy);
-    
+
     itkNewMacro(Self);
-                
-    double GetSingleValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)   
+
+    double GetSingleValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)
       {
-          return M_SQUARE((static_cast<double>(value1)) 
+          return M_SQUARE((static_cast<double>(value1))
               - (static_cast<double>(value2)) );
       }
-       
+
   protected:
     // The constructor and destructor.
     MRFEnergyGaussian() {
@@ -78,7 +78,7 @@ class ITK_EXPORT MRFEnergyGaussian:public MRFEnergy< TInput1, TInput2>
       this->m_Parameters.SetSize(this->m_NumberOfParameters);
     };
     virtual ~MRFEnergyGaussian() {};
-    
+
   };
 }
 
diff --git a/Code/Markov/otbMRFEnergyPotts.h b/Code/Markov/otbMRFEnergyPotts.h
index 292a0de7d4..02003fdff7 100644
--- a/Code/Markov/otbMRFEnergyPotts.h
+++ b/Code/Markov/otbMRFEnergyPotts.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -35,13 +35,13 @@ namespace otb
  * - \f$ x_s \f$ the label on site s
  * - \f$ y_s \f$ the value on the reference image
  * - \f$ \sigma^2_{x_s} \f$ the noise variance
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
  * \ingroup Markov
  */
-  
-template< class TInput1, class TInput2>    
+
+template< class TInput1, class TInput2>
 class ITK_EXPORT MRFEnergyPotts:public MRFEnergy< TInput1, TInput2>
   {
   public:
@@ -49,30 +49,30 @@ class ITK_EXPORT MRFEnergyPotts:public MRFEnergy< TInput1, TInput2>
     typedef MRFEnergy< TInput1, TInput2>  Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     typedef TInput1                               InputImageType;
     typedef TInput2                               LabelledImageType;
     typedef typename InputImageType::PixelType    InputImagePixelType;
     typedef typename LabelledImageType::PixelType LabelledImagePixelType;
 
     typedef itk::Array< double >                  ParametersType;
-    
+
     itkTypeMacro(MRFEnergyPotts, MRFEnergy);
-    
+
     itkNewMacro(Self);
-                
-    double GetSingleValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)   
+
+    double GetSingleValue(const InputImagePixelType & value1,  const LabelledImagePixelType & value2)
       {
 	if (value1 != value2)
           {
             return this->m_Parameters[0];
           }
-	else 
+	else
           {
             return -this->m_Parameters[0];
           }
       }
-       
+
   protected:
     // The constructor and destructor.
     MRFEnergyPotts() {
@@ -81,7 +81,7 @@ class ITK_EXPORT MRFEnergyPotts:public MRFEnergy< TInput1, TInput2>
       this->m_Parameters[0]=1.0;
     };
     virtual ~MRFEnergyPotts() {};
-    
+
   };
 }
 
diff --git a/Code/Markov/otbMRFOptimizer.h b/Code/Markov/otbMRFOptimizer.h
index 7a045fab4c..198a14b116 100644
--- a/Code/Markov/otbMRFOptimizer.h
+++ b/Code/Markov/otbMRFOptimizer.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,53 +29,53 @@ namespace otb
  * \brief This is the base class for optimizer used in the MRF framework.
  *
  * Derived class must reimplement Compute() method.
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
  * \ingroup Markov
  */
 
 class ITK_EXPORT MRFOptimizer : public itk::Object
-  {       
+  {
   public:
     typedef MRFOptimizer                  Self;
     typedef itk::Object                   Superclass;
     typedef itk::SmartPointer<Self>       Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
     typedef itk::Array< double >          ParametersType;
-    
+
     itkTypeMacro(MRFOptimizer, itk::Object);
-       
+
     itkGetConstMacro(NumberOfParameters, unsigned int);
-    
+
     // Get the parameters
     const ParametersType& GetParameters( void ) const
     {
       return this->m_Parameters;
     }
-    
+
     virtual void SetParameters( const ParametersType & parameters )
     {
       if( parameters.GetSize() != m_NumberOfParameters )
-	{	
+	{
 	  itkExceptionMacro(<<"Invalid number of parameters ("<<parameters.GetSize()<<" , "<<m_NumberOfParameters<<")");
 	}
       m_Parameters = parameters;
       this->Modified();
     }
-    
+
     virtual bool Compute(double deltaEnergy) = 0;
-    
+
   protected:
-    MRFOptimizer() 
+    MRFOptimizer()
     {
       m_Parameters=1;
     }
     virtual ~MRFOptimizer() {}
     unsigned int m_NumberOfParameters;
     ParametersType m_Parameters;
-    
-  };      
+
+  };
 }
 
 #endif
diff --git a/Code/Markov/otbMRFOptimizerICM.h b/Code/Markov/otbMRFOptimizerICM.h
index ff8716afc8..2bdc30f321 100644
--- a/Code/Markov/otbMRFOptimizerICM.h
+++ b/Code/Markov/otbMRFOptimizerICM.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,29 +25,29 @@ namespace otb
 {
 /**
  * \class MRFOptimizerICM
- * \brief This is the optimizer class implementing the ICM algorithm 
- *  
- * This is one optimizer to be used in the MRF framework. This optimizer 
+ * \brief This is the optimizer class implementing the ICM algorithm
+ *
+ * This is one optimizer to be used in the MRF framework. This optimizer
  * follows the ICM algorithm to accept of reject the value proposed by the sampler
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
  * \ingroup Markov
  */
 class ITK_EXPORT MRFOptimizerICM : public MRFOptimizer
-{       
+{
  public:
-  
+
   typedef MRFOptimizerICM               Self;
   typedef MRFOptimizer                  Superclass;
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   itkNewMacro(Self);
-  
+
   itkTypeMacro(MRFOptimizerICM,MRFOptimizer);
-  
-  
+
+
   inline bool Compute(double deltaEnergy)
     {
       if (deltaEnergy < 0)
@@ -59,14 +59,14 @@ class ITK_EXPORT MRFOptimizerICM : public MRFOptimizer
 	  return false;
 	}
     }
-  
-  
+
+
  protected:
   MRFOptimizerICM() {}
   virtual ~MRFOptimizerICM() {}
-  
-};       
- 
+
+};
+
 }
 
 #endif
diff --git a/Code/Markov/otbMRFOptimizerMetropolis.h b/Code/Markov/otbMRFOptimizerMetropolis.h
index 1e95337caa..be98f9ff56 100644
--- a/Code/Markov/otbMRFOptimizerMetropolis.h
+++ b/Code/Markov/otbMRFOptimizerMetropolis.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,38 +27,38 @@ namespace otb
 {
   /**
    * \class MRFOptimizerMetropolis
-   * \brief This is the optimizer class implementing the Metropolis algorithm 
-   *  
-   * This is one optimizer to be used in the MRF framework. This optimizer 
+   * \brief This is the optimizer class implementing the Metropolis algorithm
+   *
+   * This is one optimizer to be used in the MRF framework. This optimizer
    * follows the metropolis algorithm to accept of reject the value proposed by the sampler.
    *
    * The MRFOptimizerMetropolis has one parameter corresponding to the temperature T used
    * to accept or reject proposed values. The proposed value is accepted with a probability:
    *
    *  \f[ e^{\frac{-\Delta E}{T}} \f]
-   * 
-   * 
+   *
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
    * \ingroup Markov
    */
-  
+
 class ITK_EXPORT MRFOptimizerMetropolis : public MRFOptimizer
   {
   public:
-    
+
     typedef MRFOptimizerMetropolis Self;
     typedef MRFOptimizer Superclass;
     typedef itk::SmartPointer<Self>  Pointer;
     typedef itk::SmartPointer<const Self>  ConstPointer;
     typedef Superclass::ParametersType ParametersType;
-      
+
     typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
-    
+
     itkNewMacro(Self);
-    
+
     itkTypeMacro(MRFOptimizerMetropolis,MRFOptimizer);
-    
+
     /** Set parameter to a one array filled with paramVal.*/
     void SetSingleParameter( double parameterVal )
       {
@@ -66,7 +66,7 @@ class ITK_EXPORT MRFOptimizerMetropolis : public MRFOptimizer
 	this->m_Parameters.Fill(parameterVal);
 	this->Modified();
       }
-    
+
 
     inline bool Compute(double deltaEnergy)
       {
@@ -88,7 +88,7 @@ class ITK_EXPORT MRFOptimizerMetropolis : public MRFOptimizer
               }
 	return false;
       }
-    
+
     /** Methods to cancel random effects.*/
     void InitializeSeed(int seed){ m_Generator->SetSeed(seed); }
     void InitializeSeed(){ m_Generator->SetSeed(); }
@@ -103,8 +103,8 @@ class ITK_EXPORT MRFOptimizerMetropolis : public MRFOptimizer
     }
     virtual ~MRFOptimizerMetropolis() {}
     RandomGeneratorType::Pointer m_Generator;
-  };       
- 
+  };
+
 }
 
 #endif
diff --git a/Code/Markov/otbMRFSampler.h b/Code/Markov/otbMRFSampler.h
index 20eba6ecc6..ff728867ed 100644
--- a/Code/Markov/otbMRFSampler.h
+++ b/Code/Markov/otbMRFSampler.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,55 +29,55 @@ namespace otb
    *
    * Derived class must reimplement Compute() method.
    *
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
    * \ingroup Markov
  */
-    
-template< class TInput1, class TInput2>    
+
+template< class TInput1, class TInput2>
 class ITK_EXPORT MRFSampler : public itk::Object
   {
   public:
-    
+
     typedef MRFSampler Self;
     typedef itk::Object Superclass;
     typedef itk::SmartPointer<Self>  Pointer;
     typedef itk::SmartPointer<const Self>  ConstPointer;
-    
+
     typedef itk::ConstNeighborhoodIterator< TInput1 >  InputImageNeighborhoodIterator;
     typedef typename TInput1::PixelType InputImagePixelType;
-    
+
     typedef itk::NeighborhoodIterator< TInput2 >  LabelledImageNeighborhoodIterator;
     typedef typename TInput2::PixelType LabelledImagePixelType;
-    
+
     typedef MRFEnergy<TInput1, TInput2>  EnergyFidelityType;
     typedef MRFEnergy<TInput2, TInput2>  EnergyRegularizationType;
-            
+
     typedef typename EnergyFidelityType::Pointer EnergyFidelityPointer;
     typedef typename EnergyRegularizationType::Pointer EnergyRegularizationPointer;
-    
+
     itkTypeMacro(MRFSampler,Object);
-    
+
     itkSetMacro(NumberOfClasses, unsigned int);
     itkGetMacro(NumberOfClasses, unsigned int);
-    
+
     itkSetMacro(Lambda, double);
     itkGetMacro(Lambda, double);
-    
+
     itkGetMacro(DeltaEnergy, double);
     itkGetMacro(Value, LabelledImagePixelType);
-    
+
     // Accessor for validation tests pour les tests
     itkGetConstMacro(EnergyBefore, double);
     itkGetConstMacro(EnergyAfter, double);
-    
+
     itkSetObjectMacro( EnergyRegularization, EnergyRegularizationType);
     itkSetObjectMacro( EnergyFidelity, EnergyFidelityType);
-    
-    virtual int Compute( const InputImageNeighborhoodIterator & itData, 
+
+    virtual int Compute( const InputImageNeighborhoodIterator & itData,
 			 const LabelledImageNeighborhoodIterator & itRegul) = 0;
-    
+
   protected:
     unsigned int m_NumberOfClasses;
     double m_EnergyBefore;
@@ -85,17 +85,17 @@ class ITK_EXPORT MRFSampler : public itk::Object
     double m_DeltaEnergy;
     double  m_EnergyCurrent;
     double  m_Lambda;
-    
+
     LabelledImagePixelType m_Value;
     EnergyRegularizationPointer  m_EnergyRegularization;
     EnergyFidelityPointer  m_EnergyFidelity;
     LabelledImagePixelType m_ValueCurrent;
-    
-    
+
+
   protected:
     // The constructor and destructor.
-    MRFSampler() 
-      {   
+    MRFSampler()
+      {
 	m_EnergyRegularization = EnergyRegularizationType::New();
 	m_EnergyFidelity =  EnergyFidelityType::New(),
 	m_NumberOfClasses =1;
@@ -106,9 +106,9 @@ class ITK_EXPORT MRFSampler : public itk::Object
 	m_Lambda = 1.;
       };
     virtual ~MRFSampler() {};
-    
+
   };
-  
+
 }
 
 #endif
diff --git a/Code/Markov/otbMRFSamplerMAP.h b/Code/Markov/otbMRFSamplerMAP.h
index 712096a500..6243ce2e87 100644
--- a/Code/Markov/otbMRFSamplerMAP.h
+++ b/Code/Markov/otbMRFSamplerMAP.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,26 +26,26 @@ namespace otb
 /**
    * \class MRFSamplerMAP
    * \brief This is the base class for sampler methods used in the MRF framework.
-   * 
-   * This is one sampler to be used int he MRF framework. This sampler select the 
+   *
+   * This is one sampler to be used int he MRF framework. This sampler select the
    * value which maximizes the apriori probability (minimum energy).
    *
-   * 
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
    * \ingroup Markov
  */
 
-template< class TInput1, class TInput2>    
+template< class TInput1, class TInput2>
 class ITK_EXPORT MRFSamplerMAP : public MRFSampler< TInput1, TInput2>
   {
   public:
-    
+
     typedef MRFSamplerMAP Self;
     typedef MRFSampler< TInput1, TInput2> Superclass;
     typedef itk::SmartPointer<Self>  Pointer;
     typedef itk::SmartPointer<const Self>  ConstPointer;
-            
+
     typedef typename Superclass::InputImageNeighborhoodIterator    InputImageNeighborhoodIterator;
     typedef typename Superclass::LabelledImageNeighborhoodIterator LabelledImageNeighborhoodIterator;
     typedef typename Superclass::LabelledImagePixelType            LabelledImagePixelType;
@@ -53,34 +53,34 @@ class ITK_EXPORT MRFSamplerMAP : public MRFSampler< TInput1, TInput2>
     typedef typename Superclass::EnergyFidelityType                EnergyFidelityType;
     typedef typename Superclass::EnergyRegularizationType          EnergyRegularizationType;
     typedef typename Superclass::EnergyFidelityPointer             EnergyFidelityPointer;
-    typedef typename Superclass::EnergyRegularizationPointer       EnergyRegularizationPointer;     
-    
+    typedef typename Superclass::EnergyRegularizationPointer       EnergyRegularizationPointer;
+
     itkNewMacro(Self);
-    
+
     itkTypeMacro(MRFSamplerMAP,MRFSampler);
-    
-    inline int Compute( const InputImageNeighborhoodIterator & itData, 
-			const LabelledImageNeighborhoodIterator & itRegul)             
+
+    inline int Compute( const InputImageNeighborhoodIterator & itData,
+			const LabelledImageNeighborhoodIterator & itRegul)
       {
 	if (this->m_NumberOfClasses == 0)
 	  {
             itkExceptionMacro(<<"NumberOfClasse has to be greater than 0.");
 	  }
-	
+
 	this->m_EnergyBefore=this->m_EnergyFidelity->GetValue(itData, itRegul.GetCenterPixel());
-	this->m_EnergyBefore += this->m_Lambda 
+	this->m_EnergyBefore += this->m_Lambda
 	                        * this->m_EnergyRegularization->GetValue(itRegul, itRegul.GetCenterPixel());
-	
+
 	//Try all possible value (how to be generic ?)
 	this->m_EnergyAfter = this->m_EnergyBefore; //default values to current one
 	this->m_Value = itRegul.GetCenterPixel();
-	
+
 	LabelledImagePixelType valueCurrent = 0;
 	while( valueCurrent<static_cast<LabelledImagePixelType>(this->GetNumberOfClasses()) && valueCurrent != itk::NumericTraits<LabelledImagePixelType>::max() )
 	  {
 	    this->m_EnergyCurrent = this->m_EnergyFidelity->GetValue(itData, valueCurrent);
-	    this->m_EnergyCurrent += this->m_Lambda 
-	      * this->m_EnergyRegularization->GetValue(itRegul, valueCurrent);  
+	    this->m_EnergyCurrent += this->m_Lambda
+	      * this->m_EnergyRegularization->GetValue(itRegul, valueCurrent);
 	    if (this->m_EnergyCurrent < this->m_EnergyAfter)
               {
                 this->m_EnergyAfter = this->m_EnergyCurrent;
@@ -88,22 +88,22 @@ class ITK_EXPORT MRFSamplerMAP : public MRFSampler< TInput1, TInput2>
               }
 	    valueCurrent++;
 	  }
-	
-	
+
+
 	this->m_DeltaEnergy=  this->m_EnergyAfter - this->m_EnergyBefore;
-	
+
 	return 0;
       }
-    
-    
+
+
         protected:
     // The constructor and destructor.
     MRFSamplerMAP() {}
     virtual ~MRFSamplerMAP() {}
-    
+
   };
- 
-  
+
+
 }
 
 #endif
diff --git a/Code/Markov/otbMRFSamplerRandom.h b/Code/Markov/otbMRFSamplerRandom.h
index 77bb70ab59..99cd29ebff 100644
--- a/Code/Markov/otbMRFSamplerRandom.h
+++ b/Code/Markov/otbMRFSamplerRandom.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,25 +27,25 @@ namespace otb
 /**
    * \class MRFSamplerRandom
    * \brief This is the base class for sampler methods used in the MRF framework.
-   * 
-   * This is one sampler to be used int he MRF framework. This sampler select the 
+   *
+   * This is one sampler to be used int he MRF framework. This sampler select the
    * value randomly according to a uniform probability.
-   * 
-   * 
+   *
+   *
    * This class is meant to be used in the MRF framework with the otb::MarkovRandomFieldFilter
    *
    * \ingroup Markov
  */
-  
-template< class TInput1, class TInput2>    
+
+template< class TInput1, class TInput2>
 class ITK_EXPORT MRFSamplerRandom: public MRFSampler< TInput1, TInput2>
   {
-  public: 
+  public:
     typedef MRFSamplerRandom                  Self;
     typedef otb::MRFSampler<TInput1, TInput2> Superclass;
     typedef itk::SmartPointer<Self>           Pointer;
     typedef itk::SmartPointer<const Self>     ConstPointer;
-    
+
     typedef typename Superclass::InputImageNeighborhoodIterator    InputImageNeighborhoodIterator;
     typedef typename Superclass::LabelledImageNeighborhoodIterator LabelledImageNeighborhoodIterator;
     typedef typename Superclass::LabelledImagePixelType            LabelledImagePixelType;
@@ -53,45 +53,45 @@ class ITK_EXPORT MRFSamplerRandom: public MRFSampler< TInput1, TInput2>
     typedef typename Superclass::EnergyFidelityType                EnergyFidelityType;
     typedef typename Superclass::EnergyRegularizationType          EnergyRegularizationType;
     typedef typename Superclass::EnergyFidelityPointer             EnergyFidelityPointer;
-    typedef typename Superclass::EnergyRegularizationPointer       EnergyRegularizationPointer;     
-    
+    typedef typename Superclass::EnergyRegularizationPointer       EnergyRegularizationPointer;
+
     typedef itk::Statistics::MersenneTwisterRandomVariateGenerator RandomGeneratorType;
 
     itkNewMacro(Self);
-    
+
     itkTypeMacro(MRFSamplerRandom,MRFSampler);
 
-    inline int Compute( const InputImageNeighborhoodIterator & itData, const LabelledImageNeighborhoodIterator & itRegul)   
+    inline int Compute( const InputImageNeighborhoodIterator & itData, const LabelledImageNeighborhoodIterator & itRegul)
       {
 	this->m_EnergyBefore = this->m_EnergyFidelity->GetValue(itData, itRegul.GetCenterPixel());
-	this->m_EnergyBefore += this->m_Lambda 
+	this->m_EnergyBefore += this->m_Lambda
 	                              * this->m_EnergyRegularization->GetValue(itRegul, itRegul.GetCenterPixel());
-	
+
 	this->m_Value = static_cast<LabelledImagePixelType>(m_Generator->GetIntegerVariate() % this->m_NumberOfClasses);
 	this->m_EnergyAfter = this->m_EnergyFidelity->GetValue(itData, this->m_Value);
 	this->m_EnergyAfter +=  this->m_Lambda * this->m_EnergyRegularization->GetValue(itRegul, this->m_Value);
 	this->m_DeltaEnergy=  this->m_EnergyAfter - this->m_EnergyBefore;
-     
+
 	return 0;
       }
-    
+
     /** Methods to cancel random effects.*/
     void InitializeSeed(int seed){ m_Generator->SetSeed(seed); }
     void InitializeSeed(){ m_Generator->SetSeed(); }
-    
+
   protected:
     // The constructor and destructor.
-    MRFSamplerRandom() 
+    MRFSamplerRandom()
       {
 	m_Generator = RandomGeneratorType::New();
 	m_Generator->SetSeed();
       }
     virtual ~MRFSamplerRandom() {}
-	  
-    
+
+
   private:
     RandomGeneratorType::Pointer m_Generator;
-  };  
+  };
 }
 
 #endif
diff --git a/Code/Markov/otbMarkovRandomFieldFilter.h b/Code/Markov/otbMarkovRandomFieldFilter.h
index 7da5fb5db9..07b045aada 100644
--- a/Code/Markov/otbMarkovRandomFieldFilter.h
+++ b/Code/Markov/otbMarkovRandomFieldFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -44,35 +44,35 @@ namespace otb
   /**
    * \class MarkovRandomFieldFilter
    * \brief This is the class to use the Markov Random Field framework in OTB.
-   * 
+   *
    * This filter apply a Markov Random Field to an input image. Several
    * components need to be specify:
-   * 
-   * - Fidelity energy (class derived from otb::MRFEnergy): the energy to make 
+   *
+   * - Fidelity energy (class derived from otb::MRFEnergy): the energy to make
    * sure that the output image is close enough to the reference.
    * - Regularization energy (class derived from otb::MRFEnergy): the energy to
    * make sure that neighborhood pixels have similar values.
-   * - Sampler (class derived from otb::MRFSampler): the strategy to propose 
+   * - Sampler (class derived from otb::MRFSampler): the strategy to propose
    * variations for each pixel.
    * - Optimizer (class derived from otb::MRFOptimizer): the strategy to accept
    * or reject the proposed modification.
-   * 
+   *
    * An example of usage for this filter is:
-   * 
+   *
    * \code
-   *   markovFilter->SetNumberOfClasses(4);  
+   *   markovFilter->SetNumberOfClasses(4);
    *   markovFilter->SetMaximumNumberOfIterations(30);
    *   markovFilter->SetErrorTolerance(0.0);
    *   markovFilter->SetLambda(1.0);
    *   markovFilter->SetNeighborhoodRadius(1);
-   *   
+   *
    *   markovFilter->SetEnergyRegularization(energyRegularization);
    *   markovFilter->SetEnergyFidelity(energyFidelity);
    *   markovFilter->SetOptimizer(optimizer);
    *   markovFilter->SetSampler(sampler);
    * \endcode
-   * 
-   * 
+   *
+   *
    * \ingroup Markov
    *
    * \example  Markov/MarkovClassification1Example.cxx
@@ -81,122 +81,122 @@ namespace otb
    * \example  Markov/MarkovRestaurationExample.cxx
    *
    */
-  
+
 template <class TInputImage, class TClassifiedImage>
-class ITK_EXPORT MarkovRandomFieldFilter : 
+class ITK_EXPORT MarkovRandomFieldFilter :
 public itk::ImageToImageFilter<TInputImage,TClassifiedImage>
   {
-  public:       
+  public:
     /** Standard class typedefs. */
     typedef MarkovRandomFieldFilter                            Self;
     typedef itk::ImageToImageFilter<TInputImage,TClassifiedImage> Superclass;
     typedef itk::SmartPointer<Self>                               Pointer;
     typedef itk::SmartPointer<const Self>                         ConstPointer;
     typedef typename Superclass::OutputImagePointer               OutputImagePointer;
-    
+
     /** Run-time type information (and related methods). */
     itkTypeMacro(MarkovRandomFieldFilter,itk::ImageToImageFilter);
 
     /** Method for creation through the object factory. */
     itkNewMacro(Self);
-    
-   
+
+
     /** Type definition for the input image. */
     typedef TInputImage InputImageType;
     typedef typename TInputImage::Pointer              InputImagePointer;
-    typedef typename TInputImage::ConstPointer         InputImageConstPointer;  
-    
+    typedef typename TInputImage::ConstPointer         InputImageConstPointer;
+
     /** Type definition for the input image pixel type. */
     typedef typename TInputImage::PixelType            InputImagePixelType;
-    
+
     /** Type definition for the input image region type. */
     typedef typename TInputImage::RegionType           InputImageRegionType;
-    
+
     /** Type definition for the input image region iterator */
     typedef itk::ImageRegionIterator<TInputImage>       InputImageRegionIterator;
     typedef itk::ImageRegionConstIterator<TInputImage>  InputImageRegionConstIterator;
-    
+
     /** Image dimension */
     itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
-    
+
     /** Type definitions for the training image. */
     typedef TClassifiedImage                           TrainingImageType;
     typedef typename TClassifiedImage::Pointer         TrainingImagePointer;
-    
+
     /** Type definitions for the training image pixel type. */
     typedef typename TClassifiedImage::PixelType       TrainingImagePixelType;
-    
+
     /** Type definitions for the labelled image.
      * It is derived from the training image. */
     typedef TClassifiedImage                           LabelledImageType;
     typedef typename TClassifiedImage::Pointer         LabelledImagePointer;
-    
+
     /** Type definitions for the classified image pixel type.
      * It has to be the same type as the training image. */
     typedef typename TClassifiedImage::PixelType       LabelledImagePixelType;
-    
+
     /** Type definitions for the classified image pixel type.
      * It has to be the same type as the training image. */
     typedef typename TClassifiedImage::RegionType      LabelledImageRegionType;
-    
+
     /** Type definition for the classified image index type. */
     typedef typename TClassifiedImage::IndexType       LabelledImageIndexType;
     typedef typename LabelledImageIndexType::IndexValueType    IndexValueType;
 
     /** Type definition for the classified image offset type. */
     typedef typename TClassifiedImage::OffsetType      LabelledImageOffsetType;
-    
+
     /** Type definition for the input image region iterator */
-    typedef itk::ImageRegionIterator<TClassifiedImage>  
+    typedef itk::ImageRegionIterator<TClassifiedImage>
       LabelledImageRegionIterator;
 
-    typedef itk::ImageRegionConstIterator<TClassifiedImage>  
+    typedef itk::ImageRegionConstIterator<TClassifiedImage>
       LabelledImageRegionConstIterator;
-    
+
     /** Labelled Image dimension */
     itkStaticConstMacro(ClassifiedImageDimension, unsigned int,
 			TClassifiedImage::ImageDimension);
-    
+
     /** Type definitions for classifier to be used for the MRF lavbelling. */
     typedef itk::ImageClassifierBase<TInputImage,TClassifiedImage> ClassifierType;
-    
+
     /** Size and value typedef support. */
     typedef typename TInputImage::SizeType SizeType;
-    
+
     /** Radius typedef support. */
     typedef typename TInputImage::SizeType NeighborhoodRadiusType;
-    
+
     /** Input image neighborhood iterator and kernel size typedef */
     typedef itk::ConstNeighborhoodIterator< TInputImage >
       InputImageNeighborhoodIterator;
-    
-    
-    typedef typename InputImageNeighborhoodIterator::RadiusType 
+
+
+    typedef typename InputImageNeighborhoodIterator::RadiusType
       InputImageNeighborhoodRadiusType;
-    
+
     typedef itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TInputImage >
       InputImageFacesCalculator;
-    
+
     typedef typename InputImageFacesCalculator::FaceListType
       InputImageFaceListType;
-    
-    typedef typename InputImageFaceListType::iterator 
+
+    typedef typename InputImageFaceListType::iterator
       InputImageFaceListIterator;
-    
+
     /** Labelled image neighborhood interator typedef */
     typedef itk::NeighborhoodIterator< TClassifiedImage >
       LabelledImageNeighborhoodIterator;
-    
-    typedef typename LabelledImageNeighborhoodIterator::RadiusType 
+
+    typedef typename LabelledImageNeighborhoodIterator::RadiusType
       LabelledImageNeighborhoodRadiusType;
-    
+
     typedef itk::NeighborhoodAlgorithm::ImageBoundaryFacesCalculator< TClassifiedImage >
       LabelledImageFacesCalculator;
-    
+
     typedef typename LabelledImageFacesCalculator::FaceListType
       LabelledImageFaceListType;
-    
-    typedef typename LabelledImageFaceListType::iterator 
+
+    typedef typename LabelledImageFaceListType::iterator
       LabelledImageFaceListIterator;
 
     /** Typedef for random values. */
@@ -205,106 +205,106 @@ public itk::ImageToImageFilter<TInputImage,TClassifiedImage>
 
     /** Set the pointer to the classifer being used. */
     void SetClassifier( typename ClassifierType::Pointer ptrToClassifier );
-    
-    
+
+
     /** Set pipeline elements */
     typedef MRFEnergy< TClassifiedImage, TClassifiedImage> EnergyRegularizationType;
     typedef MRFEnergy< TInputImage, TClassifiedImage> EnergyFidelityType;
-    
+
     typedef typename EnergyRegularizationType::Pointer EnergyRegularizationPointer;
-    typedef typename EnergyFidelityType::Pointer EnergyFidelityPointer;        
-    
-    typedef MRFSampler< TInputImage, TClassifiedImage> SamplerType;    
-    typedef typename SamplerType::Pointer SamplerPointer;         
-    
-    typedef MRFOptimizer OptimizerType;   
+    typedef typename EnergyFidelityType::Pointer EnergyFidelityPointer;
+
+    typedef MRFSampler< TInputImage, TClassifiedImage> SamplerType;
+    typedef typename SamplerType::Pointer SamplerPointer;
+
+    typedef MRFOptimizer OptimizerType;
     typedef typename OptimizerType::Pointer OptimizerPointer;
-    
-    
+
+
    /**
    ************ ACCESSORS ************
    */
     itkSetObjectMacro( EnergyRegularization, EnergyRegularizationType);
     itkGetObjectMacro( EnergyRegularization, EnergyRegularizationType);
-    
+
     itkSetObjectMacro( EnergyFidelity, EnergyFidelityType);
-    itkGetObjectMacro( EnergyFidelity, EnergyFidelityType);        
-    
+    itkGetObjectMacro( EnergyFidelity, EnergyFidelityType);
+
     itkSetObjectMacro( Sampler, SamplerType);
     itkGetObjectMacro( Sampler, SamplerType);
-    
+
     itkSetObjectMacro( Optimizer, OptimizerType);
     itkGetObjectMacro( Optimizer, OptimizerType);
-    
-    
-    
+
+
+
     /** Set/Get the number of classes. */
     itkSetMacro(NumberOfClasses, unsigned int);
     itkGetMacro(NumberOfClasses, unsigned int);
-    
+
     /** Set/Get the number of iteration of the Iterated Conditional Mode
      * (ICM) algorithm. A default value is set at 50 iterations. */
     itkSetMacro(MaximumNumberOfIterations, unsigned int);
     itkGetMacro(MaximumNumberOfIterations, unsigned int);
-    
+
     /** Set/Get the error tollerance level which is used as a threshold
      * to quit the iterations */
     itkSetMacro(ErrorTolerance, double);
     itkGetMacro(ErrorTolerance, double);
-    
-    /** Set/Get the degree of smoothing desired 
+
+    /** Set/Get the degree of smoothing desired
      * */
     itkSetMacro(SmoothingFactor, double);
     itkGetMacro(SmoothingFactor, double);
-    
-    /** Set/Get the regularization coefficient 
+
+    /** Set/Get the regularization coefficient
      * */
     itkSetMacro(Lambda, double);
-    itkGetMacro(Lambda, double);      
-        
-    
+    itkGetMacro(Lambda, double);
+
+
     /** Set the neighborhood radius */
-    void SetNeighborhoodRadius(const NeighborhoodRadiusType &);  
-    
+    void SetNeighborhoodRadius(const NeighborhoodRadiusType &);
+
     /** Sets the radius for the neighborhood, calculates size from the
      * radius, and allocates storage. */
-    
+
     void SetNeighborhoodRadius( const unsigned long );
-    void SetNeighborhoodRadius( const unsigned long *radiusArray );  
-    
+    void SetNeighborhoodRadius( const unsigned long *radiusArray );
+
     /** Get the neighborhood radius */
     const NeighborhoodRadiusType GetNeighborhoodRadius() const
-      { 
+      {
 	NeighborhoodRadiusType m_NeighborhoodRadius;
-	
+
 	for(int i=0; i<InputImageDimension; ++i)
 	  m_NeighborhoodRadius[i] = m_InputImageNeighborhoodRadius[i];
-	
+
 	return m_NeighborhoodRadius;
       }
-    
-        
+
+
     /** Set training image for the starting point. This is not compulsory:
      * if the starting image is not specified, a random image will be used
      * instead.
     */
     virtual void SetTrainingInput( const TrainingImageType * trainingImage);
     const TrainingImageType* GetTrainingInput(void);
-    
-    
+
+
     //Enum to get the stopping condition of the MRF filter
     typedef enum{
       MaximumNumberOfIterations=1,
 	ErrorTolerance
         } StopConditionType;
-    
-    /** Get condition that stops the MRF filter (Number of Iterations 
+
+    /** Get condition that stops the MRF filter (Number of Iterations
      * / Error tolerance ) */
     itkGetConstReferenceMacro( StopCondition, StopConditionType );
-    
+
     /** Get macro for number of iterations */
     itkGetConstReferenceMacro( NumberOfIterations, unsigned int );
-    
+
 #ifdef ITK_USE_CONCEPT_CHECKING
     /** Begin concept checking */
     itkConceptMacro(UnsignedIntConvertibleToClassifiedCheck,
@@ -328,78 +328,78 @@ public itk::ImageToImageFilter<TInputImage,TClassifiedImage>
     MarkovRandomFieldFilter();
     ~MarkovRandomFieldFilter();
     void PrintSelf(std::ostream& os, itk::Indent indent) const;
-    
+
     /** Allocate memory for labelled images. This is automatically called
      * in GenerateData().
     */
     void Allocate();
-    
-    /** Connect the pipeline and propagate the required parameters. This 
+
+    /** Connect the pipeline and propagate the required parameters. This
     * is automatically called in GenerateData().
     */
     void Initialize() throw (itk::ExceptionObject);
-    
-    
-    virtual void ApplyMarkovRandomFieldFilter();  
-    
-    
+
+
+    virtual void ApplyMarkovRandomFieldFilter();
+
+
     virtual void GenerateData();
     virtual void GenerateInputRequestedRegion();
     virtual void EnlargeOutputRequestedRegion( itk::DataObject * );
     virtual void GenerateOutputInformation();
-    
-    
+
+
     MarkovRandomFieldFilter(const Self&); //purposely not implemented
     void operator=(const Self&); //purposely not implemented
-    
+
     typedef typename TInputImage::SizeType InputImageSizeType;
-    
-    
+
+
     InputImageNeighborhoodRadiusType       m_InputImageNeighborhoodRadius;
     LabelledImageNeighborhoodRadiusType    m_LabelledImageNeighborhoodRadius;
-    
+
     unsigned int              m_NumberOfClasses;
     unsigned int              m_MaximumNumberOfIterations;
     unsigned int              m_KernelSize;
-    
+
     int                       m_ErrorCounter;
     double                    m_ImageDeltaEnergy;
-    
+
     int                       m_NeighborhoodRadius;
     int                       m_TotalNumberOfValidPixelsInOutputImage;
     int                       m_TotalNumberOfPixelsInInputImage;
-    double                    m_ErrorTolerance;  
+    double                    m_ErrorTolerance;
     double                    m_SmoothingFactor;
-    
+
     unsigned int              m_NumberOfIterations;
-   
-    
+
+
     double                    m_Lambda;
     bool                      m_ExternalClassificationSet;
     StopConditionType         m_StopCondition;
-    
+
     TrainingImagePointer      m_TrainingImage;
-    
+
     std::vector<double>       m_MRFNeighborhoodWeight;
     std::vector<double>       m_NeighborInfluence;
     std::vector<double>       m_DummyVector;
-    
+
     RandomGeneratorType::Pointer m_Generator;
 
     /** Pointer to different elements */
-    
+
     EnergyRegularizationPointer m_EnergyRegularization;
     EnergyFidelityPointer       m_EnergyFidelity;
-    OptimizerPointer            m_Optimizer;    
-    SamplerPointer              m_Sampler;        
-    
+    OptimizerPointer            m_Optimizer;
+    SamplerPointer              m_Sampler;
+
     virtual void MinimizeOnce();
 
-  private: 
-    
+  private:
+
   }; // class MarkovRandomFieldFilter
- 
- 
+
+
 } // namespace otb
 
 #ifndef ITK_MANUAL_INSTANTIATION
diff --git a/Code/Markov/otbMarkovRandomFieldFilter.txx b/Code/Markov/otbMarkovRandomFieldFilter.txx
index b2fbcc4eb0..4d72cfd93e 100644
--- a/Code/Markov/otbMarkovRandomFieldFilter.txx
+++ b/Code/Markov/otbMarkovRandomFieldFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,7 +38,7 @@ MarkovRandomFieldFilter<TInputImage,TClassifiedImage>
   m_NumberOfIterations(0),
   m_StopCondition(MaximumNumberOfIterations),
   m_ExternalClassificationSet(false)
-			       */			
+			       */
 {
   m_NumberOfClasses = 0;
   m_MaximumNumberOfIterations = 50;
@@ -59,7 +59,7 @@ MarkovRandomFieldFilter<TInputImage,TClassifiedImage>
   if( (int)InputImageDimension != (int)ClassifiedImageDimension )
     {
       itk::OStringStream msg;
-      msg << "Input image dimension: " << InputImageDimension << " != output image dimension: " << ClassifiedImageDimension; 
+      msg << "Input image dimension: " << InputImageDimension << " != output image dimension: " << ClassifiedImageDimension;
       throw itk::ExceptionObject(__FILE__, __LINE__,msg.str().c_str(),ITK_LOCATION);
     }
   m_InputImageNeighborhoodRadius.Fill(m_NeighborhoodRadius);
@@ -68,17 +68,17 @@ MarkovRandomFieldFilter<TInputImage,TClassifiedImage>
   //     m_DummyVector.resize(0);
   //     this->SetMRFNeighborhoodWeight( m_DummyVector );
   //     this->SetDefaultMRFNeighborhoodWeight();
-  
+
   //srand((unsigned)time(0));
-  
+
 }
-  
+
 template<class TInputImage, class TClassifiedImage>
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::~MarkovRandomFieldFilter(void)
 {
 }
-  
+
 
 template<class TInputImage, class TClassifiedImage>
 void
@@ -95,7 +95,7 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 template <class TInputImage, class TClassifiedImage>
 const typename MarkovRandomFieldFilter<TInputImage, TClassifiedImage>::TrainingImageType*
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
-::GetTrainingInput(void) 
+::GetTrainingInput(void)
 {
   if (this->GetNumberOfInputs() < 2)
     {
@@ -112,27 +112,27 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::PrintSelf( std::ostream& os, itk::Indent indent ) const
 {
   Superclass::PrintSelf(os,indent);
-  
+
   os << indent <<" MRF Image filter object " << std::endl;
-  
+
   os << indent <<" Number of classes: " << m_NumberOfClasses << std::endl;
-  
-  os << indent <<" Maximum number of iterations: " << 
+
+  os << indent <<" Maximum number of iterations: " <<
     m_MaximumNumberOfIterations << std::endl;
-  
-  os << indent <<" Error tolerance for convergence: " << 
+
+  os << indent <<" Error tolerance for convergence: " <<
     m_ErrorTolerance << std::endl;
-  
-  os << indent <<" Size of the MRF neighborhood radius:" << 
+
+  os << indent <<" Size of the MRF neighborhood radius:" <<
     m_InputImageNeighborhoodRadius << std::endl;
-  
+
   os << indent << "StopCondition: "
      << m_StopCondition << std::endl;
-  
-  os << indent <<" Number of iterations: " << 
+
+  os << indent <<" Number of iterations: " <<
     m_NumberOfIterations << std::endl;
-  
-  os << indent <<" Lambda: " << 
+
+  os << indent <<" Lambda: " <<
     m_Lambda << std::endl;
 }// end PrintSelf
 
@@ -146,10 +146,10 @@ void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::GenerateInputRequestedRegion()
 {
-  
-  // this filter requires the all of the input images 
+
+  // this filter requires the all of the input images
   // to be at the size of the output requested region
-  InputImagePointer inputPtr = 
+  InputImagePointer inputPtr =
     const_cast< InputImageType * >( this->GetInput() );
   OutputImagePointer outputPtr = this->GetOutput();
   inputPtr->SetRequestedRegion( outputPtr->GetRequestedRegion() );
@@ -194,19 +194,19 @@ void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::GenerateData()
 {
-  
+
 //   InputImageConstPointer inputImage = this->GetInput();
-  
+
   //Allocate memory for the labelled images
   this->Allocate();
-  
+
   //Branch the pipeline
   this->Initialize();
-  
+
   //Run the Markov random field
   this->ApplyMarkovRandomFieldFilter();
-  
-  
+
+
 }// end GenerateData
 
 
@@ -219,14 +219,14 @@ void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::SetNeighborhoodRadius( const unsigned long radiusValue)
 {
-  //Set up the neighbor hood 
+  //Set up the neighbor hood
   NeighborhoodRadiusType radius;
   for(unsigned int i=0;i < InputImageDimension; ++i)
     {
       radius[i] = radiusValue;
-    }   
-  this->SetNeighborhoodRadius( radius ); 
-  
+    }
+  this->SetNeighborhoodRadius( radius );
+
 }// end SetNeighborhoodRadius
 
 
@@ -243,9 +243,9 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
     {
       radius[i] = radiusArray[i];
     }
-  //Set up the neighbor hood 
-  this->SetNeighborhoodRadius( radius ); 
-  
+  //Set up the neighbor hood
+  this->SetNeighborhoodRadius( radius );
+
 }// end SetNeighborhoodRadius
 
 
@@ -258,13 +258,13 @@ void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::SetNeighborhoodRadius( const NeighborhoodRadiusType &radius)
 {
-  //Set up the neighbor hood 
+  //Set up the neighbor hood
   for(unsigned int i=0;i < InputImageDimension; ++i)
     {
       m_InputImageNeighborhoodRadius[ i ] = radius[ i ];
       m_LabelledImageNeighborhoodRadius[ i ] =radius[ i ];
     }
-  
+
 }// end SetNeighborhoodRadius
 //-------------------------------------------------------
 
@@ -283,29 +283,29 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
       throw itk::ExceptionObject(__FILE__, __LINE__,"NumberOfClasses <= 0.",ITK_LOCATION);
     }
 
- 
+
   //Set the output labelled and allocate the memory
   LabelledImagePointer outputPtr = this->GetOutput();
-  
-  //Allocate the output buffer memory 
+
+  //Allocate the output buffer memory
   outputPtr->SetBufferedRegion( outputPtr->GetRequestedRegion() );
   outputPtr->Allocate();
-  
+
   //Copy input data in the output buffer memory or
   //initialize to random values if not set
-  LabelledImageRegionIterator  
+  LabelledImageRegionIterator
     outImageIt( outputPtr, outputPtr->GetRequestedRegion() );
 
   if (m_ExternalClassificationSet)
     {
       typename TrainingImageType::ConstPointer  trainingImage = this->GetTrainingInput();
-      LabelledImageRegionConstIterator 
+      LabelledImageRegionConstIterator
           trainingImageIt( trainingImage, outputPtr->GetRequestedRegion() );
-      
+
       while ( !outImageIt.IsAtEnd() )
 	{
 	  LabelledImagePixelType labelvalue =  static_cast<LabelledImagePixelType> (trainingImageIt.Get());
-	  
+
 	  outImageIt.Set( labelvalue );
 	  ++trainingImageIt;
 	  ++outImageIt;
@@ -314,7 +314,7 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
   else //set to random value
     {
 //       srand((unsigned)time(0));
- 
+
       while ( !outImageIt.IsAtEnd() )
 	{
 	  LabelledImagePixelType randomvalue = static_cast<LabelledImagePixelType>(
@@ -323,11 +323,11 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 	  outImageIt.Set( randomvalue );
 	  ++outImageIt;
 	}// end while
-      
-        
+
+
     }
-  
-  
+
+
 }// Allocate
 
 /**
@@ -338,56 +338,56 @@ void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::Initialize() throw (itk::ExceptionObject)
 {
-  
+
   m_ImageDeltaEnergy=0.0;
-  
+
   InputImageSizeType inputImageSize =
       this->GetInput()->GetBufferedRegion().GetSize();
-  
+
   //---------------------------------------------------------------------
   //Get the number of valid pixels in the output MRF image
-  //---------------------------------------------------------------------    
-  
+  //---------------------------------------------------------------------
+
   m_TotalNumberOfPixelsInInputImage = 1;
   m_TotalNumberOfValidPixelsInOutputImage = 1;
-      
+
   for( unsigned int i=0; i < InputImageDimension; i++ )
     {
       m_TotalNumberOfPixelsInInputImage *= static_cast<int>(inputImageSize[i]);
-      
-      m_TotalNumberOfValidPixelsInOutputImage *= 
-          ( static_cast<int>(inputImageSize[i]) 
-          - 2*m_InputImageNeighborhoodRadius[i] ); 
-    }  
-  
-  
+
+      m_TotalNumberOfValidPixelsInOutputImage *=
+          ( static_cast<int>(inputImageSize[i])
+          - 2*m_InputImageNeighborhoodRadius[i] );
+    }
+
+
   srand((unsigned)time(0));
-  
+
   if ( !m_EnergyRegularization )
     {
       itkExceptionMacro(<<"EnergyRegularization is not present" );
     }
-  
+
   if ( !m_EnergyFidelity )
     {
       itkExceptionMacro(<<"EnergyFidelity is not present" );
     }
-  
+
   if ( !m_Optimizer )
     {
       itkExceptionMacro(<<"Optimizer is not present" );
     }
-  
+
     if( !m_Sampler )
       {
 	itkExceptionMacro(<<"Sampler is not present");
       }
-    
+
     m_Sampler->SetLambda(m_Lambda);
     m_Sampler->SetEnergyRegularization(m_EnergyRegularization);
     m_Sampler->SetEnergyFidelity(m_EnergyFidelity);
     m_Sampler->SetNumberOfClasses(m_NumberOfClasses);
-}   
+}
 
 
 
@@ -395,37 +395,37 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 *Apply the MRF image filter
 */
 template<class TInputImage, class TClassifiedImage>
-void 
+void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::ApplyMarkovRandomFieldFilter()
 {
-  
+
   //Note: error should be defined according to the number of valid pixel in the output
-  int maxNumPixelError = (int) ( vnl_math_rnd (m_ErrorTolerance * 
+  int maxNumPixelError = (int) ( vnl_math_rnd (m_ErrorTolerance *
 					       m_TotalNumberOfPixelsInInputImage) );
-  
+
   m_NumberOfIterations = 0;
   m_ErrorCounter = m_TotalNumberOfValidPixelsInOutputImage;
 
-  while(( m_NumberOfIterations < m_MaximumNumberOfIterations ) && 
+  while(( m_NumberOfIterations < m_MaximumNumberOfIterations ) &&
  	( m_ErrorCounter >= maxNumPixelError ) )
     {
       otbMsgDebugMacro(<< "Iteration No." << m_NumberOfIterations);
 //       std::cerr <<  "Iteration No." << m_NumberOfIterations << std::endl;
-      
+
       this->MinimizeOnce();
-      
-      otbMsgDebugMacro(<< "m_ErrorCounter/m_TotalNumberOfPixelsInInputImage: " 
+
+      otbMsgDebugMacro(<< "m_ErrorCounter/m_TotalNumberOfPixelsInInputImage: "
 		       << m_ErrorCounter/((double)(m_TotalNumberOfPixelsInInputImage)));
-//       std::cerr << "m_ErrorCounter/m_TotalNumberOfPixelsInInputImage: " 
+//       std::cerr << "m_ErrorCounter/m_TotalNumberOfPixelsInInputImage: "
 // 		       << m_ErrorCounter/((double)(m_TotalNumberOfPixelsInInputImage))
 //           << std::endl;
 //       std::cerr <<  "m_ImageDeltaEnergy: " << m_ImageDeltaEnergy << std::endl;
-      
+
       ++m_NumberOfIterations;
-      
-    }    
-  
+
+    }
+
   otbMsgDebugMacro(<< "m_NumberOfIterations: " << m_NumberOfIterations);
   otbMsgDebugMacro(<< "m_MaximumNumberOfIterations: " << m_MaximumNumberOfIterations);
   otbMsgDebugMacro(<< "m_ErrorCounter: " << m_ErrorCounter);
@@ -434,17 +434,17 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 //   std::cerr << "m_MaximumNumberOfIterations: " << m_MaximumNumberOfIterations << std::endl;
 //   std::cerr << "m_ErrorCounter: " << m_ErrorCounter << std::endl;
 //   std::cerr << "maxNumPixelError: " << maxNumPixelError << std::endl;
-  
+
   //Determine stop condition
   if( m_NumberOfIterations >= m_MaximumNumberOfIterations )
     {
       m_StopCondition = MaximumNumberOfIterations;
     }
-  else if( m_ErrorCounter <= maxNumPixelError ) 
+  else if( m_ErrorCounter <= maxNumPixelError )
     {
       m_StopCondition = ErrorTolerance;
     }
-  
+
 }// ApplyMarkovRandomFieldFilter
 
 
@@ -452,22 +452,22 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 *Apply the MRF image filter on the whole image once
 */
 template<class TInputImage, class TClassifiedImage>
-void 
+void
 MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
 ::MinimizeOnce()
 {
   LabelledImageNeighborhoodIterator
       labelledIterator(m_LabelledImageNeighborhoodRadius, this->GetOutput(),
                        this->GetOutput()->GetLargestPossibleRegion() );
-  InputImageNeighborhoodIterator 
+  InputImageNeighborhoodIterator
       dataIterator(m_InputImageNeighborhoodRadius, this->GetInput(),
                    this->GetInput()->GetLargestPossibleRegion() );
   m_ErrorCounter = 0;
-  
+
   for (labelledIterator.GoToBegin(), dataIterator.GoToBegin();
        !labelledIterator.IsAtEnd();
        ++labelledIterator, ++dataIterator){
-    
+
     LabelledImagePixelType value;
     bool changeValueBool;
     m_Sampler->Compute(dataIterator,labelledIterator);
@@ -479,7 +479,7 @@ MarkovRandomFieldFilter<TInputImage, TClassifiedImage>
       m_ImageDeltaEnergy += m_Sampler->GetDeltaEnergy();
     }
   }
-  
+
 }
 
 
diff --git a/Code/MultiScale/otbConvexOrConcaveClassificationFilter.h b/Code/MultiScale/otbConvexOrConcaveClassificationFilter.h
index b3fe2587cb..c87061cff4 100644
--- a/Code/MultiScale/otbConvexOrConcaveClassificationFilter.h
+++ b/Code/MultiScale/otbConvexOrConcaveClassificationFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -34,10 +34,10 @@ namespace Functor
      * satellite imagery. IEEE Transactions on geoscience and remote sensing, vol. 39,
      * NO. 2, February 2001, p. 309-320.
      * \par
-     *  
+     *
      * This functor implements the following decision rule to classify a pixel between the three classes
      * Convex, Concave and Flat. Let \f$f\f$ denote the input image and \f$\psi_{N}(f)\f$ the geodesic leveling
-     * of \f$f\f$ with a structuring element of size \f$N\f$. One can derive the following decision rule to 
+     * of \f$f\f$ with a structuring element of size \f$N\f$. One can derive the following decision rule to
      * classify \f$f\f$ into Convex (label \f$\stackrel{\smile}{k}\f$), Concave (label \f$\stackrel{\frown}{k}\f$)
      * and Flat (label \f$\bar{k}\f$):
      *
@@ -53,7 +53,7 @@ namespace Functor
     template<class TInput,class TOutput>
       class ConvexOrConcaveDecisionRule
       {
-	
+
       public:
 	/**
 	 * Constructor
@@ -89,7 +89,7 @@ namespace Functor
 	      }
 	    return resp;
 	  }
-	/** 
+	/**
 	 * Set the convex label
 	 * \param label the convex label
 	 */
@@ -105,7 +105,7 @@ namespace Functor
 	  {
 	    return m_ConvexLabel;
 	  }
-	/** 
+	/**
 	 * Set the concave label
 	 * \param label the concave label
 	 */
@@ -121,7 +121,7 @@ namespace Functor
 	  {
 	    return m_ConcaveLabel;
 	  }
-	/** 
+	/**
 	 * Set the flat label
 	 * \param label the flat label
 	 */
@@ -168,43 +168,43 @@ namespace Functor
 
 /** \class ConvexOrConcaveClassificationFilter
  *  \brief This filter apply the Convex, Concave and flat classification functor to the whole image.
- * 
+ *
  *  Please refer to the documentation of the Functor::ConvexOrConcaveDecisionRule for more details.
  *
- * \sa GeodesicMorphologyDecompositionImageFilter 
+ * \sa GeodesicMorphologyDecompositionImageFilter
  * \sa GeodesicMorphologyLevelingFilter
  */
 template <class TInputImage, class TOutputImage>
 class ITK_EXPORT ConvexOrConcaveClassificationFilter
   : public itk::BinaryFunctorImageFilter<TInputImage,TInputImage, TOutputImage,
-    Functor::ConvexOrConcaveDecisionRule<typename TInputImage::PixelType, 
+    Functor::ConvexOrConcaveDecisionRule<typename TInputImage::PixelType,
                                          typename TOutputImage::PixelType> >
 {
  public:
   /** Standard typedefs */
   typedef ConvexOrConcaveClassificationFilter Self;
   typedef itk::BinaryFunctorImageFilter<TInputImage,TInputImage, TOutputImage,
-   Functor::ConvexOrConcaveDecisionRule<typename TInputImage::PixelType, 
+   Functor::ConvexOrConcaveDecisionRule<typename TInputImage::PixelType,
                                         typename TOutputImage::PixelType> > Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ConvexOrConcaveClassificationFilter,BinaryFunctorImageFilter);
-  
+
   /** Template class typedef */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::PixelType LabelType;
-  typedef Functor::ConvexOrConcaveDecisionRule<typename TInputImage::PixelType, 
+  typedef Functor::ConvexOrConcaveDecisionRule<typename TInputImage::PixelType,
     typename TOutputImage::PixelType> DecisionFunctorType;
   /**
    * Set the input image
    * \param image the input image
-   * 
+   *
    */
   void SetInput(const TInputImage * image)
     {
@@ -213,7 +213,7 @@ class ITK_EXPORT ConvexOrConcaveClassificationFilter
   /**
    * Set the input leveling image
    * \param leveling the input leveling image
-   * 
+   *
    */
   void SetInputLeveling(const TInputImage * leveling)
     {
diff --git a/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.h b/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.h
index c201d85382..166ac64393 100644
--- a/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.h
+++ b/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -38,11 +38,11 @@ namespace otb
  * NO. 2, February 2001, p. 309-320.
  * \par
  *
- *  Given \f$\gamma^{\star}_{N}\f$ the geodesic opening by reconstruction morphological operator 
- *  and \f$\varphi^{\star}_{N}\f$ the geodesic closing  by reconstruction morphological operator 
+ *  Given \f$\gamma^{\star}_{N}\f$ the geodesic opening by reconstruction morphological operator
+ *  and \f$\varphi^{\star}_{N}\f$ the geodesic closing  by reconstruction morphological operator
  *  for a structuring element of size \f$N\f$, one can define the two following membership functions for
  *  the input image \f$f\f$:
- * 
+ *
  *  \f[
  *  \stackrel{\smile}{\mu} = f-\gamma^{\star}_{N}(f)
  *  \f]
@@ -51,12 +51,12 @@ namespace otb
  *  \f]
  *
  * Where \f$\stackrel{\smile}{\mu}\f$ denotes the likelihood of the current pixel to belong to a convex structure
- * of the input image \f$f\f$ (i.e. brighter than the surrounding background) with respect to the size of the 
+ * of the input image \f$f\f$ (i.e. brighter than the surrounding background) with respect to the size of the
  * structuring element \f$N\f$, and \f$\stackrel{\frown}{\mu}\f$ denotes the likelihood of the current pixel to
  * belong to a concave structure.
  *
  * This two membership functions can be used to define a simplification operator \f$\psi_{N}\f$ called leveling,
- * which removes from the input image \f$f\f$ the structures located by \f$\stackrel{\smile}{\mu}\f$ and 
+ * which removes from the input image \f$f\f$ the structures located by \f$\stackrel{\smile}{\mu}\f$ and
  * \f$\stackrel{\frown}{\mu}\f$:
  *
  * \f[
@@ -64,13 +64,13 @@ namespace otb
  *  \gamma^{\star}_{N}(f)&:& \stackrel{\smile}{\mu}>\stackrel{\frown}{\mu}\\
  *  \varphi^{\star}_{N}(f)&:& \stackrel{\frown}{\mu}>\stackrel{\smile}{\mu}\\
  *   f&:&\stackrel{\frown}{\mu}=\stackrel{\smile}{\mu}
- *  \end{array}\right. 
+ *  \end{array}\right.
  * \f]
  *
  * This filter performs this image decomposition at a given structuring element size. The GetOutput() method returns
  * \f$\psi_{N}(f)\f$, the GetConvexMap() method returns \f$\stackrel{\smile}{\mu}\f$ and the GetConcaveMap() method
  *  returns \f$\stackrel{\frown}{\mu}\f$.
- * 
+ *
  * The PreserveIntensities and the FullyConnected flags reflects the option of the geodesic morphology filters from ITK.
  *
  * \sa GeodesicMorphologyLevelingFilter
@@ -87,13 +87,13 @@ class ITK_EXPORT GeodesicMorphologyDecompositionImageFilter
   typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(GeodesicMorphologyDecompositionImageFilter, ImageToImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
@@ -105,27 +105,27 @@ class ITK_EXPORT GeodesicMorphologyDecompositionImageFilter
   typedef itk::SubtractImageFilter<InputImageType,InputImageType,OutputImageType> ConvexFilterType;
   typedef itk::SubtractImageFilter<OutputImageType,InputImageType,OutputImageType> ConcaveFilterType;
   typedef otb::GeodesicMorphologyLevelingFilter<InputImageType,OutputImageType,OutputImageType> LevelingFilterType;
-  
+
   /** Pointers typedefs*/
   typedef typename OpeningFilterType::Pointer OpeningFilterPointerType;
   typedef typename ClosingFilterType::Pointer ClosingFilterPointerType;
   typedef typename LevelingFilterType::Pointer LevelingFilterPointerType;
   typedef typename ConvexFilterType::Pointer ConvexFilterPointerType;
   typedef typename ConcaveFilterType::Pointer ConcaveFilterPointerType;
-  
+
   /** Radius of the structuring element */
   itkSetMacro(Radius,RadiusType);
   itkGetConstReferenceMacro(Radius,RadiusType);
-  
-  /** 
+
+  /**
    * Get the convex likehood map.
-   * \return The convex likehood map. 
+   * \return The convex likehood map.
    */
   OutputImageType * GetConvexMap(void);
 
-  /** 
+  /**
    * Get the concave likehood map.
-   * \return The concave likehood map. 
+   * \return The concave likehood map.
    */
   OutputImageType * GetConcaveMap(void);
 
@@ -149,7 +149,7 @@ protected:
 private:
   GeodesicMorphologyDecompositionImageFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   /** Radius of the structuring element */
   RadiusType m_Radius;
   /** Opening filter */
diff --git a/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.txx b/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.txx
index 31e747ee0d..5ac1163a83 100644
--- a/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.txx
+++ b/Code/MultiScale/otbGeodesicMorphologyDecompositionImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -80,11 +80,11 @@ GeodesicMorphologyDecompositionImageFilter<TInputImage,TOutputImage,TStructuring
   m_ConvexFilter->GraftOutput(this->GetConvexMap());
   m_ConvexFilter->Update();
   this->GraftNthOutput(1,m_ConvexFilter->GetOutput());
-  
+
   m_ConcaveFilter->GraftOutput(this->GetConcaveMap());
   m_ConcaveFilter->Update();
   this->GraftNthOutput(2,m_ConcaveFilter->GetOutput());
-  
+
   m_LevelingFilter->GraftOutput(this->GetOutput());
   m_LevelingFilter->Update();
   this->GraftOutput(m_LevelingFilter->GetOutput());
diff --git a/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h b/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h
index 1ce1f1a09c..8f32c7c53a 100644
--- a/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h
+++ b/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,22 +34,22 @@ namespace otb
  * satellite imagery. IEEE Transactions on geoscience and remote sensing, vol. 39,
  * NO. 2, February 2001, p. 309-320.
  * \par
- * 
+ *
  * It provides a geodesic decomposition of the input image, with the following scheme.
- * Let \f$f_0\f$ denote the input image,\f$\stackrel{\smile}{\mu}_{N}(f)\f$ denote 
- * the convex membership function, \f$ \stackrel{\frown}{\mu}_{N}(f) \f$ denote the concave 
- *  membership function and \f$\psi_{N}(f)\f$ denote the leveling function, for a given radius \f$ N \f$ 
+ * Let \f$f_0\f$ denote the input image,\f$\stackrel{\smile}{\mu}_{N}(f)\f$ denote
+ * the convex membership function, \f$ \stackrel{\frown}{\mu}_{N}(f) \f$ denote the concave
+ *  membership function and \f$\psi_{N}(f)\f$ denote the leveling function, for a given radius \f$ N \f$
  * as defined in the documentation  of the GeodesicMorphologyDecompositionImageFilter .
- * Let \f$[N_{1},\ldots,N_{n}]\f$ denote a range of increasing radius (or scales). The iterative 
+ * Let \f$[N_{1},\ldots,N_{n}]\f$ denote a range of increasing radius (or scales). The iterative
  * decomposition is defined as follows:
- * 
+ *
  * \f[
  *  f_{n} = \psi_{N_{n}}(f_{n-1})
  * \f]
  *
  * \f[
  *  \stackrel{\frown}{f}_{n} = \stackrel{\frown}{\mu}_{N_{N}}(f_{n})
- * \f] 
+ * \f]
  *
  * \f[
  *  \stackrel{\smile}{f}_{n} = \stackrel{\smile}{\mu}_{N_{N}}(f_{n})
@@ -82,12 +82,12 @@ public:
   typedef typename OutputImageListType::Pointer        OutputImageListPointerType;
   typedef typename Superclass::OutputImagePointerType  OutputImagePointerType;
   /** Input related typedefs */
-  typedef typename Superclass::InputImageType          InputImageType;          
+  typedef typename Superclass::InputImageType          InputImageType;
   typedef typename Superclass::InputImageRegionType    InputImageRegionType;
   typedef typename InputImageType::Pointer             InputImagePointerType;
   typedef typename InputImageType::ConstPointer        InputImageConstPointerType;
-  typedef typename InputImageType::SizeType            SizeType;                 
-  typedef typename InputImageType::ValueType           ValueType;  
+  typedef typename InputImageType::SizeType            SizeType;
+  typedef typename InputImageType::ValueType           ValueType;
   typedef typename InputImageType::PixelType           PixelType;
   typedef typename InputImageType::SpacingType         SpacingType;
 
@@ -120,8 +120,8 @@ public:
    * \return The concave membership function for each scale.
    */
   OutputImageListType * GetConcaveOutput(void);
-   
-protected:  
+
+protected:
   /** Constructor */
   GeodesicMorphologyIterativeDecompositionImageFilter();
   /** Destructor */
@@ -133,7 +133,7 @@ protected:
   /** Main computation method */
   virtual void GenerateData();
   /** Printself method */
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
  private:
   /** The step for the scale analysis */
diff --git a/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.txx b/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.txx
index b7675b8ff3..bc50350642 100644
--- a/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.txx
+++ b/Code/MultiScale/otbGeodesicMorphologyIterativeDecompositionImageFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -54,8 +54,8 @@ namespace otb
   ::GetOutput(void)
   {
     return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(2));
-  }  
- 
+  }
+
   template <class TImage, class TStructuringElement>
   typename GeodesicMorphologyIterativeDecompositionImageFilter<TImage, TStructuringElement>
   ::OutputImageListType*
@@ -152,8 +152,8 @@ namespace otb
 	  }
       }
   }
-  
-  
+
+
   template <class TImage, class TStructuringElement>
   void
   GeodesicMorphologyIterativeDecompositionImageFilter<TImage, TStructuringElement>
@@ -162,12 +162,12 @@ namespace otb
     // Retrieving input/output pointers
     InputImagePointerType inputPtr = this->GetInput();
     OutputImageListPointerType outputPtr = this->GetOutput();
-    
+
     // For each output image
     typename OutputImageListType::Iterator outputListIt = outputPtr->Begin();
     inputPtr->SetRequestedRegion(outputListIt.Get()->GetRequestedRegion());
   }
-  
+
   /**
    * Main computation method
    */
@@ -175,7 +175,7 @@ namespace otb
   void
   GeodesicMorphologyIterativeDecompositionImageFilter<TImage, TStructuringElement>
   ::GenerateData(void)
-  { 
+  {
     //Input image pointer
     InputImagePointerType current = this->GetInput();
     OutputImageListPointerType outputPtr = this->GetOutput();
@@ -185,7 +185,7 @@ namespace otb
     unsigned int i = 0;
 
     DecompositionFilterPointerType filter;
-    
+
     while(i<m_NumberOfIterations)
       {
 	filter = DecompositionFilterType::New();
@@ -197,13 +197,13 @@ namespace otb
 	filter->GetOutput()->SetRequestedRegion(outputPtr->GetNthElement(i)->GetRequestedRegion());
 	filter->GetOutput()->PropagateRequestedRegion();
 	filter->GetOutput()->UpdateOutputData();
-	
+
 	outputPtr->SetNthElement(i,filter->GetOutput());
 	concOutputPtr->SetNthElement(i,filter->GetConvexMap());
 	convOutputPtr->SetNthElement(i,filter->GetConcaveMap());
-	
+
 	current=filter->GetOutput();
-	
+
 	++i;
       }
 
diff --git a/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.h b/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.h
index 4514ce7221..f08774f767 100644
--- a/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.h
+++ b/Code/MultiScale/otbGeodesicMorphologyLevelingFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace Functor
   {
     /** \class LevelingFunctor
      * \brief This functor performs the pixel-wise leveling operation needed in the
-     * geodesic morphology decomposition filter. For more details, please refer to 
+     * geodesic morphology decomposition filter. For more details, please refer to
      * the documentation of this filter.
      * \sa GeodesicMorphologyDecompositionImageFilter
      */
@@ -62,7 +62,7 @@ namespace Functor
   }// end namespace Functor
 
 /** \class GeodesicMorphologyLevelingFilter
- *  \brief This filter performs the leveling operation defined in the documentation of 
+ *  \brief This filter performs the leveling operation defined in the documentation of
  *  the geodesic decomposition image filter, given the original image, convex and concave membership
  *  functions. Please refer to the documentation of this filter for more details.
  *
@@ -86,13 +86,13 @@ class ITK_EXPORT GeodesicMorphologyLevelingFilter
                              typename TOutputImage::PixelType> >Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(GeodesicMorphologyLevelingFilter,TernaryFunctorImageFilter);
- 
+
   /**
    * Set the convex membership image.
    */
diff --git a/Code/MultiScale/otbImageToProfileFilter.h b/Code/MultiScale/otbImageToProfileFilter.h
index 9c87fc0ada..93c93b2aa8 100644
--- a/Code/MultiScale/otbImageToProfileFilter.h
+++ b/Code/MultiScale/otbImageToProfileFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
  *  \f[
  *  \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots,n_{N}\} \}
  *  \f]
- * 
+ *
  * with \f$ \{n_{1},\ldots,n_{N}\} \f$ beeing a range of parameter. This class is a base class templated
  * by the type of the filter \f$ \phi \f$. The SetProfileParameter() is a virtual method meant to be
  * rewritten so that the filter can be correctly set up in sub-classes.
@@ -48,13 +48,13 @@ class ITK_EXPORT ImageToProfileFilter
  typedef ImageToImageListFilter<TInputImage,TOutputImage> Superclass;
  typedef itk::SmartPointer<Self>                          Pointer;
  typedef itk::SmartPointer<const Self>                    ConstPointer;
- 
+
  /** Type macro */
  itkNewMacro(Self);
- 
+
  /** Creation through object factory macro */
  itkTypeMacro(ImageToProfileFilter, ImageToImageListFilter);
- 
+
  /** Template parameters typedefs */
  typedef TInputImage  InputImageType;
  typedef TOutputImage OutputImageType;
@@ -79,8 +79,8 @@ class ITK_EXPORT ImageToProfileFilter
  itkGetMacro(OutputIndex,unsigned int);
 
 protected:
- /** 
-  * Set the profile parameter 
+ /**
+  * Set the profile parameter
   * \param param The parameter to set
   */
  virtual void SetProfileParameter(ParameterType param){};
@@ -113,7 +113,7 @@ private:
  ParameterType m_Step;
  /** The index of the output of the filter used for the profile */
  unsigned int m_OutputIndex;
- 
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/MultiScale/otbImageToProfileFilter.txx b/Code/MultiScale/otbImageToProfileFilter.txx
index 0d1b386854..802ff6d67d 100644
--- a/Code/MultiScale/otbImageToProfileFilter.txx
+++ b/Code/MultiScale/otbImageToProfileFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -35,8 +35,8 @@ ImageToProfileFilter<TInputImage,TOutputImage,TFilter,TParameter>
   m_OutputIndex = 0;
   m_Filter= FilterType::New();
 }
-/** 
- * GenerateOutputInformation method 
+/**
+ * GenerateOutputInformation method
  */
 template <class TInputImage, class TOutputImage, class TFilter, class TParameter>
 void
@@ -71,8 +71,8 @@ ImageToProfileFilter<TInputImage,TOutputImage,TFilter,TParameter>
 	}
     }
 }
-/** 
- * Generate input requested region 
+/**
+ * Generate input requested region
  */
 template <class TInputImage, class TOutputImage, class TFilter, class TParameter>
 void
@@ -82,22 +82,22 @@ ImageToProfileFilter<TInputImage,TOutputImage,TFilter,TParameter>
   // Retrieving input/output pointers
   InputImagePointerType inputPtr = this->GetInput();
   OutputImageListPointerType outputPtr = this->GetOutput();
-  
+
   // For each output image
   typename OutputImageListType::Iterator outputListIt = outputPtr->Begin();
-  
+
   m_Filter->SetInput(inputPtr);
 
   // Use the filter to generate input requested region
   while(outputListIt!=outputPtr->End())
-    {  
+    {
       m_Filter->GetOutput(m_OutputIndex)->SetRequestedRegion(outputListIt.Get()->GetRequestedRegion());
       m_Filter->PropagateRequestedRegion(outputListIt.Get());
       ++outputListIt;
     }
 }
-/** 
- * GenerateData method 
+/**
+ * GenerateData method
  */
 template <class TInputImage, class TOutputImage, class TFilter, class TParameter>
 void
@@ -134,8 +134,8 @@ ImageToProfileFilter<TInputImage,TOutputImage,TFilter,TParameter>
   os<<indent<<"ProfileSize: " <<m_ProfileSize             <<std::endl;
   os<<indent<<"InitialValue: "<<m_InitialValue            <<std::endl;
   os<<indent<<"Step: "        <<m_Step                    <<std::endl;
-  
-  
+
+
 }
 } // End namespace otb
 #endif
diff --git a/Code/MultiScale/otbMorphologicalClosingProfileFilter.h b/Code/MultiScale/otbMorphologicalClosingProfileFilter.h
index a1cc07a500..14615cd6d6 100644
--- a/Code/MultiScale/otbMorphologicalClosingProfileFilter.h
+++ b/Code/MultiScale/otbMorphologicalClosingProfileFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ namespace otb
 {
 /** \class MorphologicalClosingProfileFilter
  *  \brief This filter compute the morphological closing profile.
- * 
+ *
  * This algorithm is based on the following publication:
  * \par
  * Martino Pesaresi and Jon Alti Benediktsson, Member, IEEE:
@@ -33,7 +33,7 @@ namespace otb
  * satellite imagery. IEEE Transactions on geoscience and remote sensing, vol. 39,
  * NO. 2, February 2001, p. 309-320.
  * \par
- * 
+ *
  * The opening profile is a set of images beeing the result of a geodesic morphological
  * closing by reconstruction with an increasing range of structuring element sizes.
  *
@@ -59,13 +59,13 @@ class ITK_EXPORT MorphologicalClosingProfileFilter
           unsigned int> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(MorphologicalClosingProfileFilter,ImageToProfileFilter);
-  
+
   typedef TStructuringElement StructuringElementType;
   typedef typename Superclass::ParameterType ParameterType;
 
diff --git a/Code/MultiScale/otbMorphologicalOpeningProfileFilter.h b/Code/MultiScale/otbMorphologicalOpeningProfileFilter.h
index 8bfb8f33e5..4907bbe739 100644
--- a/Code/MultiScale/otbMorphologicalOpeningProfileFilter.h
+++ b/Code/MultiScale/otbMorphologicalOpeningProfileFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@ namespace otb
 {
 /** \class MorphologicalOpeningProfileFilter
  *  \brief This filter compute the morphological opening profile.
- * 
+ *
  * This algorithm is based on the following publication:
  * \par
  * Martino Pesaresi and Jon Alti Benediktsson, Member, IEEE:
@@ -33,7 +33,7 @@ namespace otb
  * satellite imagery. IEEE Transactions on geoscience and remote sensing, vol. 39,
  * NO. 2, February 2001, p. 309-320.
  * \par
- * 
+ *
  * The opening profile is a set of images beeing the result of a geodesic morphological
  * opening by reconstruction with an increasing range of structuring element sizes.
  *
@@ -59,16 +59,16 @@ class ITK_EXPORT MorphologicalOpeningProfileFilter
           unsigned int> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(MorphologicalOpeningProfileFilter,ImageToProfileFilter);
-  
+
   typedef TStructuringElement StructuringElementType;
   typedef typename Superclass::ParameterType ParameterType;
- 
+
 protected:
   /** Set the profile parameter */
   virtual void SetProfileParameter(ParameterType param)
diff --git a/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h b/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h
index f45a2c4720..2705b04961 100644
--- a/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ namespace otb
  * computed. If the smoothing filter is a morphological filter, this
  * is no longer true, as the filter is not linear. However, by keeping
  * the details possibly lost in the down-sampling operation, such a
- * decomposition can be used. 
+ * decomposition can be used.
  *
  * The MorphologicalPyramidAnalysisFilter provide such a
  * decomposition. It's computation process is an iterative analyse
@@ -71,12 +71,12 @@ public:
   typedef typename OutputImageListType::Pointer        OutputImageListPointerType;
   typedef typename Superclass::OutputImagePointerType  OutputImagePointerType;
   /** Input related typedefs */
-  typedef typename Superclass::InputImageType          InputImageType;          
+  typedef typename Superclass::InputImageType          InputImageType;
   typedef typename Superclass::InputImageRegionType    InputImageRegionType;
   typedef typename InputImageType::Pointer             InputImagePointerType;
   typedef typename InputImageType::ConstPointer        InputImageConstPointerType;
-  typedef typename InputImageType::SizeType            SizeType;                 
-  typedef typename InputImageType::ValueType           ValueType;  
+  typedef typename InputImageType::SizeType            SizeType;
+  typedef typename InputImageType::ValueType           ValueType;
   typedef typename InputImageType::PixelType           PixelType;
   typedef typename InputImageType::SpacingType         SpacingType;
   /** Accessors */
@@ -109,8 +109,8 @@ public:
    * \return The brighter details extracted from the resampling operation.
    */
   OutputImageListType * GetInfDeci(void);
-  
-protected:  
+
+protected:
   /** Constructor */
   MorphologicalPyramidAnalysisFilter();
   /** Destructor */
@@ -119,7 +119,7 @@ protected:
   /** Main computation method */
   virtual void GenerateData();
   /** Printself method */
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
  private:
   /** Number of levels of the algorithm */
diff --git a/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.txx b/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.txx
index 3fd33c4f2a..51c828408a 100644
--- a/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidAnalysisFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -69,7 +69,7 @@ namespace otb
   ::GetOutput(void)
   {
     return dynamic_cast<OutputImageListType*>(this->itk::ProcessObject::GetOutput(2));
-  }  
+  }
   /**
    * Get The SupFilter details
    * \return The brighter details extracted from the filtering operation.
@@ -125,7 +125,7 @@ namespace otb
   void
   MorphologicalPyramidAnalysisFilter<TInputImage,TOutputImage,TMorphoFilter>
   ::GenerateData(void)
-  { 
+  {
     // Input image pointer
     OutputImageListType *   OutputImageList   = this->GetOutput();
 
@@ -139,9 +139,9 @@ namespace otb
     typedef itk::SubtractImageFilter<InputImageType,InputImageType,OutputImageType> SubtractFilterType;
     typedef itk::MaximumImageFilter<InputImageType,InputImageType,InputImageType> MaxFilterType;
     typedef itk::ImageDuplicator<InputImageType> DuplicatorType;
-    typedef otb::MorphologicalPyramid::Resampler<InputImageType,OutputImageType> ResamplerType;  
+    typedef otb::MorphologicalPyramid::Resampler<InputImageType,OutputImageType> ResamplerType;
 
-    // Input Image duplication to the currentImage Pointer 
+    // Input Image duplication to the currentImage Pointer
     typename DuplicatorType::Pointer duplicator = DuplicatorType::New();
     duplicator->SetInputImage(this->GetInput());
     duplicator->Update();
@@ -150,18 +150,18 @@ namespace otb
 
     // Structuring element size computation
     const int structElementDimension=static_cast<int>(vcl_ceil(this->GetDecimationRatio()/2.));
-  
+
     // Structuring element creation
     KernelType structuringElement;
     structuringElement.SetRadius(structElementDimension);
     structuringElement.CreateStructuringElement();
-  
+
     // Filters declarations
     typename MorphoFilterType::Pointer morphoFilter;
     typename MaxFilterType::Pointer max;
     typename SubtractFilterType::Pointer subtract1,subtract2,subtract3,subtract4;
     typename ResamplerType::Pointer resampler1, resampler2;
-  
+
     // Size declaration
     typename InputImageType::SizeType size;
 
@@ -205,7 +205,7 @@ namespace otb
 	otbMsgDevMacro(<<"MorphologicalPyramidAnalysisFilter: subtract2 OK "<<subtract2->GetOutput()->GetLargestPossibleRegion().GetSize());
 	infFilter->PushBack(subtract2->GetOutput());
 	otbMsgDevMacro("MorphologicalPyramidAnalysisFilter: step "<<i<<" - Image appended to InfFilter");
-	
+
 	// New  Size
 	size = morphoFilter->GetOutput()->GetLargestPossibleRegion().GetSize();
 	for (int j =0; j<InputImageType::ImageDimension;j++)
@@ -215,15 +215,15 @@ namespace otb
 	    size[j]=static_cast<unsigned int>(vcl_ceil((static_cast<double>(sizeTmp)/this->GetDecimationRatio())+0.5));
 	  }
 	otbMsgDevMacro(<<"New size: "<<size);
-    
-	// Image subsampling 
+
+	// Image subsampling
 	// Current image becomes the newly subsampled image
 	resampler1 = ResamplerType::New();
 	resampler1->SetInput(morphoFilter->GetOutput());
 	resampler1->SetSize(size);
 	resampler1->Update();
 	currentImage=resampler1->GetOutput();
-	
+
 	otbMsgDevMacro(<<"MorphologicalPyramidAnalysisFilter: DownSampling OK "<<currentImage->GetLargestPossibleRegion().GetSize());
 	// New current image is appeneded to the output list
 	OutputImageList->PushBack(currentImage);
diff --git a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h
index c6c002fbeb..b9079531b6 100644
--- a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.h
@@ -10,8 +10,8 @@
  See OTBCopyright.txt for details.
 
 
- This software is distributed WITHOUT ANY WARRANTY; without even 
- the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+ 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.
 
  =========================================================================*/
@@ -27,11 +27,11 @@ namespace otb
       /**
        * \class MRToMSConverter
        * \brief This class convert a multi resolution decomposition from the morphological pyramid to a multi-scale one.
-       * 
+       *
        * This class convert a multi resolution decomposition from the morphological pyramid to a multi-scale one.
-       * 
+       *
        * The operation consists in iterativly upsampling and adding decimation details to a given detail image.
-       * 
+       *
        * \sa MorphologicalPyramidAnalyseFilter
        * \sa MorphologicalPyramidSynthesisFilter
        */
@@ -40,7 +40,7 @@ namespace otb
 	: public ImageListToImageListFilter<TInputImage,TOutputImage>
 	{
 	  public :
-	    /** Standard typedefs */ 
+	    /** Standard typedefs */
 	    typedef MRToMSConverter                                    Self;
 	  typedef ImageListToImageListFilter<TInputImage,TOutputImage> Superclass;
 	  typedef itk::SmartPointer<Self>                              Pointer;
@@ -60,7 +60,7 @@ namespace otb
 	  typedef typename Superclass::OutputImagePointer         OutputImagePointerType;
 	  typedef typename Superclass::OutputImageListType        OutputImageListType;
 	  typedef typename Superclass::OutputImageListPointerType OutputImageListPointerType;
-	  
+
 	  /**
 	   * Set The input list.
 	   * \param imageList The analysed image at each level of the pyramid.
@@ -90,12 +90,12 @@ namespace otb
 	   * Get the input list.
 	   * \return The list of the analysed image at each pyramid level.
 	   */
-	  InputImageListType* GetInput(void); 
+	  InputImageListType* GetInput(void);
 	  /**
 	   * Get The SupFilter details
 	   * \return The brighter details extracted from the filtering operation.
 	   */
-	  InputImageListType* GetSupFilter(void);   
+	  InputImageListType* GetSupFilter(void);
 	  /**
 	   * Get The InfFilter details
 	   * \return The darker details extracted from the filtering operation.
@@ -119,7 +119,7 @@ namespace otb
 	  OutputImageListType* GetOutput(void);
 	  /**
 	   * Get The SupFilter details at full resolution.
-	   * \return The brighter details extracted from the filtering operation 
+	   * \return The brighter details extracted from the filtering operation
 	   * resampled at full resolution.
 	   */
 	  OutputImageListType * GetSupFilterFullResolution(void);
@@ -131,7 +131,7 @@ namespace otb
 	  OutputImageListType * GetInfFilterFullResolution(void);
 	  /**
 	   * Get The SupDeci details at full resolution.
-	   * \return The brighter details extracted from the resampling operation 
+	   * \return The brighter details extracted from the resampling operation
 	   * resampled at full resolution.
 	   */
 	  OutputImageListType * GetSupDeciFullResolution(void);
diff --git a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx
index 5ad01806a3..d100c3e62c 100644
--- a/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidMRToMSConverter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -116,7 +116,7 @@ namespace otb
      * \param imageList The analysed image at each level of the pyramid.
      */
     template <class TInputImage, class TOutputImage>
-    void 
+    void
     MRToMSConverter<TInputImage,TOutputImage>
     ::SetInput(InputImageListType * imageList)
     {
@@ -127,7 +127,7 @@ namespace otb
      * \param imageList The brighter details extracted from the filtering operation.
      */
     template <class TInputImage, class TOutputImage>
-    void 
+    void
     MRToMSConverter<TInputImage,TOutputImage>
     ::SetSupFilter(InputImageListType * imageList)
     {
@@ -138,7 +138,7 @@ namespace otb
      * \param imageList The darker details extracted from the filtering operation.
      */
     template <class TInputImage, class TOutputImage>
-    void 
+    void
     MRToMSConverter<TInputImage,TOutputImage>
     ::SetInfFilter(InputImageListType * imageList)
     {
@@ -149,7 +149,7 @@ namespace otb
      * \param imageList The brighter details extracted from the filtering operation.
      */
     template <class TInputImage, class TOutputImage>
-    void 
+    void
     MRToMSConverter<TInputImage,TOutputImage>
     ::SetSupDeci(InputImageListType * imageList)
     {
@@ -160,7 +160,7 @@ namespace otb
      * \param imageList The darker details extracted from the filtering operation.
      */
     template <class TInputImage, class TOutputImage>
-    void 
+    void
     MRToMSConverter<TInputImage,TOutputImage>
     ::SetInfDeci(InputImageListType * imageList)
     {
@@ -180,7 +180,7 @@ namespace otb
     }
     /**
      * Get The SupFilter details.
-     * \return The brighter details extracted from the filtering operation 
+     * \return The brighter details extracted from the filtering operation
      */
     template <class TInputImage, class TOutputImage>
     typename MRToMSConverter<TInputImage,TOutputImage>
@@ -204,7 +204,7 @@ namespace otb
     }
     /**
      * Get The SupDeci details.
-     * \return The brighter details extracted from the resampling operation 
+     * \return The brighter details extracted from the resampling operation
      */
     template <class TInputImage, class TOutputImage>
     typename MRToMSConverter<TInputImage,TOutputImage>
@@ -240,7 +240,7 @@ namespace otb
       InputImageListPointerType  supDeci = this->GetSupDeci();
       InputImageListPointerType  infDeci = this->GetInfDeci();
       InputImageListPointerType  inputList = this->GetInput();
-      
+
       // Output images lists pointers
       OutputImageListPointerType  supFilterFullResolution = this->GetSupFilterFullResolution();
       OutputImageListPointerType  infFilterFullResolution = this->GetInfFilterFullResolution();
@@ -257,7 +257,7 @@ namespace otb
       // Full resolution size
       typename InputImageType::SizeType frsize = supFilter->Front()->GetLargestPossibleRegion().GetSize();
       otbMsgDevMacro(<<"MRToMSConverter: Full resolution size: "<<frsize);
-      
+
       // SupFilter resampling
       otbMsgDevMacro(<<"MRToMSConverter: SupFilter resampling.");
       InputImageListIteratorType it = supFilter->Begin();
diff --git a/Code/MultiScale/otbMorphologicalPyramidResampler.h b/Code/MultiScale/otbMorphologicalPyramidResampler.h
index bee233c147..0ddb486fbd 100644
--- a/Code/MultiScale/otbMorphologicalPyramidResampler.h
+++ b/Code/MultiScale/otbMorphologicalPyramidResampler.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,13 +27,13 @@ namespace otb
       /**
        * \class Resampler
        * \brief This class performs the resampling of the given image to the given size.
-       * 
-       * This class performs the resampling of the given image to the given size.It is used 
+       *
+       * This class performs the resampling of the given image to the given size.It is used
        * in the MorphologicalPyramidAnalyseFilter and MorphologicalPyramidSynthesisFilter.
-       * 
+       *
        * The resampling is done by the itk::ResampleImageFilter, templated with the interpolator
        * itk::LinearInterpolateImageFunction and the transform itk::ScaleTransform.
-       * 
+       *
        * \sa MorphologicalPyramidAnalyseFilter
        * \sa MorphologicalPyramidSynthesisFilter
        * \sa ResampleImageFilter
@@ -45,7 +45,7 @@ namespace otb
 	: public itk::ImageToImageFilter<TInputImage,TOutputImage>
 	{
 	  public :
-	    /** Standard typedefs */ 
+	    /** Standard typedefs */
 	    typedef Resampler                                         Self;
 	  typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
 	  typedef itk::SmartPointer<Self>                           Pointer;
@@ -67,7 +67,7 @@ namespace otb
 	  /** Size parameter accessor */
 	  itkSetMacro(Size,SizeType);
 	  itkGetMacro(Size,SizeType);
-  
+
 	protected:
 	  /** Constructor */
 	  Resampler();
diff --git a/Code/MultiScale/otbMorphologicalPyramidResampler.txx b/Code/MultiScale/otbMorphologicalPyramidResampler.txx
index 6eb2a736d1..4ab717148e 100644
--- a/Code/MultiScale/otbMorphologicalPyramidResampler.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidResampler.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -99,7 +99,7 @@ Resampler<TInputImage,TOutputImage>
   const typename InputImageType::SpacingType& inputSpacing    = inputPtr->GetSpacing();
   const typename InputImageType::IndexType&   inputStartIndex = inputPtr->GetLargestPossibleRegion().GetIndex();
   typename OutputImageType::IndexType   outputStartIndex;
-  typename OutputImageType::SpacingType spacing;  
+  typename OutputImageType::SpacingType spacing;
    for (i = 0; i < OutputImageType::ImageDimension; i++)
      {
      outputStartIndex[i] =  inputStartIndex[i] ;
@@ -128,7 +128,7 @@ Resampler<TInputImage, TOutputImage>
   typedef itk::LinearInterpolateImageFunction<InputImageType,double> InterpolatorType;
   typedef itk::ImageRegionConstIterator<OutputImageType> ConstIteratorType;
   typedef itk::ImageRegionIterator<OutputImageType> IteratorType;
-  
+
   // Resampling filter creation
   typename ResampleFilterType::Pointer resampler = ResampleFilterType::New();
   typename InterpolatorType::Pointer interpolator = InterpolatorType::New();
@@ -148,14 +148,14 @@ Resampler<TInputImage, TOutputImage>
   resampler->SetInterpolator(interpolator);
   resampler->SetOutputOrigin(this->GetInput()->GetOrigin());
   resampler->SetSize(this->GetSize());
-  resampler->SetOutputSpacing(inputSpacing);  
+  resampler->SetOutputSpacing(inputSpacing);
   resampler->ReleaseDataFlagOn();
 
-  // Progress accumulator 
+  // Progress accumulator
   itk::ProgressAccumulator::Pointer progress = itk::ProgressAccumulator::New();
   progress->SetMiniPipelineFilter(this);
   progress->RegisterInternalFilter(resampler, .5f);
-  
+
   // Input image connexion
   resampler->SetInput(this->GetInput());
   resampler->Update();
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h
index a4e0d97bcc..5f4cbc6fa9 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,25 +28,25 @@ namespace otb
  * The first step is to convert the multi-resolution analysis from the pyramid to a multi-scale one using the
  * MRToMSConverter filter.
  *
- * The segmentation algorithm used is based on seeds extraction using the ImageToPointSetFilter, followed by 
+ * The segmentation algorithm used is based on seeds extraction using the ImageToPointSetFilter, followed by
  * a connected threshold segmentation using the ConnectedThresholdImageFilter. A final relabelling step is done
- * with the LabelImageFilter adn RelabelImageFilter to remove object whose sizes are to small regarding the 
+ * with the LabelImageFilter adn RelabelImageFilter to remove object whose sizes are to small regarding the
  * MinimumObjectSize parameter. The threshold for seeds extraction and segmentation are computed using quantiles.
  *
- * A pre processing step is applied by multiplying the full resolution brighter details (resp. darker details) 
- * with the original image (resp. the inverted original image). This perfoms an enhancement of the regions contour 
+ * A pre processing step is applied by multiplying the full resolution brighter details (resp. darker details)
+ * with the original image (resp. the inverted original image). This perfoms an enhancement of the regions contour
  * precision.
- * 
- * The details from the pyramid are set via the SetBrighterDetails() and SetDarkerDetails() methods. The brighter and 
- * darker details depends on the filter used in the pyramid analysis. If the OpeningClosing filter is used, then the 
- * brighter details are those from the supFilter image list, whereas if the ClosingOpening filter is used, the brighter 
+ *
+ * The details from the pyramid are set via the SetBrighterDetails() and SetDarkerDetails() methods. The brighter and
+ * darker details depends on the filter used in the pyramid analysis. If the OpeningClosing filter is used, then the
+ * brighter details are those from the supFilter image list, whereas if the ClosingOpening filter is used, the brighter
  * details are those from the infFilter list.
- * 
- * The output of the segmentation filter is a single segmentation images list, containing first the brighter details 
- * segmentation from higher scale to lower, and then the darker details in the same order. The attention of the used 
+ *
+ * The output of the segmentation filter is a single segmentation images list, containing first the brighter details
+ * segmentation from higher scale to lower, and then the darker details in the same order. The attention of the used
  * is drawn to the fact that since the label filter used internally will deal with a large number of labels, so the
- * OutputPixelType is required to be sufficiently precise. Unsigned short or Unsigned long would be a good choice, 
- * unless the user has a very good reason to think that a less precise type will be sufficient.  
+ * OutputPixelType is required to be sufficiently precise. Unsigned short or Unsigned long would be a good choice,
+ * unless the user has a very good reason to think that a less precise type will be sufficient.
  *
  * \ingroup MultiScale
  * \sa MorphologicalPyramidSynthesisFilter,OpeningClosingMorphologicalFilter,
@@ -76,8 +76,8 @@ public:
   typedef typename Superclass::OutputImagePointerType  OutputImagePointerType;
   typedef typename OutputImageListType::Iterator       OutputImageListIteratorType;
   /** Input related typedefs */
-  typedef typename Superclass::InputImageType          InputImageType;  
-  typedef typename InputImageType::PixelType           InputPixelType;        
+  typedef typename Superclass::InputImageType          InputImageType;
+  typedef typename InputImageType::PixelType           InputPixelType;
   typedef typename InputImageType::Pointer             InputImagePointerType;
   typedef typename Superclass::InputImageListType      InputImageListType;
   typedef typename InputImageListType::Pointer         InputImageListPointerType;
@@ -132,7 +132,7 @@ public:
    */
   InputImageListType *GetDarkerDetails(void);
 
-protected:  
+protected:
   /** Constructor */
   MorphologicalPyramidSegmentationFilter();
   /** Destructor */
@@ -141,7 +141,7 @@ protected:
   /** Main computation method */
   virtual void GenerateData();
   /** Printself method */
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
  private:
   unsigned long  m_MinimumObjectSize;
   /** Quantile for seeds determination */
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx
index 3c727b3804..73648dbb33 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmentationFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ namespace otb
  */
 template <class TInputImage, class TOutputImage>
 MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
-::MorphologicalPyramidSegmentationFilter() 
+::MorphologicalPyramidSegmentationFilter()
 {
   this->SetNumberOfRequiredInputs(3);
 	m_MinimumObjectSize = 10;
@@ -45,13 +45,13 @@ MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
 template <class TInputImage, class TOutputImage>
 MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
 ::~MorphologicalPyramidSegmentationFilter() {}
-  
+
 /**
  * Set the reference image.
  * \param image The reference image which was decomposed by the pyramid.
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
 ::SetReferenceImage(InputImageType * image)
 {
@@ -63,7 +63,7 @@ MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
  * \param imageList The brighter details extracted from the filtering operation.
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
 ::SetBrighterDetails(InputImageListType * imageList)
 {
@@ -75,7 +75,7 @@ MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
  * \param imageList The darker details extracted from the filtering operation.
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
 ::SetDarkerDetails(InputImageListType * imageList)
 {
@@ -158,13 +158,13 @@ MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
   mrtoms->SetSupFilter(this->GetBrighterDetails());
   mrtoms->SetInfFilter(this->GetDarkerDetails());
   mrtoms->Update();
-  
+
   // Full resolution Input images lists pointers
   InputImageListPointerType brighter = mrtoms->GetSupFilterFullResolution();
   InputImageListPointerType darker = mrtoms->GetInfFilterFullResolution();
 
   // Segmentation filter definition
-  typename InputImageListType::Iterator it; 
+  typename InputImageListType::Iterator it;
   // Segment the supFilter details
   for(it= brighter->Begin();it!=brighter->End();++it)
     {
@@ -178,8 +178,8 @@ MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
       m_NumberOfObjectsVector.push_back(segmenter->GetNumberOfObjects());
       outputList->PushBack(segmenter->GetOutput());
     }
-  
-  
+
+
   // Segment the infFilter details
   for(it= darker->Begin();it!= darker->End();++it)
     {
@@ -189,7 +189,7 @@ MorphologicalPyramidSegmentationFilter<TInputImage,TOutputImage>
       segmenter->SetConnectedThresholdQuantile(m_ConnectedThresholdQuantile);
       segmenter->SetOriginalImage(referenceImage);
       segmenter->SetSegmentDarkDetailsBool(true);
-      
+
       segmenter->SetDetailsImage(it.Get());
       segmenter->Update();
       m_NumberOfObjectsVector.push_back(segmenter->GetNumberOfObjects());
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmenter.h b/Code/MultiScale/otbMorphologicalPyramidSegmenter.h
index 2fa12d7588..e933321309 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmenter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmenter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,16 +26,16 @@ namespace otb
     {
       /**
        * \class Segmenter
-       * \brief This class performs the segmentation of a detail image extracted from a 
+       * \brief This class performs the segmentation of a detail image extracted from a
        * morphological pyramid analysis.
-       * 
-       * This class performs the segmentation of a detail image extracted from a 
+       *
+       * This class performs the segmentation of a detail image extracted from a
        * morphological pyramid analysis.
-       * 
+       *
        * The Segmentation is perfomed using the ConnectedThresholdImageFilter. The seeds
        * are extracted from the image using the ImageToPointSetFilter. The thresolds are set
        * by using quantiles computed with the HistogramGenerator.
-       * 
+       *
        * \sa MorphologicalPyramidAnalyseFilter
        * \sa MorphologicalPyramidSynthesisFilter
        * \sa ResampleImageFilter
@@ -47,7 +47,7 @@ namespace otb
 	: public itk::ImageToImageFilter<TInputImage,TOutputImage>
 	{
 	  public :
-	    /** Standard typedefs */ 
+	    /** Standard typedefs */
 	    typedef Segmenter                                       Self;
 	  typedef itk::ImageToImageFilter<TInputImage,TOutputImage> Superclass;
 	  typedef itk::SmartPointer<Self>                           Pointer;
@@ -93,7 +93,7 @@ namespace otb
 	   * Get the original image.
 	   * \return originalImage The original image to segment.
 	   */
-	  InputImageType * GetOriginalImage(void); 
+	  InputImageType * GetOriginalImage(void);
 
 	  /** Min object size parameter accessor */
 	  itkSetMacro(MinimumObjectSize,unsigned long);
diff --git a/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx b/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
index c373aed852..4d08dd3b1d 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidSegmenter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -67,7 +67,7 @@ this->SetNthInput(0,const_cast<TInputImage *>(detailsImage));
    * \return detailsImage The input details image.
    */
 template <class TInputImage,class TOutputImage>
-typename Segmenter<TInputImage, TOutputImage>::InputImageType * 
+typename Segmenter<TInputImage, TOutputImage>::InputImageType *
 Segmenter<TInputImage, TOutputImage>
 ::GetDetailsImage(void)
 {
@@ -89,7 +89,7 @@ Segmenter<TInputImage, TOutputImage>
  * \return originalImage The original image to segment.
  */
 template <class TInputImage,class TOutputImage>
-typename Segmenter<TInputImage, TOutputImage>::InputImageType * 
+typename Segmenter<TInputImage, TOutputImage>::InputImageType *
 Segmenter<TInputImage, TOutputImage>
 ::GetOriginalImage(void)
 {
@@ -105,14 +105,14 @@ Segmenter<TInputImage, TOutputImage>
 {
   // call the superclass' implementation of this method
   Superclass::GenerateInputRequestedRegion();
-  
+
   // get pointers to the inputs
   InputImagePointerType  detailsPtr =
     const_cast< InputImageType * >( this->GetInput(0) );
 
-  InputImagePointerType  origPtr = 
+  InputImagePointerType  origPtr =
     const_cast< InputImageType * >( this->GetInput(1) );
-  
+
   if ( !detailsPtr || !origPtr )
     {
     return;
@@ -160,13 +160,13 @@ Segmenter<TInputImage, TOutputImage>
   typedef otb::ThresholdImageToPointSetFilter<InputImageType,PointSetType> PointSetFilterType;
   typedef typename PointSetType::PointsContainer::Iterator PointSetIteratorType;
   typedef typename PointSetType::PointType PointType;
-  
+
   // Typedefs for segmentation
   typedef itk::ConnectedThresholdImageFilter<InputImageType,InputImageType> ConnectedFilterType;
   typedef itk::ConnectedComponentImageFilter<InputImageType,OutputImageType> LabelFilterType;
   typedef itk::RelabelComponentImageFilter<OutputImageType,OutputImageType> RelabelFilterType;
   typedef itk::ThresholdImageFilter<OutputImageType> ThresholdFilterType;
-  
+
   // Typedefs for statistics computation
   typedef itk::Statistics::ScalarImageToHistogramGenerator<InputImageType> HistGeneratorType;
   typedef typename HistGeneratorType::HistogramType HistogramType;
@@ -187,7 +187,7 @@ Segmenter<TInputImage, TOutputImage>
 
   minMax->SetImage(original);
   minMax->ComputeMaximum();
-  
+
 
   // If we want to segment darker detail, the original image must have its itensity inverted
   if(m_SegmentDarkDetailsBool)
@@ -216,7 +216,7 @@ Segmenter<TInputImage, TOutputImage>
   histogram->SetNumberOfBins(255);
   histogram->SetMarginalScale(10.0);
   histogram->Compute();
-  InputPixelType  pointSetThreshold = 
+  InputPixelType  pointSetThreshold =
     static_cast<InputPixelType>(histogram->GetOutput()->Quantile(0,m_SeedsQuantile));
 
   // Segmentation Threshold is computed from the quantile
@@ -225,7 +225,7 @@ Segmenter<TInputImage, TOutputImage>
   histogram->SetNumberOfBins(255);
   histogram->SetMarginalScale(10.0);
   histogram->Compute();
-  InputPixelType  connectedThresholdValue = 
+  InputPixelType  connectedThresholdValue =
     static_cast<InputPixelType>(histogram->GetOutput()->Quantile(0,m_ConnectedThresholdQuantile));
 
   /////////////////////////////////////
@@ -246,7 +246,7 @@ Segmenter<TInputImage, TOutputImage>
   typename LabelFilterType::Pointer labeler = LabelFilterType::New();
   typename RelabelFilterType::Pointer relabeler = RelabelFilterType::New();
   typename ThresholdFilterType::Pointer threshold = ThresholdFilterType::New();
-  
+
   //Passing seeds to the connected filter
   connectedThreshold = ConnectedFilterType::New();
   connectedThreshold->ClearSeeds();
@@ -261,7 +261,7 @@ Segmenter<TInputImage, TOutputImage>
       it++;
     }
 
-  // segmentation     
+  // segmentation
   connectedThreshold->SetLower(connectedThresholdValue);
 
   // labelling
@@ -273,7 +273,7 @@ Segmenter<TInputImage, TOutputImage>
   relabeler->Update();
 
   // In some cases it might happen that the whole extent of the image is segmented as a single region.
-  // Since this is not desirable, we test this case here to avoid it. 
+  // Since this is not desirable, we test this case here to avoid it.
   threshold = ThresholdFilterType::New();
   threshold->SetInput(relabeler->GetOutput());
   OutputPixelType num = 0;
@@ -286,15 +286,15 @@ Segmenter<TInputImage, TOutputImage>
 	  num = 0;
 	}
       else
-	{        
+	{
 	  num=1;
 	}
     }
   else
     {
       num= static_cast<OutputPixelType>(relabeler->GetNumberOfObjects());
-    }   
-  threshold->ThresholdOutside(0,num);    
+    }
+  threshold->ThresholdOutside(0,num);
 
   // Output connection
   threshold->GraftOutput(this->GetOutput());
diff --git a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h
index 8cddc17496..26bad9a9f6 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h
+++ b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,16 +24,16 @@ namespace otb
 {
 /**
  * \class MorphologicalPyramidSynthesisFilter
- * \brief Recomposition of the multiscale analysis performed with 
+ * \brief Recomposition of the multiscale analysis performed with
  * a MorphologicalPyramidAnalyseFilter.
  *
  * Once a morphological pyramidal decompisition has been made, it is
  * possible to rebuild without any loss of information the original
  * image at full resolution. The MorphologicalPyramidsynthesisFilter
- * provides such a functionality. At each iteration, it perfoms the 
- * up-sampling of the current image using the 
- * otb::morphologicalPyramid::Resampler filter, the addition of 
- * the details lost in down-sampling, and the addition of the details 
+ * provides such a functionality. At each iteration, it perfoms the
+ * up-sampling of the current image using the
+ * otb::morphologicalPyramid::Resampler filter, the addition of
+ * the details lost in down-sampling, and the addition of the details
  * lost in smoothing.
  *
  * \ingroup MultiScale
@@ -49,7 +49,7 @@ public:
   typedef MorphologicalPyramidSynthesisFilter                  Self;
   typedef ImageToImageListFilter<TInputImage,TOutputImage>     Superclass;
   typedef itk::SmartPointer<Self>                              Pointer;
-  typedef itk::SmartPointer<const Self>                        ConstPointer;  
+  typedef itk::SmartPointer<const Self>                        ConstPointer;
   /** Creation through object factory macro */
   itkNewMacro(Self);
   /** Type macro */
@@ -64,12 +64,12 @@ public:
   typedef typename Superclass::OutputImageListType::Iterator            ImageListIterator;
   typedef typename Superclass::OutputImageListType::ReverseIterator     ImageListReverseIterator;
   /** Input related typedefs */
-  typedef typename Superclass::InputImageType                           InputImageType;          
+  typedef typename Superclass::InputImageType                           InputImageType;
   typedef typename Superclass::InputImageRegionType                     InputImageRegionType;
   typedef typename InputImageType::Pointer                              InputImagePointer;
   typedef typename InputImageType::ConstPointer                         InputImageConstPointer;
-  typedef typename InputImageType::SizeType                             SizeType;                 
-  typedef typename InputImageType::ValueType                            ValueType;  
+  typedef typename InputImageType::SizeType                             SizeType;
+  typedef typename InputImageType::ValueType                            ValueType;
   typedef typename InputImageType::PixelType                            PixelType;
   typedef typename InputImageType::SpacingType                          SpacingType;
   typedef otb::ImageList<InputImageType>                                InputImageListType;
@@ -77,7 +77,7 @@ public:
   /** Size vector typedefs */
   typedef std::vector<SizeType>                                         SizeVectorType;
   typedef typename SizeVectorType::iterator                             SizeIterator;
-  typedef typename SizeVectorType::reverse_iterator                     SizeReverseIterator;  
+  typedef typename SizeVectorType::reverse_iterator                     SizeReverseIterator;
   /**
    * Set The SupFilter details
    * \param imageList The brighter details extracted from the filtering operation.
@@ -102,7 +102,7 @@ public:
    * Get The SupFilter details
    * \return The brighter details extracted from the filtering operation.
    */
-  InputImageListType* GetSupFilter(void);   
+  InputImageListType* GetSupFilter(void);
   /**
    * Get The InfFilter details
    * \return The darker details extracted from the filtering operation.
@@ -128,7 +128,7 @@ protected:
   /** Main computation method */
   virtual void GenerateData();
   /** Printself method */
-  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;  
+  virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
 };
 }// End namespace otb
 
diff --git a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx
index 501fae0543..9a8cd21a79 100644
--- a/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx
+++ b/Code/MultiScale/otbMorphologicalPyramidSynthesisFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ namespace otb
  */
 template <class TInputImage, class TOutputImage>
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
-::MorphologicalPyramidSynthesisFilter() 
+::MorphologicalPyramidSynthesisFilter()
 {
   this->SetNumberOfRequiredInputs(5);
 }
@@ -48,7 +48,7 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
  * \param imageList The brighter details extracted from the filtering operation.
  */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
 ::SetSupFilter(InputImageListType * imageList)
 {
@@ -59,7 +59,7 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
    * \param imageList The darker details extracted from the filtering operation.
    */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
 ::SetInfFilter(InputImageListType * imageList)
 {
@@ -71,7 +71,7 @@ this->SetNthInput(2,const_cast<InputImageListType *>(imageList));
    * \param imageList The brighter details extracted from the filtering operation.
    */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
 ::SetSupDeci(InputImageListType * imageList)
 {
@@ -82,7 +82,7 @@ this->SetNthInput(3,const_cast<InputImageListType *>(imageList));
    * \param imageList The darker details extracted from the filtering operation.
    */
 template <class TInputImage, class TOutputImage>
-void 
+void
 MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
 ::SetInfDeci(InputImageListType * imageList)
 {
@@ -151,10 +151,10 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
   InputImageListType * infFilter = this->GetInfFilter();
   InputImageListType * supDeci = this->GetSupDeci();
   InputImageListType * infDeci = this->GetInfDeci();
-  
+
   // Output pointer
   OutputImageListType *   OutputImageList   = this->GetOutput();
- 
+
 
 
   // typedefs of the filters
@@ -162,15 +162,15 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
   typedef itk::AddImageFilter<InputImageType,InputImageType,InputImageType> AddFilterType;
   typedef otb::MorphologicalPyramid::Resampler<InputImageType,InputImageType> ResamplerType;
   typedef itk::ImageDuplicator<InputImageType> DuplicatorType;
-  
-  // Input Image duplication to the currentImage Pointer 
+
+  // Input Image duplication to the currentImage Pointer
   typename DuplicatorType::Pointer duplicator = DuplicatorType::New();
   duplicator->SetInputImage(this->GetInput());
   duplicator->Update();
 
-  // Input Image duplication to the currentImage Pointer 
+  // Input Image duplication to the currentImage Pointer
   typename InputImageType::Pointer currentImage =duplicator->GetOutput();
-  
+
   // Filters declarations
   typename AddFilterType::Pointer add1, add2;
   typename SubtractFilterType::Pointer subtract1,subtract2;
@@ -181,7 +181,7 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
   SizeVectorType size;
 
   ImageListIterator it = supFilter->Begin();
-  
+
   while(it!=supFilter->End())
     {
       size.push_back(it.Get()->GetLargestPossibleRegion().GetSize());
@@ -189,7 +189,7 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
     }
   otbMsgDevMacro(<<"MorphologicalPyramidSynthesisFilter : Size vector computation OK");
 
-  // Iterators definition  
+  // Iterators definition
   ImageListReverseIterator itinfFilter = infFilter->ReverseBegin();
   ImageListReverseIterator itsupFilter = supFilter->ReverseBegin();
   ImageListReverseIterator itinfDeci = infDeci->ReverseBegin();
@@ -231,19 +231,19 @@ MorphologicalPyramidSynthesisFilter<TInputImage,TOutputImage>
     subtract2->SetInput2(itinfDeci.Get());
     subtract2->Update();
     otbMsgDevMacro(<<"MorphologicalPyramidSynthesisFilter: step "<<i<<" Details addition OK");
-    
-    
+
+
     // Updating current image
     currentImage=subtract2->GetOutput();
     OutputImageList->PushBack(currentImage);
-    
+
     // Iterators incrementation
     ++itsupFilter;
     ++itinfFilter;
     ++itsupDeci;
     ++itinfDeci;
     ++itSize;
-    } 
+    }
   otbMsgDevMacro(<<"MorphologicalPyramidSynthesisFilter: Exiting main method.");
   }
 /**
diff --git a/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h b/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h
index 3096abeb8f..d2441bec43 100644
--- a/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h
+++ b/Code/MultiScale/otbMultiScaleConvexOrConcaveClassificationFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ namespace Functor
      *
      * Given \f$x_1\f$ and \f$x_2\f$ two membership values, \f$L_1,L_2\f$ two labels associated,
      * and \f$\sigma\f$ a tolerance value, the following decision rule is applied:
-     * 
+     *
      *  \f[
      *  L=\left\{\begin{array}{lcl}
      * L_{1} &:& x_{1}>x_{2} \quad and \quad x_{1}>\sigma\\
@@ -55,7 +55,7 @@ namespace Functor
     template<class TInput,class TLabeled>
       class MultiScaleConvexOrConcaveDecisionRule
       {
-	
+
       public:
 	/**
 	 * Constructor
@@ -123,7 +123,7 @@ namespace Functor
 	  {
 	    return m_LabelSeparator;
 	  }
-	
+
       private:
 	/** Sigma (tolerance) parameter */
 	double m_Sigma;
@@ -135,41 +135,41 @@ namespace Functor
 
 /** \class MultiScaleConvexOrConcaveClassificationFilter
  *  \brief Apply the MultiScaleConvexOrConcaveDecisionRule to whole images.
- *  
+ *
  * See MultiScaleConvexOrConcaveDecisionRule functor documentation for more details.
- * 
+ *
  */
 template <class TInputImage, class TOutputImage>
 class ITK_EXPORT MultiScaleConvexOrConcaveClassificationFilter
   : public QuaternaryFunctorImageFilter<TInputImage,TInputImage, TOutputImage,TOutputImage,TOutputImage,
-    Functor::MultiScaleConvexOrConcaveDecisionRule<typename TInputImage::PixelType, 
+    Functor::MultiScaleConvexOrConcaveDecisionRule<typename TInputImage::PixelType,
                                          typename TOutputImage::PixelType> >
 {
  public:
   /** Standard typedefs */
   typedef MultiScaleConvexOrConcaveClassificationFilter Self;
   typedef QuaternaryFunctorImageFilter<TInputImage,TInputImage, TOutputImage,TOutputImage,TOutputImage,
-                                       Functor::MultiScaleConvexOrConcaveDecisionRule<typename TInputImage::PixelType, 
+                                       Functor::MultiScaleConvexOrConcaveDecisionRule<typename TInputImage::PixelType,
                                        typename TOutputImage::PixelType> >Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(MultiScaleConvexOrConcaveClassificationFilter,QuaternaryFunctorImageFilter);
-  
+
   /** Template class typedef */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
   typedef typename OutputImageType::PixelType LabelType;
-  typedef Functor::MultiScaleConvexOrConcaveDecisionRule<typename TInputImage::PixelType, 
+  typedef Functor::MultiScaleConvexOrConcaveDecisionRule<typename TInputImage::PixelType,
     typename TOutputImage::PixelType> DecisionFunctorType;
   /**
    * Set the opening profile derivative maxima image
    * \param derivativeMaxima the opening profile derivative maxima image
-   * 
+   *
    */
   void SetOpeningProfileDerivativeMaxima(const TInputImage * derivativeMaxima)
     {
@@ -178,7 +178,7 @@ class ITK_EXPORT MultiScaleConvexOrConcaveClassificationFilter
   /**
    * Set the opening profile characteristics image
    * \param characteristics the opening profile characteristics image
-   * 
+   *
    */
   void SetOpeningProfileCharacteristics(const TOutputImage * characteristics)
     {
@@ -187,7 +187,7 @@ class ITK_EXPORT MultiScaleConvexOrConcaveClassificationFilter
   /**
    * Set the closing profile derivative maxima image
    * \param derivativeMaxima the closing profile derivative maxima image
-   * 
+   *
    */
   void SetClosingProfileDerivativeMaxima(const TInputImage * derivativeMaxima)
     {
@@ -196,7 +196,7 @@ class ITK_EXPORT MultiScaleConvexOrConcaveClassificationFilter
   /**
    * Set the closing profile characteristics image
    * \param characteristics the closing profile characteristics image
-   * 
+   *
    */
   void SetClosingProfileCharacteristics(const TOutputImage * characteristics)
     {
diff --git a/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h b/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h
index d3e3de9906..30d06b96d9 100644
--- a/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h
+++ b/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,21 +24,21 @@ namespace otb
 {
 /** \class ProfileDerivativeToMultiScaleCharacteristicsFilter
  *  \brief This filter extracts the maximum derivative value of the input profile.
- *  
+ *
  *  This filter extracts the maximum derivative value of the input profile as well
  *  as the parameter (called characteristic) for which this maxima occurs.
- * 
+ *
  *  The maxima can be retrieved by the GetOutput() image, while the characteristics
  *  can be retreived by the GetOutputCharacteristics().
  *
- *  Please note that this characteristics can be scaled using the InitialValue and Step 
+ *  Please note that this characteristics can be scaled using the InitialValue and Step
  *  parameter corresponding to the input profile.
  *
  * \sa ProfileToProfileDerivativeImageFilter
  */
 template <class TInputImage, class TOutputImage, class TLabeledImage>
 class ITK_EXPORT ProfileDerivativeToMultiScaleCharacteristicsFilter
-  : public ImageListToImageFilter<TInputImage, TOutputImage> 
+  : public ImageListToImageFilter<TInputImage, TOutputImage>
 {
  public:
   /** Standard typedefs */
@@ -46,13 +46,13 @@ class ITK_EXPORT ProfileDerivativeToMultiScaleCharacteristicsFilter
   typedef ImageListToImageFilter<TInputImage, TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>                           Pointer;
   typedef itk::SmartPointer<const Self>                     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ProfileDerivativeToMultiScaleCharacteristicsFilter,ImageToImageListFilter);
-  
+
   /** Template parameters typedefs */
   typedef TInputImage InputImageType;
   typedef TOutputImage OutputImageType;
@@ -84,7 +84,7 @@ class ITK_EXPORT ProfileDerivativeToMultiScaleCharacteristicsFilter
   /** Main computation method */
   virtual void GenerateData(void);
 
-  /** GenerateOutputInformation 
+  /** GenerateOutputInformation
    * Set the number of bands of the output.
    * Copy informations from the first image of the list if existing.
    **/
diff --git a/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx b/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx
index 8779b5729f..9c44d18237 100644
--- a/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx
+++ b/Code/MultiScale/otbProfileDerivativeToMultiScaleCharacteristicsFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -77,7 +77,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
 {
   InputImageListPointerType inputPtr = this->GetInput();
   typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
-  
+
   RegionType region1 = this->GetOutput()->GetRequestedRegion();
   RegionType region2 = this->GetOutputCharacteristics()->GetRequestedRegion();
   RegionType region;
@@ -95,7 +95,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
     {
       region = region1;
     }
-  else 
+  else
     {
       int xul1 = region1.GetIndex()[0];
       int xul2 = region2.GetIndex()[0];
@@ -105,12 +105,12 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
       int xlr2 = region2.GetIndex()[0]+region2.GetSize()[0];
       int ylr1 = region1.GetIndex()[1]+region1.GetSize()[1];
       int ylr2 = region2.GetIndex()[1]+region2.GetSize()[1];
-      
+
       int xul = std::min(xul1,xul2);
       int yul = std::min(yul1,yul2);
       int xlr = std::max(xlr1,xlr2);
-      int ylr = std::max(ylr1,ylr2); 
-      
+      int ylr = std::max(ylr1,ylr2);
+
       typename RegionType::IndexType index;
       index[0]=xul;
       index[1]=yul;
@@ -122,11 +122,11 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
       region.SetIndex(index);
       region.SetSize(size);
     }
-  
+
   while(inputListIt!=inputPtr->End())
     {
       inputListIt.Get()->SetRequestedRegion(region);
-      ++inputListIt; 
+      ++inputListIt;
     }
 }
 /**
@@ -145,7 +145,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
   outputPtr->SetBufferedRegion(outputPtr->GetRequestedRegion());
   outputPtr->Allocate();
   outputPtr->FillBuffer(0);
-  
+
   outputLabeledPtr->SetBufferedRegion(outputLabeledPtr->GetRequestedRegion());
   outputLabeledPtr->Allocate();
   outputLabeledPtr->FillBuffer(0);
@@ -154,7 +154,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
   typedef itk::ImageRegionConstIterator<InputImageType> InputIteratorType;
   typedef itk::ImageRegionIterator<OutputImageType> OutputIteratorType;
   typedef itk::ImageRegionIterator<LabeledImageType> LabeledIteratorType;
-  
+
   typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
 
   // defines a vector of input iterators
@@ -180,7 +180,7 @@ ProfileDerivativeToMultiScaleCharacteristicsFilter<TInputImage,TOutputImage,TLab
 	{
 	  inputIteratorsAtEnd = inputIteratorsAtEnd || it->IsAtEnd();
 	}
-  
+
 
   while(!outputIt.IsAtEnd() && !labeledIt.IsAtEnd() && !inputIteratorsAtEnd)
     {
diff --git a/Code/MultiScale/otbProfileToProfileDerivativeFilter.h b/Code/MultiScale/otbProfileToProfileDerivativeFilter.h
index 183ca0bc6c..04f1149130 100644
--- a/Code/MultiScale/otbProfileToProfileDerivativeFilter.h
+++ b/Code/MultiScale/otbProfileToProfileDerivativeFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
 /** \class ProfileToProfileDerivativeFilter
  *  \brief This filter computes the derivative of a given profile.
  *
- * For the profile \f$ \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots,n_{N}\}\}\f$, the 
+ * For the profile \f$ \Pi_{\phi}(f)= \{\phi_{n}(f), n \in \{n_{1},\ldots,n_{N}\}\}\f$, the
  * profile derivative is defined by:
  *
  * \f[
@@ -35,7 +35,7 @@ namespace otb
  * \f]
  *
  * with \f$ \Delta\phi_{n}(f) = \mid \Pi_{\phi_{n2}}(f)-\Pi_{\phi_{n1}}(f) \mid \f$
- * 
+ *
  * \ingroup Streamed
  */
 template <class TInputImage, class TOutputImage>
@@ -48,13 +48,13 @@ class ITK_EXPORT ProfileToProfileDerivativeFilter
   typedef ImageListToImageListFilter<TInputImage,TOutputImage> Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ProfileToProfileDerivativeFilter, ImageListToImageListFilter);
-  
+
   /** Template parameters typedefs */
   typedef typename Superclass::InputImageListType InputImageListType;
   typedef typename InputImageListType::Pointer InputImageListPointerType;
@@ -69,7 +69,7 @@ class ITK_EXPORT ProfileToProfileDerivativeFilter
   typedef itk::AbsImageFilter<InputImageType,InputImageType> AbsFilterType;
   typedef typename SubtractFilterType::Pointer SubtractFilterPointerType;
   typedef typename AbsFilterType::Pointer AbsFilterPointerType;
-  
+
   /** Generate output information for the ImageList and for each image
       in the list. */
   virtual void GenerateOutputInformation(void);
diff --git a/Code/MultiScale/otbProfileToProfileDerivativeFilter.txx b/Code/MultiScale/otbProfileToProfileDerivativeFilter.txx
index 8239b34754..083c5d3376 100644
--- a/Code/MultiScale/otbProfileToProfileDerivativeFilter.txx
+++ b/Code/MultiScale/otbProfileToProfileDerivativeFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -84,7 +84,7 @@ ProfileToProfileDerivativeFilter<TInputImageList,TOutputImageList>
   // For each input image and corresponding output image
   typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin();
   typename OutputImageListType::Iterator outputListIt = outputPtr->Begin();
-  
+
   // Use the filter to generate input requested region
   while(inputListIt!=inputPtr->End()&&outputListIt!=outputPtr->End())
 	{
diff --git a/Code/Projections/otbCompositeTransform.h b/Code/Projections/otbCompositeTransform.h
index 21e8f5982f..c4a2c30601 100644
--- a/Code/Projections/otbCompositeTransform.h
+++ b/Code/Projections/otbCompositeTransform.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,28 +27,28 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-  
+
+
   /** \class CompositeTransform
-      
+
   * \brief Class which compose two itk::Transform to obtain one itk::Transform
   * 	 T1    T2	    T3
-  * (x,y) -> (x',y') -> (x'',y'')   =>    (x,y) -> (x'',y'') 
-  * \ingroup Transform 
+  * (x,y) -> (x',y') -> (x'',y'')   =>    (x,y) -> (x'',y'')
+  * \ingroup Transform
   */
-  
+
   template <class TFirstTransform,
             class TSecondTransform,
-            class TScalarType=double, 
+            class TScalarType=double,
             unsigned int NInputDimensions=2,
             unsigned int NOutputDimensions=2>
-    class ITK_EXPORT CompositeTransform: public itk::Transform<TScalarType,  // Data type for scalars 
+    class ITK_EXPORT CompositeTransform: public itk::Transform<TScalarType,  // Data type for scalars
                                                      NInputDimensions,       // Number of dimensions in the input space
                                                      NOutputDimensions>      // Number of dimensions in the output space
     {
       public :
-      
-      
+
+
       /** Standard class typedefs */
       typedef itk::Transform< TScalarType,
       NInputDimensions,
@@ -61,70 +61,70 @@ namespace otb
       typedef typename TFirstTransform::Pointer  FirstTransformPointerType;
       typedef TSecondTransform			 SecondTransformType;
       typedef typename TSecondTransform::Pointer SecondTransformPointerType;
-      
+
       /** Standard vector type for this class. */
       //  typedef typename TFirstTransform::InputVectorType  FirstTransformInputVectorType;
       //  typedef typename TFirstTransform::OutputVectorType FirstTransformOutputVectorType;
-      
+
       /** Standard covariant vector type for this class */
       //  typedef typename TFirstTransform::InputCovariantVectorType FirstTransformInputCovariantVectorType;
       //  typedef typename TFirstTransform::OutputCovariantVectorType FirstTransformOutputCovariantVectorType;
-      
+
       /** Standard vnl_vector type for this class. */
       //  typedef typename TFirstTransform::InputVnlVectorType FirstTransformInputVnlVectorType;
       //  typedef typename TFirstTransform::OutputVnlVectorType FirstTransformOutputVnlVectorType;
-      
+
       /** Standard coordinate point type for this class */
       typedef typename Superclass::InputPointType       FirstTransformInputPointType;
       typedef typename TFirstTransform::OutputPointType FirstTransformOutputPointType;
       /** TSecondTransform::InputPointType is purposely not defined
-       *  It contrains user to choose First Transform Output compatible 
+       *  It contrains user to choose First Transform Output compatible
        *	with Second Transform Input */
       typedef typename Superclass::OutputPointType      SecondTransformOutputPointType;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( CompositeTransform, itk::Transform );
-      
+
       itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
       itkStaticConstMacro(OutputSpaceDimension,unsigned int, NOutputDimensions);
       itkStaticConstMacro(SpaceDimension,      unsigned int, NInputDimensions);
       itkStaticConstMacro(ParametersDimension, unsigned int, NInputDimensions*(NInputDimensions+1));
-      
-      /** Set first transformation */  
-      itkSetObjectMacro(FirstTransform,FirstTransformType); 
-      
-      /** Set second transformation */ 
+
+      /** Set first transformation */
+      itkSetObjectMacro(FirstTransform,FirstTransformType);
+
+      /** Set second transformation */
       itkSetObjectMacro(SecondTransform,SecondTransformType);
-      
-      
+
+
       /**  Method to transform a point. */
       virtual SecondTransformOutputPointType TransformPoint(const FirstTransformInputPointType  & ) const;
-      
+
       /**  Method to transform a vector. */
       //  virtual OutputVectorType TransformVector(const InputVectorType &) const;
-      
+
       /**  Method to transform a vnl_vector. */
       //  virtual OutputVnlVectorType TransformVector(const InputVnlVectorType &) const;
-      
+
       /**  Method to transform a CovariantVector. */
       //  virtual OutputCovariantVectorType TransformCovariantVector(const InputCovariantVectorType &) const;
-      
+
       protected:
       CompositeTransform();
       ~CompositeTransform();
-      
+
       FirstTransformPointerType  m_FirstTransform;
-      SecondTransformPointerType m_SecondTransform;  
-      
+      SecondTransformPointerType m_SecondTransform;
+
       private:
       CompositeTransform(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
+
     };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbCompositeTransform.txx b/Code/Projections/otbCompositeTransform.txx
index a63e887def..dca156498a 100644
--- a/Code/Projections/otbCompositeTransform.txx
+++ b/Code/Projections/otbCompositeTransform.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,115 +23,115 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-  template<class TFirstTransform, 
-           class TSecondTransform, 
-           class TScalarType, 
-           unsigned int NInputDimensions, 
+
+  template<class TFirstTransform,
+           class TSecondTransform,
+           class TScalarType,
+           unsigned int NInputDimensions,
            unsigned int NOutputDimensions>
-  CompositeTransform<TFirstTransform, 
-                     TSecondTransform, 
-                     TScalarType,  
-                     NInputDimensions, 
+  CompositeTransform<TFirstTransform,
+                     TSecondTransform,
+                     TScalarType,
+                     NInputDimensions,
                      NOutputDimensions>
   ::CompositeTransform() : Superclass(SpaceDimension,ParametersDimension)
   {
     m_FirstTransform = FirstTransformType::New();
     m_SecondTransform = SecondTransformType::New();
   }
-  
-  template<class TFirstTransform, 
-           class TSecondTransform, 
-           class TScalarType, 
-           unsigned int NInputDimensions, 
+
+  template<class TFirstTransform,
+           class TSecondTransform,
+           class TScalarType,
+           unsigned int NInputDimensions,
            unsigned int NOutputDimensions>
-  CompositeTransform<TFirstTransform, 
-                     TSecondTransform, 
-                     TScalarType, 
-                     NInputDimensions, 
+  CompositeTransform<TFirstTransform,
+                     TSecondTransform,
+                     TScalarType,
+                     NInputDimensions,
                      NOutputDimensions>
   ::~CompositeTransform()
   {
   }
-  
-  
-  template<class TFirstTransform, 
-           class TSecondTransform, 
-           class TScalarType, 
-           unsigned int NInputDimensions, 
-           unsigned int NOutputDimensions> 
-  typename CompositeTransform<TFirstTransform, 
-                              TSecondTransform, 
+
+
+  template<class TFirstTransform,
+           class TSecondTransform,
+           class TScalarType,
+           unsigned int NInputDimensions,
+           unsigned int NOutputDimensions>
+  typename CompositeTransform<TFirstTransform,
+                              TSecondTransform,
                               TScalarType,
-                              NInputDimensions, 
-                              NOutputDimensions>::SecondTransformOutputPointType 
-  CompositeTransform<TFirstTransform, 
-                     TSecondTransform, 
-                     TScalarType, 
-                     NInputDimensions, 
+                              NInputDimensions,
+                              NOutputDimensions>::SecondTransformOutputPointType
+  CompositeTransform<TFirstTransform,
+                     TSecondTransform,
+                     TScalarType,
+                     NInputDimensions,
                      NOutputDimensions>
   ::TransformPoint(const FirstTransformInputPointType &point1) const
   {
     FirstTransformOutputPointType pointTmp;
-    SecondTransformOutputPointType point2;	
-    
-    pointTmp=m_FirstTransform->TransformPoint(point1); 
-    
-    otbMsgDevMacro(<< "Geographic point is ("<<  pointTmp[0]<< ","<<  pointTmp[1]<< ")"); 	
-    
-    point2=m_SecondTransform->TransformPoint(pointTmp); 
-    
+    SecondTransformOutputPointType point2;
+
+    pointTmp=m_FirstTransform->TransformPoint(point1);
+
+    otbMsgDevMacro(<< "Geographic point is ("<<  pointTmp[0]<< ","<<  pointTmp[1]<< ")");
+
+    point2=m_SecondTransform->TransformPoint(pointTmp);
+
     otbMsgDevMacro(<< "Coresponding coordinates in sensor geometry are: " << std::endl
 		   << point2[0] << ","<< point2[1] );
-    
+
     return point2;
   }
-  
-  /*template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-    typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVectorType 
+
+  /*template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+    typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVectorType
     CompositeTransform<TFirstTransform, TSecondTransform, TScalarType,NInputDimensions, NOutputDimensions>
     ::TransformVector(const InputVectorType &vector1) const
-    { 
+    {
     InputVectorType vectorTmp;
-    OutputVectorType vector2;	
-    
-    vectorTmp=m_FirstTransform->TransformVector(vector1); 
-    vector2=m_SecondTransform->TransformVector(vectorTmp); 
-    
+    OutputVectorType vector2;
+
+    vectorTmp=m_FirstTransform->TransformVector(vector1);
+    vector2=m_SecondTransform->TransformVector(vectorTmp);
+
     return vector2;
     }
-    
-    template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-    typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVnlVectorType 
+
+    template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+    typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputVnlVectorType
     CompositeTransform<TFirstTransform, TSecondTransform, TScalarType,NInputDimensions, NOutputDimensions>
     ::TransformVector(const InputVnlVectorType &vnlVector1) const
-    { 
+    {
     InputVnlVectorType vnlVectorTmp;
-    OutputVnlVectorType vnlVector2;	
-    
-    vnlVectorTmp=m_FirstTransform->TransformVector(vnlVector1); 
-    vnlVector2=m_SecondTransform->TransformVector(vnlVectorTmp); 
-    
+    OutputVnlVectorType vnlVector2;
+
+    vnlVectorTmp=m_FirstTransform->TransformVector(vnlVector1);
+    vnlVector2=m_SecondTransform->TransformVector(vnlVectorTmp);
+
     return vnlVector2;
     }
-    
-    template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-    typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputCovariantVectorType 
+
+    template<class TFirstTransform, class TSecondTransform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+    typename CompositeTransform<TFirstTransform, TSecondTransform, TScalarType, NInputDimensions, NOutputDimensions>::OutputCovariantVectorType
     CompositeTransform<TFirstTransform, TSecondTransform, TScalarType,NInputDimensions, NOutputDimensions>
     ::TransformCovariantVector(const InputCovariantVectorType &covariantVector1) const
-    { 
+    {
     InputCovariantVectorType covariantVectorTmp;
-    OutputCovariantVectorType covariantVector2;	
-    
-    covariantVectorTmp=m_FirstTransform->TransformCovariantVector(covariantVector1); 
-    covariantVector2=m_SecondTransform->TransformCovariantVector(covariantVectorTmp); 
-    
+    OutputCovariantVectorType covariantVector2;
+
+    covariantVectorTmp=m_FirstTransform->TransformCovariantVector(covariantVector1);
+    covariantVector2=m_SecondTransform->TransformCovariantVector(covariantVectorTmp);
+
     return covariantVector2;
     }*/
-  
-  
-  
-  
+
+
+
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbEckert4MapProjection.h b/Code/Projections/otbEckert4MapProjection.h
index 185171cc13..2734b6a467 100644
--- a/Code/Projections/otbEckert4MapProjection.h
+++ b/Code/Projections/otbEckert4MapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,23 +29,23 @@ namespace otb
    * It converts coordinates in longitude,latitude (WGS84) to Eckert4 map coordinates.
    */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT Eckert4MapProjection : public MapProjection<ossimEckert4Projection,transform> 
+      class ITK_EXPORT Eckert4MapProjection : public MapProjection<ossimEckert4Projection,transform>
   {
     public :
-	
+
       /** Standard class typedefs. */
       typedef Eckert4MapProjection                   Self;
       typedef MapProjection<ossimEckert4Projection,transform>    Superclass;
       typedef itk::SmartPointer<Self>                  Pointer;
       typedef itk::SmartPointer<const Self>            ConstPointer;
-      
+
       typedef typename Superclass::ScalarType 			ScalarType;
       typedef itk::Point<ScalarType,2 >   	      	InputPointType;
-      typedef itk::Point<ScalarType,2 >  	      	OutputPointType; 
-      
+      typedef itk::Point<ScalarType,2 >  	      	OutputPointType;
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( Eckert4MapProjection, MapProjection );
       virtual void SetFalseEasting(double falseEasting);
@@ -54,17 +54,17 @@ namespace otb
       virtual double GetFalseEasting() const;
       virtual void SetParameters(double falseEasting,double falseNorthing);
       virtual void SetDefaults();
-      
+
     protected :
-      Eckert4MapProjection(); 
+      Eckert4MapProjection();
       virtual ~Eckert4MapProjection();
-      
+
     private :
       Eckert4MapProjection(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
+
   };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbEckert4MapProjection.txx b/Code/Projections/otbEckert4MapProjection.txx
index 859e228e4d..abadcbae7a 100644
--- a/Code/Projections/otbEckert4MapProjection.txx
+++ b/Code/Projections/otbEckert4MapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,45 +22,45 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbEckert4MapProjection.h"
 
 namespace otb
-{ 
-  
+{
+
   template <InverseOrForwardTransformationEnum transform>
       Eckert4MapProjection<transform>
   ::Eckert4MapProjection()
   {
   }
-  
-  
+
+
   template <InverseOrForwardTransformationEnum transform>
       Eckert4MapProjection<transform>
   ::~Eckert4MapProjection()
   {
   }
-  
+
   ///False easting specification
   template <InverseOrForwardTransformationEnum transform>
       void Eckert4MapProjection<transform>
-  ::SetFalseEasting(double falseEasting) 
+  ::SetFalseEasting(double falseEasting)
   {
     this->m_MapProjection->setFalseEasting(falseEasting);
   }
-  
+
   ///False Northing specification
   template <InverseOrForwardTransformationEnum transform>
       void Eckert4MapProjection<transform>
-  ::SetFalseNorthing(double falseNorthing) 
+  ::SetFalseNorthing(double falseNorthing)
   {
     this->m_MapProjection->setFalseNorthing(falseNorthing);
   }
-  
+
   ///Set the defaul parameters
   template <InverseOrForwardTransformationEnum transform>
       void Eckert4MapProjection<transform>
-  ::SetDefaults() 
+  ::SetDefaults()
   {
     this->m_MapProjection->setDefaults();
   }
-  
+
   ///Get the false northing coordinates (avoid negative values)
   template <InverseOrForwardTransformationEnum transform>
       double Eckert4MapProjection<transform>
@@ -69,7 +69,7 @@ namespace otb
     double falseNorthing=this->m_MapProjection->getFalseNorthing();
     return falseNorthing;
   }
-  
+
   ///Get the false easting coordinates (avoid negative values)
   template <InverseOrForwardTransformationEnum transform>
       double Eckert4MapProjection<transform>
@@ -78,14 +78,14 @@ namespace otb
     double falseEasting=this->m_MapProjection->getFalseEasting();
     return falseEasting;
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       void Eckert4MapProjection<transform>
   ::SetParameters(double falseEasting,double falseNorthing)
   {
     this->m_MapProjection->setFalseEastingNorthing(falseEasting,falseNorthing);
   }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbForwardSensorModel.h b/Code/Projections/otbForwardSensorModel.h
index b5f6372711..bddc8bfa87 100644
--- a/Code/Projections/otbForwardSensorModel.h
+++ b/Code/Projections/otbForwardSensorModel.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,29 +26,29 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   /** \class ForwardSensorModel
-      
-   * \brief Class for direct sensor models 
+
+   * \brief Class for direct sensor models
    *
    * Based on ossimProjectionFactoryRegistry and ossimProjection methods.
    * It takes as input an index and computes the world coordinates.
    * (i,j,h) -> (lon,lat).
-   * Notice that the elevation h is optional. 
+   * Notice that the elevation h is optional.
    *
-   * \ingroup Transform 
+   * \ingroup Transform
    */
-  
+
   template <class TScalarType,
   unsigned int NInputDimensions=2,
   unsigned int NOutputDimensions=2,
   unsigned int NParametersDimensions=3>
-      class ITK_EXPORT ForwardSensorModel : public SensorModelBase<TScalarType,          
-      NInputDimensions,  
+      class ITK_EXPORT ForwardSensorModel : public SensorModelBase<TScalarType,
+      NInputDimensions,
       NOutputDimensions,
-      NParametersDimensions> 
+      NParametersDimensions>
       {
-      
+
         public :
           /** Standard class typedefs. */
           typedef ForwardSensorModel                         Self;
@@ -58,43 +58,43 @@ namespace otb
           NParametersDimensions >   Superclass;
           typedef itk::SmartPointer<Self>                    Pointer;
           typedef itk::SmartPointer<const Self>              ConstPointer;
-      
+
           typedef typename Superclass::InputPointType        InputPointType;
-          typedef typename Superclass::OutputPointType       OutputPointType;      
-      
+          typedef typename Superclass::OutputPointType       OutputPointType;
+
           /** Method for creation through the object factory. */
           itkNewMacro( Self );
-      
+
           /** Run-time type information (and related methods). */
           itkTypeMacro( ForwardSensorModel, SensorModelBase );
-      
+
           itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
           itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
           itkStaticConstMacro(ParametersDimension, unsigned int, NParametersDimensions); //A voir!!
-      
-          /** Compute the world coordinates. */ 
+
+          /** Compute the world coordinates. */
           OutputPointType TransformPoint(const InputPointType &point) const;
- 			
+
         protected:
-          ForwardSensorModel(); 
+          ForwardSensorModel();
           virtual ~ForwardSensorModel();
-      
+
           /** PrintSelf method */
           void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
         private :
-      
+
           ForwardSensorModel(const Self&); //purposely not implemented
           void operator=(const Self&);     //purposely not implemented
-			
+
           /** Difference between consecutives heights in iterative transform point with DEM */
           double m_Epsilon;
-			
+
           /** Number of iterations in iterative transform point with DEM */
           double m_NbIter;
       };
-  
-  
+
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbForwardSensorModel.txx b/Code/Projections/otbForwardSensorModel.txx
index efe801289b..d58ea671ce 100644
--- a/Code/Projections/otbForwardSensorModel.txx
+++ b/Code/Projections/otbForwardSensorModel.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbMacro.h"
 
 namespace otb
-{ 
+{
 
 template < class TScalarType,
            unsigned int NInputDimensions,
@@ -60,7 +60,7 @@ template < class TScalarType,
                typename ForwardSensorModel< TScalarType,
                NInputDimensions,
                NOutputDimensions,
-               NParametersDimensions>::OutputPointType 
+               NParametersDimensions>::OutputPointType
                    ForwardSensorModel< TScalarType,
                    NInputDimensions,
                    NOutputDimensions,
@@ -68,20 +68,20 @@ template < class TScalarType,
   ::TransformPoint(const InputPointType &point) const
 {
   otbMsgDevMacro(<< "Point in sensor geometry: (" << point[0] << "," <<	point[1] << ")");
- 
+
 	// "itk::point" to "ossim::ossimDpt" transformation
   ossimDpt ossimPoint(point[0], point[1]);
-  
-  // Calculation 
+
+  // Calculation
   ossimGpt ossimGPoint;
 
   if( this->m_Model == NULL)
   {
     itkExceptionMacro(<<"TransformPoint(): Invalid Model pointer m_Model == NULL !");
   }
-	
-  this->m_Model->lineSampleToWorld(ossimPoint, ossimGPoint); 
-	
+
+  this->m_Model->lineSampleToWorld(ossimPoint, ossimGPoint);
+
   if ((this->m_UseDEM) || (this->m_AverageElevation != -10000))
 
   {
@@ -90,50 +90,50 @@ template < class TScalarType,
     double diffHeight = 100; // arbitrary value
     itk::Point<double, 2> point;
     int nbIter = 0;
-	
+
     otbMsgDevMacro(<< "USING DEM ! ") ;
 
     while ((diffHeight > m_Epsilon)	&& (nbIter < m_NbIter))
     {
       otbMsgDevMacro(<< "Iter " << nbIter);
-			
+
       if (nbIter != 0)
         height = heightTmp;
-				
-      otbMsgDevMacro(<< "PointG Before iter : (" << ossimGPointRef.lat << "," << ossimGPointRef.lon <<")");	
-			
+
+      otbMsgDevMacro(<< "PointG Before iter : (" << ossimGPointRef.lat << "," << ossimGPointRef.lon <<")");
+
       point[0] = ossimGPointRef.lon;
       point[1] = ossimGPointRef.lat;
-			
-//			otbMsgDevMacro(<< "PointP Before iter : (" << point[1] << "," << point[0] <<")");	
+
+//			otbMsgDevMacro(<< "PointP Before iter : (" << point[1] << "," << point[0] <<")");
       if (this->m_UseDEM)
       {
         heightTmp = this->m_DEMHandler->GetHeightAboveMSL(point);
       }
-      else 
+      else
       {
         heightTmp = this->m_AverageElevation;
       }
       otbMsgDevMacro(<< "height : " << heightTmp) ;
-			
-      this->m_Model->lineSampleHeightToWorld(ossimPoint, heightTmp, ossimGPointRef);	
+
+      this->m_Model->lineSampleHeightToWorld(ossimPoint, heightTmp, ossimGPointRef);
       otbMsgDevMacro(<< "Point After iter :    (" << ossimGPointRef.lat << "," << ossimGPointRef.lon << ")");
 
       diffHeight = fabs(heightTmp - height);
 
       nbIter++;
     }
-		
+
     ossimGPoint = ossimGPointRef;
   }
-  
+
   // "OutputPointType" storage.
   OutputPointType outputPoint;
   outputPoint[0]=ossimGPoint.lon;
   outputPoint[1]=ossimGPoint.lat;
-	
+
   otbMsgDevMacro(<< "Geographic point lon/lat : (" << outputPoint[1] << "," <<	outputPoint[0] << ")");
-  
+
   return outputPoint;
 }
 
@@ -142,7 +142,7 @@ template < class TScalarType,
            unsigned int NOutputDimensions,
            unsigned int NParametersDimensions >
                void
-               ForwardSensorModel< TScalarType, 
+               ForwardSensorModel< TScalarType,
                NInputDimensions,
                NOutputDimensions,
                NParametersDimensions>
diff --git a/Code/Projections/otbInverseSensorModel.h b/Code/Projections/otbInverseSensorModel.h
index 275d7cb2ab..8ec1f5ed50 100644
--- a/Code/Projections/otbInverseSensorModel.h
+++ b/Code/Projections/otbInverseSensorModel.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,29 +27,29 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   /** \class InverseSensorModel
-   *   
-   * \brief Class for inverse sensor models 
+   *
+   * \brief Class for inverse sensor models
    *
    * Based on ossimProjectionFactoryRegistry and ossimProjection methods.
-   * It takes as input a world point and computes the index position of the 
+   * It takes as input a world point and computes the index position of the
    * corresponding point in the input image.
    * (lon,lat,h) -> (i,j).
-   * Notice that the elevation h is optional. 
+   * Notice that the elevation h is optional.
    *
-   * \ingroup Transform 
+   * \ingroup Transform
    */
   template <class TScalarType,
   unsigned int NInputDimensions=2,
   unsigned int NOutputDimensions=2,
   unsigned int NParametersDimensions=3>
-      class ITK_EXPORT InverseSensorModel : public SensorModelBase<TScalarType,          
-      NInputDimensions,  
+      class ITK_EXPORT InverseSensorModel : public SensorModelBase<TScalarType,
+      NInputDimensions,
       NOutputDimensions,
       NParametersDimensions>
       {
-      
+
         public :
           /** Standard class typedefs. */
           typedef InverseSensorModel                         Self;
@@ -59,40 +59,40 @@ namespace otb
           NParametersDimensions >   Superclass;
           typedef itk::SmartPointer<Self>                    Pointer;
           typedef itk::SmartPointer<const Self>              ConstPointer;
-      
+
           typedef typename Superclass::InputPointType        InputPointType;
-          typedef typename Superclass::OutputPointType       OutputPointType; 
-      
+          typedef typename Superclass::OutputPointType       OutputPointType;
+
           /** Method for creation through the object factory. */
           itkNewMacro( Self );
-      
+
           /** Run-time type information (and related methods). */
           itkTypeMacro( InverseSensorModel, SensorModelBase );
-      
+
           itkStaticConstMacro(InputSpaceDimension,  unsigned int, NInputDimensions);
           itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
           itkStaticConstMacro(ParametersDimension,  unsigned int, NParametersDimensions); //A voir!!
-      
+
       // Transform of geographic point in image sensor index
           virtual OutputPointType TransformPoint(const InputPointType &point) const;
       // Transform of geographic point in image sensor index -- Backward Compatibility
       //  OutputPointType TransformPoint(const InputPointType &point, double height) const;
-      
-      
+
+
         protected:
-          InverseSensorModel(); 
+          InverseSensorModel();
           virtual ~InverseSensorModel();
-      
+
           /** PrintSelf method */
           void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
         private :
-      
+
           InverseSensorModel(const Self&); //purposely not implemented
           void operator=(const Self&);     //purposely not implemented
-      
+
       };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbInverseSensorModel.txx b/Code/Projections/otbInverseSensorModel.txx
index 48dc206249..9c2b92ab5e 100644
--- a/Code/Projections/otbInverseSensorModel.txx
+++ b/Code/Projections/otbInverseSensorModel.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,8 +24,8 @@
 #include "otbMacro.h"
 
 namespace otb
-{ 
-  
+{
+
   template < class TScalarType,
 	     unsigned int NInputDimensions,
 	     unsigned int NOutputDimensions,
@@ -37,7 +37,7 @@ namespace otb
   ::InverseSensorModel()
   {
   }
-  
+
   template < class TScalarType,
 	     unsigned int NInputDimensions,
 	     unsigned int NOutputDimensions,
@@ -49,14 +49,14 @@ namespace otb
   ::~InverseSensorModel()
   {
   }
-  
-  
-  
+
+
+
   template < class TScalarType,
 	     unsigned int NInputDimensions,
 	     unsigned int NOutputDimensions,
 	     unsigned int NParametersDimensions >
-  typename InverseSensorModel< TScalarType,NInputDimensions,NOutputDimensions,NParametersDimensions>::OutputPointType 
+  typename InverseSensorModel< TScalarType,NInputDimensions,NOutputDimensions,NParametersDimensions>::OutputPointType
   InverseSensorModel< TScalarType,
                       NInputDimensions,
                       NOutputDimensions,
@@ -64,10 +64,10 @@ namespace otb
   ::TransformPoint(const InputPointType &point) const
   {
     otbMsgDevMacro(<< "Geographic point lon/lat : (" << point[0] << "," <<	point[1] << ")");
-    
-    // Transformation of "itk::point" in "ossim::ossimGpt" 
+
+    // Transformation of "itk::point" in "ossim::ossimGpt"
     ossimGpt ossimGPoint(point[1], point[0]);
-    
+
     if (this->m_UseDEM)
     {
 			otbMsgDevMacro(<< "USING DEM ! ") ;
@@ -83,29 +83,29 @@ namespace otb
         ossimGPoint.height(this->m_AverageElevation);
       }
     }
-    
-    
+
+
     ossimDpt ossimDPoint;
-    
+
     if( this->m_Model == NULL)
     {
   		itkExceptionMacro(<<"TransformPoint(): Invalid Model pointer m_Model == NULL !");
     }
-		
-    this->m_Model->worldToLineSample(ossimGPoint, ossimDPoint); //"worldToLineSample" appelle la m�thode "lineSampleHeightToWorld" pour prendre en compte l'�l�vation. 
-    
+
+    this->m_Model->worldToLineSample(ossimGPoint, ossimDPoint); //"worldToLineSample" appelle la m�thode "lineSampleHeightToWorld" pour prendre en compte l'�l�vation.
+
     OutputPointType outputPoint;
-    
-   
-    
+
+
+
     outputPoint[0]=ossimDPoint.x;
     outputPoint[1]=ossimDPoint.y;
 
     otbMsgDevMacro(<< "Point in sensor geometry: (" << outputPoint[0] << "," <<	outputPoint[1] << ")");
-    
+
     return outputPoint;
   }
-  
+
   template < class TScalarType,
 	     unsigned int NInputDimensions,
 	     unsigned int NOutputDimensions,
@@ -119,7 +119,7 @@ namespace otb
   {
     Superclass::PrintSelf(os,indent);
   }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbLambert2EtenduProjection.h b/Code/Projections/otbLambert2EtenduProjection.h
index e7c4899cd6..9bddcc394a 100644
--- a/Code/Projections/otbLambert2EtenduProjection.h
+++ b/Code/Projections/otbLambert2EtenduProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
    *
     */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT Lambert2EtenduProjection : public LambertConformalConicMapProjection<transform> 
+      class ITK_EXPORT Lambert2EtenduProjection : public LambertConformalConicMapProjection<transform>
   {
     public :
       /** Standard class typedefs. */
@@ -39,27 +39,27 @@ namespace otb
       typedef LambertConformalConicMapProjection<transform>   Superclass;
       typedef itk::SmartPointer<Self>                    	    Pointer;
       typedef itk::SmartPointer<const Self>              	    ConstPointer;
-      
+
       typedef typename Superclass::ScalarType                 ScalarType;
       typedef itk::Point<ScalarType,2 >   	                  InputPointType;
       typedef itk::Point<ScalarType,2 >              	        OutputPointType;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( Lambert2EtenduProjection, MapProjection );
 
-        
+
     protected:
-      Lambert2EtenduProjection(); 
+      Lambert2EtenduProjection();
       virtual ~Lambert2EtenduProjection();
-	
+
     private :
       Lambert2EtenduProjection(const Self&); //purposely not implemented
       void operator=(const Self&);                       //purposely not implemented
   };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbLambert2EtenduProjection.txx b/Code/Projections/otbLambert2EtenduProjection.txx
index 4f52330a57..b199b3a054 100644
--- a/Code/Projections/otbLambert2EtenduProjection.txx
+++ b/Code/Projections/otbLambert2EtenduProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,8 +22,8 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbLambert2EtenduProjection.h"
 
 namespace otb
-{ 
-  
+{
+
   template <InverseOrForwardTransformationEnum transform>
       Lambert2EtenduProjection<transform>
   ::Lambert2EtenduProjection()
@@ -32,29 +32,29 @@ namespace otb
     origin[0]=2.33722778;
     origin[1]=46.8;
     std::string datum = "NTF";
-  
-  
+
+
     double parall1=45.89891944;
     double parall2=47.69601389;
     double falseEasting=600000;
-    double falseNorthing=2200000;   
+    double falseNorthing=2200000;
     std::string ellipsoid = "CE";
-  
-    
+
+
     //TODO: 29-02-2008 Emmanuel: when ossim version > 1.7.2 only
     // SetOrigin required (remove SetEllipsoid)
-    this->SetOrigin(origin, datum);  
+    this->SetOrigin(origin, datum);
     this->SetEllipsoid(ellipsoid);
     this->SetParameters(parall1, parall2, falseEasting, falseNorthing);
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       Lambert2EtenduProjection<transform>
   ::~Lambert2EtenduProjection()
   {
   }
-  
- 
+
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbLambert93Projection.h b/Code/Projections/otbLambert93Projection.h
index a56d3356e5..c88afc2107 100644
--- a/Code/Projections/otbLambert93Projection.h
+++ b/Code/Projections/otbLambert93Projection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
    *
     */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT Lambert93Projection : public LambertConformalConicMapProjection<transform> 
+      class ITK_EXPORT Lambert93Projection : public LambertConformalConicMapProjection<transform>
   {
     public :
       /** Standard class typedefs. */
@@ -39,27 +39,27 @@ namespace otb
       typedef LambertConformalConicMapProjection<transform>   Superclass;
       typedef itk::SmartPointer<Self>                    	    Pointer;
       typedef itk::SmartPointer<const Self>              	    ConstPointer;
-      
+
       typedef typename Superclass::ScalarType                 ScalarType;
       typedef itk::Point<ScalarType,2 >   	                  InputPointType;
       typedef itk::Point<ScalarType,2 >              	        OutputPointType;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( Lambert93Projection, MapProjection );
 
-        
+
     protected:
-      Lambert93Projection(); 
+      Lambert93Projection();
       virtual ~Lambert93Projection();
-	
+
     private :
       Lambert93Projection(const Self&); //purposely not implemented
       void operator=(const Self&);                       //purposely not implemented
   };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbLambert93Projection.txx b/Code/Projections/otbLambert93Projection.txx
index 009f8911e4..e95a98706f 100644
--- a/Code/Projections/otbLambert93Projection.txx
+++ b/Code/Projections/otbLambert93Projection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,8 +22,8 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbLambert93Projection.h"
 
 namespace otb
-{ 
-  
+{
+
   template <InverseOrForwardTransformationEnum transform>
       Lambert93Projection<transform>
   ::Lambert93Projection()
@@ -32,29 +32,29 @@ namespace otb
     origin[0]=3;
     origin[1]=46.5;
     std::string datum = "WE"; //WGS84 datum
-  
-  
+
+
     double parall1=44;
     double parall2=49;
     double falseEasting=700000;
-    double falseNorthing=6600000;   
+    double falseNorthing=6600000;
     std::string ellipsoid = "RF"; //GRS-80 ellipsoid
-  
-    
+
+
     //TODO: 29-02-2008 Emmanuel: when ossim version > 1.7.2 only
     // SetOrigin required (remove SetEllipsoid)
-    this->SetOrigin(origin, datum);  
+    this->SetOrigin(origin, datum);
     this->SetEllipsoid(ellipsoid);
     this->SetParameters(parall1, parall2, falseEasting, falseNorthing);
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       Lambert93Projection<transform>
   ::~Lambert93Projection()
   {
   }
-  
- 
+
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbLambertConformalConicMapProjection.h b/Code/Projections/otbLambertConformalConicMapProjection.h
index 5a88370985..df307c3fbf 100644
--- a/Code/Projections/otbLambertConformalConicMapProjection.h
+++ b/Code/Projections/otbLambertConformalConicMapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
    *
    */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT LambertConformalConicMapProjection : public MapProjection<ossimLambertConformalConicProjection,transform> 
+      class ITK_EXPORT LambertConformalConicMapProjection : public MapProjection<ossimLambertConformalConicProjection,transform>
   {
     public :
       /** Standard class typedefs. */
@@ -38,17 +38,17 @@ namespace otb
       typedef MapProjection<ossimLambertConformalConicProjection,transform>   Superclass;
       typedef itk::SmartPointer<Self>                    	    Pointer;
       typedef itk::SmartPointer<const Self>              	    ConstPointer;
-      
+
       typedef typename Superclass::ScalarType                 ScalarType;
       typedef itk::Point<ScalarType,2 >   	                  InputPointType;
       typedef itk::Point<ScalarType,2 >              	        OutputPointType;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( LambertConformalConicMapProjection, MapProjection );
-      
+
       void   SetStandardParallel1 (double degree);
       void   SetStandardParallel2 (double degree);
       void   SetStandardParallels (double parallel1Degree,double parallel2Degree);
@@ -59,16 +59,16 @@ namespace otb
       void  SetParameters(double parallel1Degree,double parallel2Degree,double falseEasting,double falseNorthing);
       void  SetDefaults();
 
-        
+
     protected:
-      LambertConformalConicMapProjection(); 
+      LambertConformalConicMapProjection();
       virtual ~LambertConformalConicMapProjection();
-	
+
     private :
       LambertConformalConicMapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);                       //purposely not implemented
   };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbLambertConformalConicMapProjection.txx b/Code/Projections/otbLambertConformalConicMapProjection.txx
index 00ec163420..7cb049827c 100644
--- a/Code/Projections/otbLambertConformalConicMapProjection.txx
+++ b/Code/Projections/otbLambertConformalConicMapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,87 +22,87 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbLambertConformalConicMapProjection.h"
 
 namespace otb
-{ 
-  
+{
+
   template <InverseOrForwardTransformationEnum transform>
       LambertConformalConicMapProjection<transform>
   ::LambertConformalConicMapProjection()
   {
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       LambertConformalConicMapProjection<transform>
   ::~LambertConformalConicMapProjection()
   {
   }
-  
-  
+
+
   /// Parallel1 specification
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetStandardParallel1(double degree) 
+  ::SetStandardParallel1(double degree)
   {
     this->m_MapProjection->setStandardParallel1(degree);
   }
-  
+
   /// Parallel2 specification
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetStandardParallel2(double degree) 
+  ::SetStandardParallel2(double degree)
   {
     this->m_MapProjection->setStandardParallel2(degree);
   }
-  
+
   /// Specification of the 2 parallels
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetStandardParallels(double parallel1Degree,double parallel2Degree) 
+  ::SetStandardParallels(double parallel1Degree,double parallel2Degree)
   {
     this->m_MapProjection->setStandardParallels(parallel1Degree,parallel2Degree);
   }
-  
+
   /// False easting specification
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetFalseEasting(double falseEasting) 
+  ::SetFalseEasting(double falseEasting)
   {
     this->m_MapProjection->setFalseEasting(falseEasting);
   }
-  
+
   /// False Northing specification
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetFalseNorthing(double falseNorthing) 
+  ::SetFalseNorthing(double falseNorthing)
   {
     this->m_MapProjection->setFalseNorthing(falseNorthing);
   }
-  
+
   /// Set the parameters
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetParameters(double parallel1Degree,double parallel2Degree,double falseEasting,double falseNorthing) 
+  ::SetParameters(double parallel1Degree,double parallel2Degree,double falseEasting,double falseNorthing)
   {
     this->m_MapProjection->setParameters(parallel1Degree, parallel2Degree, falseEasting, falseNorthing);
   }
-  
+
   /// Set the default parameters
   template <InverseOrForwardTransformationEnum transform>
       void LambertConformalConicMapProjection<transform>
-  ::SetDefaults() 
+  ::SetDefaults()
   {
     this->m_MapProjection->setDefaults();
   }
-  
+
   /// Get the False Northing (avoid negative coordinates)
   template <InverseOrForwardTransformationEnum transform>
       double LambertConformalConicMapProjection<transform>
   ::GetFalseNorthing() const
   {
     double falseNorthing=this->m_MapProjection->getFalseNorthing();
-    
+
     return falseNorthing;
   }
-  
+
   ///Get the False Easting (avoid negative coordinates)
   template <InverseOrForwardTransformationEnum transform>
       double LambertConformalConicMapProjection<transform>
@@ -111,7 +111,7 @@ namespace otb
     double falseEasting=this->m_MapProjection->getFalseEasting();
     return falseEasting;
   }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbMapProjection.h b/Code/Projections/otbMapProjection.h
index bc0ed46fe2..89d3248143 100644
--- a/Code/Projections/otbMapProjection.h
+++ b/Code/Projections/otbMapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include <iostream>
 #include <sstream>
 #include <stdio.h>
-#include "projection/ossimMapProjection.h" 
+#include "projection/ossimMapProjection.h"
 #include "itkTransform.h"
 #include "itkExceptionObject.h"
 #include "itkMacro.h"
@@ -35,22 +35,22 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   /** \class MapProjection
    *  \brief This is the base class for all geographic projections (UTM, Lambert, ...)
-   * 
-   * All derived class assume that the latitude and longitude are given according to the 
+   *
+   * All derived class assume that the latitude and longitude are given according to the
    * WGS84 ellipsoid model.
    **/
-  
+
   typedef enum {FORWARD=0, INVERSE=1} InverseOrForwardTransformationEnum;
-  
+
   template <class TOssimMapProjection,
 						InverseOrForwardTransformationEnum transform,
             class TScalarType = double,
             unsigned int NInputDimensions=2,
             unsigned int NOutputDimensions=2>
-    class ITK_EXPORT MapProjection: public itk::Transform<TScalarType,       // Data type for scalars 
+    class ITK_EXPORT MapProjection: public itk::Transform<TScalarType,       // Data type for scalars
                                                           NInputDimensions,  // Number of dimensions in the input space
                                                           NOutputDimensions> // Number of dimensions in the output space
     {
@@ -62,32 +62,32 @@ namespace otb
       typedef MapProjection                    	        Self;
       typedef itk::SmartPointer<Self>                   Pointer;
       typedef itk::SmartPointer<const Self>             ConstPointer;
-      
+
       typedef typename Superclass::ScalarType 	        ScalarType;
       typedef TOssimMapProjection  			OssimMapProjectionType;
       typedef itk::Point<ScalarType,NInputDimensions >  InputPointType;
-      typedef itk::Point<ScalarType,NOutputDimensions > OutputPointType;        
-      
+      typedef itk::Point<ScalarType,NOutputDimensions > OutputPointType;
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( MapProjection, Transform );
-      
+
       typedef InverseOrForwardTransformationEnum DirectionOfMappingEnumType;
-      
+
       itkStaticConstMacro(DirectionOfMapping,DirectionOfMappingEnumType,transform);
       itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
       itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
       itkStaticConstMacro(SpaceDimension, unsigned int, NInputDimensions);
       itkStaticConstMacro(ParametersDimension, unsigned int,NInputDimensions*(NInputDimensions+1));
-      
-      
+
+
       virtual void SetEllipsoid ();
       void SetEllipsoid (const ossimEllipsoid &ellipsoid);
       void SetEllipsoid(std::string code);
       void SetEllipsoid(const double &major_axis, const double &minor_axis);
- 
+
       OutputPointType TransformPoint(const InputPointType &point) const;
       virtual InputPointType Origin();
       virtual double GetFalseNorthing() const;
@@ -95,7 +95,7 @@ namespace otb
       virtual double GetStandardParallel1() const;
       virtual double GetStandardParallel2() const;
       virtual std::string GetProjectionName() const;
-      virtual bool IsGeographic() const; 
+      virtual bool IsGeographic() const;
       virtual double GetA() const;
       virtual double GetB() const;
       virtual double GetF() const;
@@ -111,19 +111,19 @@ namespace otb
       virtual void ComputeMetersPerPixel(double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel);
       //virtual void SetMatrix(double rotation,  const OutputPointType &scale, const OutputPointType &translation);
       void SetFalseEasting(double falseEasting);
-			
+
 			virtual void PrintMap() const ;
 
       protected:
       MapProjection();
       virtual ~MapProjection();
-      OssimMapProjectionType* m_MapProjection;  
-      
+      OssimMapProjectionType* m_MapProjection;
+
       private :
       MapProjection(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
     };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbMapProjection.txx b/Code/Projections/otbMapProjection.txx
index 40868eb032..72e17c2fa8 100644
--- a/Code/Projections/otbMapProjection.txx
+++ b/Code/Projections/otbMapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,23 +23,23 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::MapProjection() : Superclass(SpaceDimension,ParametersDimension)
   {
     m_MapProjection =  new OssimMapProjectionType();
   }
-  
-  
+
+
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::~MapProjection()
   {
     delete m_MapProjection;
   }
-  
-  
+
+
   /// Method to set the projection ellipsoid
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
@@ -48,15 +48,15 @@ namespace otb
     ossimEllipsoid ellipsoid;
     m_MapProjection->setEllipsoid(ellipsoid);
   }
-  
+
   /// Method to set the projection ellipsoid by copy
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::SetEllipsoid(const ossimEllipsoid &ellipsoid)
   {
     m_MapProjection->setEllipsoid(ellipsoid);
   }
-  
+
   ///// Method to set the projection ellipsoid by knowing its code
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
@@ -65,7 +65,7 @@ namespace otb
     const ossimEllipsoid ellipsoid = *(ossimEllipsoidFactory::instance()->create(ossimString(code)));
     m_MapProjection->setEllipsoid(ellipsoid);
   }
-  
+
   ///// Method to set the projection ellipsoid by knowing its axis
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
@@ -74,29 +74,29 @@ namespace otb
     ossimEllipsoid ellipsoid(major_axis,minor_axis);
     m_MapProjection->setEllipsoid(ellipsoid);
   }
-  
+
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::TransformPoint(const InputPointType & point) const
   {
     OutputPointType outputPoint;
-    
+
     switch(DirectionOfMapping)
       {
       case INVERSE:
 	{
 	  otbMsgDevMacro(<< "Cartographic coordinates: (" << point[0] << "," << point[1] << ")");
-	  
-	  //from "itk::point" to "ossim::ossimDpt" 
+
+	  //from "itk::point" to "ossim::ossimDpt"
 	  ossimDpt ossimDPoint(point[0], point[1]);
-	  
+
 	  //map projection
 	  ossimGpt ossimGPoint;
 	  ossimGPoint=m_MapProjection->inverse(ossimDPoint);
           ossimGPoint.changeDatum(ossimDatumFactory::instance()->wgs84() );
 //	 	otbGenericMsgDebugMacro(<< "Inverse : " << std::endl << m_MapProjection->print(std::cout));
-		
+
 	  outputPoint[0]=ossimGPoint.lon;
 	  outputPoint[1]=ossimGPoint.lat;
 	  otbMsgDevMacro(<< "Geographic coordinates (lon, lat) : (" << outputPoint[0] << "," << outputPoint[1] << ")");
@@ -107,7 +107,7 @@ namespace otb
 	  otbMsgDevMacro(<< "Geographic coordinates (lon, lat) : (" << point[1] << "," << point[0] << ")");
 		//from "itk::point" to "ossim::ossimGpt"
 	  ossimGpt ossimGPoint(point[1], point[0]);
-	  
+
 	  //map projection
           ossimDpt ossimDPoint;
 	  ossimDPoint=m_MapProjection->forward(ossimGPoint);
@@ -123,17 +123,17 @@ namespace otb
 	{
 	  itkExceptionMacro(<<"Model is INVERSE or FORWARD only !!");
 	  break;
-	}	
+	}
       }
-    
+
     return outputPoint;
   }
-  
-  
-  
+
+
+
   ///\return The geographic point corresponding to (0,0)
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-  typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::InputPointType 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+  typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::InputPointType
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::Origin()
   {
@@ -141,32 +141,32 @@ namespace otb
     InputPointType otbOrigin;
     otbOrigin[0]= ossimOrigin.lat;
     otbOrigin[1]= ossimOrigin.lon;
-    
+
     return otbOrigin;
   }
-  
+
   ///\return The False Northing(avoid negative coordinates)
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
-  double 
+  double
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetFalseNorthing() const
   {
     double falseNorthing=m_MapProjection->getFalseNorthing();
-    
+
     return falseNorthing;
   }
-  
+
   ///\return The FalseEasting(avoid negative coordinates)
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
-  double 
+  double
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetFalseEasting() const
   {
     double falseEasting=m_MapProjection->getFalseEasting();
-    
+
     return falseEasting;
   }
-  
+
   ///\return The StandardParallel1(depends on the projection type)
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   double
@@ -174,117 +174,117 @@ namespace otb
   ::GetStandardParallel1() const
   {
     double standardParallel1=m_MapProjection->getStandardParallel1();
-    
+
     return standardParallel1;
   }
-  
+
   ///\return The StandardParallel2(depends on the projection type)
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
-  double 
+  double
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetStandardParallel2() const
   {
     double standardParallel2=m_MapProjection->getStandardParallel2();
-    
+
     return standardParallel2;
   }
-  
+
   ///\return The projection name
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-  std::string 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+  std::string
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetProjectionName() const
   {
     std::string projectionName;
     projectionName=m_MapProjection->getProjectionName();
-    
+
     return projectionName;
   }
-  
+
   ///Check if the projection is geographic
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
-  bool 
+  bool
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::IsGeographic() const
   {
     return (m_MapProjection->isGeographic());
   }
-  
+
   ///\return the major axis of the ellipsoid
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
-  double 
+  double
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetA() const
   {
     double majorAxis=m_MapProjection->getA();
-    
+
     return majorAxis;
   }
-  
+
   ///\return the minor axis of the ellipsoid
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
-  double 
+  double
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetB() const
   {
     double minorAxis=m_MapProjection->getB();
-    
+
     return minorAxis;
   }
-  
+
   ///\return the flatening of the ellipsoid
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-  double 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+  double
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetF() const
   {
     double flattening=m_MapProjection->getF();
-    
+
     return flattening;
   }
-  
+
   ///\return The resolution in meters
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-  typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+  typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetMetersPerPixel() const
   {
     ossimDpt ossimMetersPerPixels=m_MapProjection->getMetersPerPixel();
     OutputPointType metersPerPixels;
-    
+
     metersPerPixels[0]=ossimMetersPerPixels.x;
     metersPerPixels[1]=ossimMetersPerPixels.y;
-    
+
     return metersPerPixels;
   }
-  
+
   ///\return The resolution in degree
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-  typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+  typename MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::GetDecimalDegreesPerPixel() const
   {
     ossimDpt ossimDecimalDegreesPerPixels=m_MapProjection->getDecimalDegreesPerPixel();
     OutputPointType DecimalDegreesPerPixels;
-    
+
     DecimalDegreesPerPixels[0]=ossimDecimalDegreesPerPixels.x;
     DecimalDegreesPerPixels[1]=ossimDecimalDegreesPerPixels.y;
-    
+
     return DecimalDegreesPerPixels;
   }
-  
+
   ///Set the ellipsoid axis
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::SetAB(double a, double b) 
+  ::SetAB(double a, double b)
   {
     m_MapProjection->setAB(a,b);
   }
-  
+
   ///Set the origin
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::SetOrigin(const InputPointType &origin) 
+  ::SetOrigin(const InputPointType &origin)
   {
     ossimGpt ossimOrigin(origin[1], origin[0]);
     m_MapProjection->setOrigin(ossimOrigin);
@@ -292,81 +292,81 @@ namespace otb
     // SetOrigin required (remove SetDatum)
     m_MapProjection->setDatum(ossimOrigin.datum());
   }
-  
+
   ///Set the origin in a given datum
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
       void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::SetOrigin(const InputPointType &origin, std::string datumCode) 
+  ::SetOrigin(const InputPointType &origin, std::string datumCode)
   {
     ossimGpt ossimOrigin(origin[1], origin[0], 0, ossimDatumFactory::instance()->create(datumCode));
     m_MapProjection->setOrigin(ossimOrigin);
     m_MapProjection->setDatum(ossimOrigin.datum());
   }
-  
+
   ///Set the map resolution in meters
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::SetMetersPerPixel(const OutputPointType &point) 
+  ::SetMetersPerPixel(const OutputPointType &point)
   {
     ossimDpt ossimDPoint(point[0], point[1]);
     m_MapProjection->setMetersPerPixel(ossimDPoint);
   }
-  
+
   ///Set the map resolution in degree
   template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::SetDecimalDegreesPerPixel(const OutputPointType &point) 
+  ::SetDecimalDegreesPerPixel(const OutputPointType &point)
   {
     ossimDpt ossimDPoint(point[0], point[1]);
     m_MapProjection->setDecimalDegreesPerPixel(ossimDPoint);
   }
-  
+
   ///\return an approximation of the resolution in degree
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::ComputeDegreesPerPixel(const InputPointType &ground, const OutputPointType &metersPerPixel, double &deltaLat, double &deltaLon) 
+  ::ComputeDegreesPerPixel(const InputPointType &ground, const OutputPointType &metersPerPixel, double &deltaLat, double &deltaLon)
   {
     ossimDpt ossimMetersPerPixel(metersPerPixel[0], metersPerPixel[1]);
     ossimGpt ossimGround(ground[1],ground[0]);
     m_MapProjection->computeDegreesPerPixel(ossimGround,ossimMetersPerPixel,deltaLat,deltaLon);
   }
-  
+
   ///\return an approximation of the resolution in meters
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
   void
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::ComputeMetersPerPixel(const InputPointType &center, double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel) 
+  ::ComputeMetersPerPixel(const InputPointType &center, double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel)
   {
-    //Correction 
+    //Correction
     ossimGpt ossimCenter(center[1],center[0]);
     ossimDpt ossimMetersPerPixel;
     m_MapProjection->computeMetersPerPixel(ossimCenter,deltaDegreesPerPixelLat, deltaDegreesPerPixelLon,ossimMetersPerPixel);
     metersPerPixel[0]=ossimMetersPerPixel.x;
     metersPerPixel[1]=ossimMetersPerPixel.y;
   }
-  
+
   ///\return an approximation of the resolution in meters
-  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-  void 
+  template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+  void
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
-  ::ComputeMetersPerPixel(double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel) 
+  ::ComputeMetersPerPixel(double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel)
   {
     ossimDpt ossimMetersPerPixel;
     m_MapProjection->computeMetersPerPixel(m_MapProjection->origin(),deltaDegreesPerPixelLat, deltaDegreesPerPixelLon,ossimMetersPerPixel);
     metersPerPixel[0]=ossimMetersPerPixel.x;
     metersPerPixel[1]=ossimMetersPerPixel.y;
   }
-	
-	template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-	void 
+
+	template<class TOssimMapProjection, InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+	void
   MapProjection<TOssimMapProjection, Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::PrintMap() const
 	{
 		std::cout << m_MapProjection->print(std::cout);
 	}
 
-	
-	
+
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbMapProjections.h b/Code/Projections/otbMapProjections.h
index c3ef6e8736..a24cb76081 100644
--- a/Code/Projections/otbMapProjections.h
+++ b/Code/Projections/otbMapProjections.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -59,17 +59,17 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   typedef MapProjection<ossimAlbersProjection,INVERSE>               AlbersInverseProjection;
   typedef MapProjection<ossimAlbersProjection,FORWARD>               AlbersForwardProjection;
   typedef MapProjection<ossimAzimEquDistProjection,INVERSE>          AzimEquDistInverseProjection;
-  typedef MapProjection<ossimAzimEquDistProjection,FORWARD>          AzimEquDistForwardProjection;	
+  typedef MapProjection<ossimAzimEquDistProjection,FORWARD>          AzimEquDistForwardProjection;
   typedef MapProjection<ossimBngProjection,INVERSE>                  BngInverseProjection;
   typedef MapProjection<ossimBngProjection,FORWARD>                  BngForwardProjection;
   typedef MapProjection<ossimBonneProjection,INVERSE>                BonneInverseProjection;
-  typedef MapProjection<ossimBonneProjection,FORWARD>                BonneForwardProjection;	
+  typedef MapProjection<ossimBonneProjection,FORWARD>                BonneForwardProjection;
   typedef MapProjection<ossimCadrgProjection,INVERSE>                CadrgInverseProjection;
-  typedef MapProjection<ossimCadrgProjection,FORWARD>                CadrgForwardProjection;	
+  typedef MapProjection<ossimCadrgProjection,FORWARD>                CadrgForwardProjection;
   typedef MapProjection<ossimCassiniProjection,INVERSE>              CassiniInverseProjection;
   typedef MapProjection<ossimCassiniProjection,FORWARD>              CassiniForwardProjection;
   typedef MapProjection<ossimCylEquAreaProjection,INVERSE>           CylEquAreaInverseProjection;
@@ -81,9 +81,9 @@ namespace otb
   typedef MapProjection<ossimGnomonicProjection,INVERSE>             GnomonicInverseProjection;
   typedef MapProjection<ossimGnomonicProjection,FORWARD>             GnomonicForwardProjection;
   typedef LambertConformalConicMapProjection<INVERSE>                LambertConformalConicInverseProjection;
-  typedef LambertConformalConicMapProjection<FORWARD>                LambertConformalConicForwardProjection;	
+  typedef LambertConformalConicMapProjection<FORWARD>                LambertConformalConicForwardProjection;
   typedef Lambert2EtenduProjection<INVERSE>                          Lambert2EtenduInverseProjection;
-  typedef Lambert2EtenduProjection<FORWARD>                          Lambert2EtenduForwardProjection;	
+  typedef Lambert2EtenduProjection<FORWARD>                          Lambert2EtenduForwardProjection;
   typedef Lambert93Projection<INVERSE>                               Lambert93InverseProjection;
   typedef Lambert93Projection<FORWARD>                               Lambert93ForwardProjection;
   typedef SVY21MapProjection<INVERSE>                                SVY21InverseProjection;
@@ -108,7 +108,7 @@ namespace otb
   typedef MapProjection<ossimPolarStereoProjection,FORWARD>          PolarStereoForwardProjection;
   typedef MapProjection<ossimPolyconicProjection,INVERSE>            PolyconicInverseProjection;
   typedef MapProjection<ossimPolyconicProjection,FORWARD>            PolyconicForwardProjection;
-  typedef SinusoidalMapProjection<INVERSE>                           SinusoidalInverseProjection;  
+  typedef SinusoidalMapProjection<INVERSE>                           SinusoidalInverseProjection;
   typedef SinusoidalMapProjection<FORWARD>                           SinusoidalForwardProjection;
   typedef MapProjection<ossimSpaceObliqueMercatorProjection,INVERSE> SpaceObliqueMercatorInverseProjection;
   typedef MapProjection<ossimSpaceObliqueMercatorProjection,FORWARD> SpaceObliqueMercatorForwardProjection;
@@ -124,6 +124,6 @@ namespace otb
   typedef UtmMapProjection<FORWARD>                                  UtmForwardProjection;
   typedef MapProjection<ossimVanDerGrintenProjection,INVERSE>        VanDerGrintenInverseProjection;
   typedef MapProjection<ossimVanDerGrintenProjection,FORWARD>        VanDerGrintenForwardProjection;
-  
+
 }//namespace otb
 #endif
diff --git a/Code/Projections/otbMapToMapProjection.h b/Code/Projections/otbMapToMapProjection.h
index c96ea47fb8..2fd05472f4 100644
--- a/Code/Projections/otbMapToMapProjection.h
+++ b/Code/Projections/otbMapToMapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,22 +27,22 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-  
+
+
   /** \class MapToMapProjection
-      
+
   * \brief Class for switching from a Map Projection coordinates to other Map Projection coordinates.
   * It converts MapProjection1 coordinates to MapProjection2 coordinates by using MapProjection methods.
   * It takes a point in input.
   * (X_1, Y_1) -> (lat, lon) -> (X_2, Y_2)
-  * \ingroup Transform 
+  * \ingroup Transform
   */
   template <class TInputMapProjection,
             class TOutputMapProjection,
-            class TScalarType=double, 
+            class TScalarType=double,
             unsigned int NInputDimensions=2,
             unsigned int NOutputDimensions=2>
-    class ITK_EXPORT MapToMapProjection: public itk::Transform<TScalarType,       // Data type for scalars 
+    class ITK_EXPORT MapToMapProjection: public itk::Transform<TScalarType,       // Data type for scalars
                                                                NInputDimensions,  // Number of dimensions in the input space
                                                                NOutputDimensions> // Number of dimensions in the output space
     {
@@ -54,56 +54,56 @@ namespace otb
       typedef MapToMapProjection                         Self;
       typedef itk::SmartPointer<Self>              	 Pointer;
       typedef itk::SmartPointer<const Self>        	 ConstPointer;
-      
+
       typedef TInputMapProjection                  	 		InputMapProjectionType;
 			typedef typename InputMapProjectionType::Pointer	InputMapProjectionPointerType;
 			typedef typename InputMapProjectionType::OutputPointType OutputPointOfInputMapProjectionType;
-			
+
       typedef TOutputMapProjection                 	 		OutputMapProjectionType;
 			typedef typename OutputMapProjectionType::Pointer	OutputMapProjectionPointerType;
-      
+
 			typedef typename Superclass::InputPointType  InputPointType;
-      typedef typename Superclass::OutputPointType  OutputPointType;        
-      
+      typedef typename Superclass::OutputPointType  OutputPointType;
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( MapToMapProjection, itk::Transform );
-      
+
       itkStaticConstMacro(InputSpaceDimension,  unsigned int, NInputDimensions);
       itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
       itkStaticConstMacro(SpaceDimension,       unsigned int, NInputDimensions);
       itkStaticConstMacro(ParametersDimension,  unsigned int, NInputDimensions*(NInputDimensions+1));
-      
-      /** Set MapProjection1. */  
-      itkSetObjectMacro(InputMapProjection,InputMapProjectionType); 
-      
-      /** Set MapProjection2. */ 
+
+      /** Set MapProjection1. */
+      itkSetObjectMacro(InputMapProjection,InputMapProjectionType);
+
+      /** Set MapProjection2. */
       itkSetObjectMacro(OutputMapProjection,OutputMapProjectionType);
-      
+
 			/** Transform Point from MapProjection1 to MapProjection2 */
       OutputPointType TransformPoint(const InputPointType &point) const;
 
-//    Compute MapProjection1 coordinates to MapProjection2 coordinates. */ 
+//    Compute MapProjection1 coordinates to MapProjection2 coordinates. */
 //    OutputPointType ComputeProjection1ToProjection2(const InputPointType &point1);
-      
-//		Compute MapProjection1 coordinates to MapProjection2 coordinates. */ 
+
+//		Compute MapProjection1 coordinates to MapProjection2 coordinates. */
 //    InputPointType ComputeProjection2ToProjection1(const OutputPointType &point2);
-      
+
       protected:
       MapToMapProjection();
       ~MapToMapProjection();
-      
+
       InputMapProjectionPointerType  m_InputMapProjection;
-      OutputMapProjectionPointerType m_OutputMapProjection;  
-      
+      OutputMapProjectionPointerType m_OutputMapProjection;
+
       private:
       MapToMapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);     //purposely not implemented
-      
+
     };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbMapToMapProjection.txx b/Code/Projections/otbMapToMapProjection.txx
index 4eb7b64aba..5ea2679334 100644
--- a/Code/Projections/otbMapToMapProjection.txx
+++ b/Code/Projections/otbMapToMapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,123 +22,123 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-template<class TInputMapProjection, 
-         class TOutputMapProjection, 
-         class TScalarType, 
-         unsigned int NInputDimensions, 
+
+template<class TInputMapProjection,
+         class TOutputMapProjection,
+         class TScalarType,
+         unsigned int NInputDimensions,
          unsigned int NOutputDimensions>
-MapToMapProjection<TInputMapProjection, 
-                   TOutputMapProjection, 
-                   TScalarType, 
-                   NInputDimensions, 
+MapToMapProjection<TInputMapProjection,
+                   TOutputMapProjection,
+                   TScalarType,
+                   NInputDimensions,
                    NOutputDimensions>
 ::MapToMapProjection()
   : Superclass(SpaceDimension,ParametersDimension)
 {
 }
-  
-template<class TInputMapProjection, 
-         class TOutputMapProjection, 
-         class TScalarType, 
-         unsigned int NInputDimensions, 
+
+template<class TInputMapProjection,
+         class TOutputMapProjection,
+         class TScalarType,
+         unsigned int NInputDimensions,
          unsigned int NOutputDimensions>
-MapToMapProjection<TInputMapProjection, 
-                   TOutputMapProjection, 
-                   TScalarType, 
-                   NInputDimensions, 
+MapToMapProjection<TInputMapProjection,
+                   TOutputMapProjection,
+                   TScalarType,
+                   NInputDimensions,
                    NOutputDimensions>
 ::~MapToMapProjection()
 {
 }
-  
+
   ///Pass from projection 1 to projection 2
-/*  template<class TInputMapProjection, 
-	   class TOutputMapProjection, 
-	   class TScalarType, 
-	   unsigned int NInputDimensions, 
-	   unsigned int NOutputDimensions> 
-  typename MapToMapProjection<TInputMapProjection, 
-			      TOutputMapProjection, 
-			      TScalarType, 
-			      NInputDimensions, 
-			      NOutputDimensions>::OutputPointType 
-  MapToMapProjection<TInputMapProjection, 
-		     TOutputMapProjection, 
-		     TScalarType, 
-		     NInputDimensions, 
+/*  template<class TInputMapProjection,
+	   class TOutputMapProjection,
+	   class TScalarType,
+	   unsigned int NInputDimensions,
+	   unsigned int NOutputDimensions>
+  typename MapToMapProjection<TInputMapProjection,
+			      TOutputMapProjection,
+			      TScalarType,
+			      NInputDimensions,
+			      NOutputDimensions>::OutputPointType
+  MapToMapProjection<TInputMapProjection,
+		     TOutputMapProjection,
+		     TScalarType,
+		     NInputDimensions,
 		     NOutputDimensions>::ComputeProjection1ToProjection2(const InputPointType &point1)
   {
     InputPointType geopoint;
-    OutputPointType point2;	
-    
-    //(lat,lon) projection 
-    geopoint=m_InputMapProjection->Inverse(point1); 
+    OutputPointType point2;
+
+    //(lat,lon) projection
+    geopoint=m_InputMapProjection->Inverse(point1);
     //map projection
-    point2=m_OutputMapProjection->Forward(geopoint); 
-    
+    point2=m_OutputMapProjection->Forward(geopoint);
+
     return point2;
   }
 
   ///Pass from projection 2 to projection 1
-  template<class TInputMapProjection, 
-	   class TOutputMapProjection, 
-	   class TScalarType, 
-	   unsigned int NInputDimensions, 
-	   unsigned int NOutputDimensions> 
-  typename MapToMapProjection<TInputMapProjection, 
-			      TOutputMapProjection, 
-			      TScalarType, 
-			      NInputDimensions, 
-			      NOutputDimensions>::InputPointType 
-  MapToMapProjection<TInputMapProjection, 
-		     TOutputMapProjection, 
-		     TScalarType, 
-		     NInputDimensions, 
+  template<class TInputMapProjection,
+	   class TOutputMapProjection,
+	   class TScalarType,
+	   unsigned int NInputDimensions,
+	   unsigned int NOutputDimensions>
+  typename MapToMapProjection<TInputMapProjection,
+			      TOutputMapProjection,
+			      TScalarType,
+			      NInputDimensions,
+			      NOutputDimensions>::InputPointType
+  MapToMapProjection<TInputMapProjection,
+		     TOutputMapProjection,
+		     TScalarType,
+		     NInputDimensions,
 		     NOutputDimensions>::ComputeProjection2ToProjection1(const OutputPointType &point2)
   {
-    
+
     OutputPointType geopoint;
     InputPointType point1;
-    
+
     //(lat,lon) projection
     geopoint=m_OutputMapProjection->Inverse(point2);
     //map projection
     point1=m_InputMapProjection->Forward(geopoint);
-    
+
     return point1;
   }*/
 
-template<class TInputMapProjection, 
-         class TOutputMapProjection, 
-         class TScalarType, 
-         unsigned int NInputDimensions, 
-         unsigned int NOutputDimensions>	
-typename MapToMapProjection<TInputMapProjection, 
-                   TOutputMapProjection, 
-                   TScalarType, 
-                   NInputDimensions, 
+template<class TInputMapProjection,
+         class TOutputMapProjection,
+         class TScalarType,
+         unsigned int NInputDimensions,
+         unsigned int NOutputDimensions>
+typename MapToMapProjection<TInputMapProjection,
+                   TOutputMapProjection,
+                   TScalarType,
+                   NInputDimensions,
                    NOutputDimensions>
-::OutputPointType 
-MapToMapProjection<TInputMapProjection, 
-                   TOutputMapProjection, 
-                   TScalarType, 
-                   NInputDimensions, 
+::OutputPointType
+MapToMapProjection<TInputMapProjection,
+                   TOutputMapProjection,
+                   TScalarType,
+                   NInputDimensions,
                    NOutputDimensions>::
 TransformPoint(const InputPointType &point) const
 {
     OutputPointOfInputMapProjectionType geopoint;
-    OutputPointType point2;	
-    
-    //(lat,lon) projection 
-    geopoint=m_InputMapProjection->TransformPoint(point); 
-    
+    OutputPointType point2;
+
+    //(lat,lon) projection
+    geopoint=m_InputMapProjection->TransformPoint(point);
+
 		//map projection
-    point2=m_OutputMapProjection->TransformPoint(geopoint); 
-    
+    point2=m_OutputMapProjection->TransformPoint(geopoint);
+
     return point2;
 }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbMollweidMapProjection.h b/Code/Projections/otbMollweidMapProjection.h
index f240cc1c8d..5fe6b9279b 100644
--- a/Code/Projections/otbMollweidMapProjection.h
+++ b/Code/Projections/otbMollweidMapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
    *  It converts coordinates in longitude,latitude (WGS84) to Mollweid map coordinates.
    */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT MollweidMapProjection : public	MapProjection<ossimMollweidProjection, transform> 
+      class ITK_EXPORT MollweidMapProjection : public	MapProjection<ossimMollweidProjection, transform>
   {
     public :
       /** Standard class typedefs. */
@@ -37,14 +37,14 @@ namespace otb
       typedef MapProjection<ossimMollweidProjection,transform>  Superclass;
       typedef itk::SmartPointer<Self>                 Pointer;
       typedef itk::SmartPointer<const Self>           ConstPointer;
- 
+
       typedef typename Superclass::ScalarType  		 ScalarType;
       typedef itk::Point<ScalarType,2 >   	      	 InputPointType;
-      typedef itk::Point<ScalarType,2 >  	      	 OutputPointType;      
- 
+      typedef itk::Point<ScalarType,2 >  	      	 OutputPointType;
+
       /** Method for creation through the object factory. */
       itkNewMacro(Self);
- 
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( MollweidMapProjection, MapProjection );
       virtual void SetFalseEasting(double falseEasting);
@@ -53,22 +53,22 @@ namespace otb
       virtual double GetFalseEasting() const;
       virtual void SetParameters(double falseEasting,double falseNorthing);
       virtual void SetDefaults();
- 
+
     protected:
-      MollweidMapProjection(); 
+      MollweidMapProjection();
       virtual ~MollweidMapProjection();
- 
+
     private :
       MollweidMapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);          //purposely not implemented
- 
+
   };
- 
- 
+
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
 #include "otbMollweidMapProjection.txx"
-#endif 
+#endif
 
 #endif
diff --git a/Code/Projections/otbMollweidMapProjection.txx b/Code/Projections/otbMollweidMapProjection.txx
index 96e837f2fa..736cf9b258 100644
--- a/Code/Projections/otbMollweidMapProjection.txx
+++ b/Code/Projections/otbMollweidMapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,71 +23,71 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   template <InverseOrForwardTransformationEnum transform>
       MollweidMapProjection<transform>
   ::MollweidMapProjection()
   {
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       MollweidMapProjection<transform>
   ::~MollweidMapProjection()
   {
   }
-  
+
   ///Set the false easting
   template <InverseOrForwardTransformationEnum transform>
       void MollweidMapProjection<transform>
-  ::SetFalseEasting(double falseEasting) 
+  ::SetFalseEasting(double falseEasting)
   {
     this->m_MapProjection->setFalseEasting(falseEasting);
   }
-  
+
   ///Set the false Northing
   template <InverseOrForwardTransformationEnum transform>
       void MollweidMapProjection<transform>
-  ::SetFalseNorthing(double falseNorthing) 
+  ::SetFalseNorthing(double falseNorthing)
   {
     this->m_MapProjection->setFalseNorthing(falseNorthing);
   }
-  
+
   ///Set the default parameters
   template <InverseOrForwardTransformationEnum transform>
       void MollweidMapProjection<transform>
-  ::SetDefaults() 
+  ::SetDefaults()
   {
     this->m_MapProjection->setDefaults();
   }
-  
+
   ///\return the false northing (avoid negative coordinates)
   template <InverseOrForwardTransformationEnum transform>
       double MollweidMapProjection<transform>
   ::GetFalseNorthing() const
   {
     double falseNorthing=this->m_MapProjection->getFalseNorthing();
-    
+
     return falseNorthing;
   }
-  
+
   ///\return the false easting (avoid negative coordinates)
   template <InverseOrForwardTransformationEnum transform>
       double MollweidMapProjection<transform>
   ::GetFalseEasting() const
   {
     double falseEasting=this->m_MapProjection->getFalseEasting();
-    
+
     return falseEasting;
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       void MollweidMapProjection<transform>
   ::SetParameters(double falseEasting,double falseNorthing)
   {
     this->m_MapProjection->setFalseEastingNorthing(falseEasting,falseNorthing);
   }
-	
+
 } // end namespace otb
-  
+
 
 #endif
diff --git a/Code/Projections/otbOrthoRectificationFilter.h b/Code/Projections/otbOrthoRectificationFilter.h
index 1ebd69f26a..083e50a82e 100644
--- a/Code/Projections/otbOrthoRectificationFilter.h
+++ b/Code/Projections/otbOrthoRectificationFilter.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,87 +31,87 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
   /** \class OrthoRectificationFilter
-   * 
+   *
    * \brief Class for Orthorectifying an image
    *
    * This class is used to apply map projection and sensor model transformation
    * to orthorectify an image, with or without DEM.
-   * 
+   *
    * \example Projections/OrthoRectificationExample.cxx
-   * 
+   *
    */
-  
+
   template <class TInputImage,
             class TOutputImage,
             class TMapProjection,
             class TInterpolatorPrecision=double>
-    class ITK_EXPORT OrthoRectificationFilter : public StreamingResampleImageFilter<TInputImage, 
+    class ITK_EXPORT OrthoRectificationFilter : public StreamingResampleImageFilter<TInputImage,
                                                                                     TOutputImage,
-                                                                                    TInterpolatorPrecision>  
+                                                                                    TInterpolatorPrecision>
     {
       public :
       /** Standard class typedefs */
-      typedef StreamingResampleImageFilter<TInputImage, 
+      typedef StreamingResampleImageFilter<TInputImage,
                                            TOutputImage,
                                            TInterpolatorPrecision>  Superclass;
       typedef OrthoRectificationFilter    			    Self;
       typedef itk::SmartPointer<Self>              		    Pointer;
       typedef itk::SmartPointer<const Self>        		    ConstPointer;
-      
+
       typedef typename TInputImage::IndexType 	  IndexType;
       typedef typename TInputImage::SizeType  	  SizeType;
       typedef typename TInputImage::SpacingType   SpacingType;
       typedef typename TInputImage::PointType	  PointType;
       typedef typename TInputImage::RegionType    RegionType;
-      
+
       typedef typename TOutputImage::PixelType    OutputPixelType;
-      
+
       typedef TMapProjection			  MapProjectionType;
       typedef typename TMapProjection::Pointer    MapProjectionPointerType;
-      
+
       typedef InverseSensorModel<double>          SensorModelType;
       typedef typename SensorModelType::Pointer   SensorModelPointerType;
-      
-      typedef CompositeTransform< MapProjectionType,SensorModelType> CompositeTransformType; 
-      typedef typename CompositeTransformType::Pointer               CompositeTransformPointerType; 
-      
+
+      typedef CompositeTransform< MapProjectionType,SensorModelType> CompositeTransformType;
+      typedef typename CompositeTransformType::Pointer               CompositeTransformPointerType;
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( OrthoRectificationFilter, StreamingResampleImageFilter );
-      
+
       /** Accessors */
-      virtual void SetMapProjection (MapProjectionType* _arg) 
-      { 
-				if (this->m_MapProjection != _arg) 
-	  		{ 
-	    		this->m_MapProjection = _arg; 
+      virtual void SetMapProjection (MapProjectionType* _arg)
+      {
+				if (this->m_MapProjection != _arg)
+	  		{
+	    		this->m_MapProjection = _arg;
 	    		m_CompositeTransform->SetFirstTransform(_arg);
 	    		m_IsComputed = false;
-	    		this->Modified(); 
-	  		} 
-      } 
-      
+	    		this->Modified();
+	  		}
+      }
+
       itkGetObjectMacro(MapProjection, MapProjectionType);
-      
+
       /** Specify where are DEM files, and load useful ones */
       virtual void SetDEMDirectory(const std::string& directory)
       {
 	m_SensorModel->SetDEMDirectory(directory);
 	this->Modified();
-      }	
-      
-      /** Methods to decide to use DEM */	
-      virtual void EnableDEM() 
-	{ 
-		m_SensorModel->EnableDEM(); 
-  		this->Modified(); 
+      }
+
+      /** Methods to decide to use DEM */
+      virtual void EnableDEM()
+	{
+		m_SensorModel->EnableDEM();
+  		this->Modified();
 	}
 
 	virtual void DisableDEM()
 	{
-		m_SensorModel->DisableDEM(); 
+		m_SensorModel->DisableDEM();
 		this->Modified();
 	}
 
@@ -125,36 +125,36 @@ namespace otb
 
 
 
-      
+
       protected:
       OrthoRectificationFilter();
       ~OrthoRectificationFilter();
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
       virtual void GenerateInputRequestedRegion();
-      
-      
+
+
       private:
       OrthoRectificationFilter(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
-      
-      /** Calculate transformation model from sensor model & map projection	composition */	
+
+      /** Calculate transformation model from sensor model & map projection	composition */
       void ComputeResampleTransformationModel();
-      
+
       /** Boolean used to know if transformation model computation is needed */
-      bool m_IsComputed;	
-	
+      bool m_IsComputed;
+
       /** Sensor Model used to transform geographic coordinates in image sensor	index */
       SensorModelPointerType m_SensorModel;
-      
+
       /** Map Projection used to transform cartographic coordinates in geographic	coordinates */
       MapProjectionPointerType m_MapProjection;
-      
+
       /** Composite Transform of Sensor Model and Map Projection, used for Resampler */
       CompositeTransformPointerType m_CompositeTransform;
-      
+
     };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbOrthoRectificationFilter.txx b/Code/Projections/otbOrthoRectificationFilter.txx
index fdf14de1ce..ad8abed40e 100644
--- a/Code/Projections/otbOrthoRectificationFilter.txx
+++ b/Code/Projections/otbOrthoRectificationFilter.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,79 +22,79 @@ PURPOSE.  See the above copyright notices for more information.
 
 
 namespace otb
-{ 
-  
-  template <class TInputImage, 
-	    			class TOutputImage, 
-	    			class TMapProjection, 
+{
+
+  template <class TInputImage,
+	    			class TOutputImage,
+	    			class TMapProjection,
 	    			class TInterpolatorPrecision>
-  OrthoRectificationFilter<TInputImage, 
-			   								 	 TOutputImage, 
-			  	 								 TMapProjection, 
+  OrthoRectificationFilter<TInputImage,
+			   								 	 TOutputImage,
+			  	 								 TMapProjection,
 			   									 TInterpolatorPrecision>
   ::OrthoRectificationFilter() : StreamingResampleImageFilter<TInputImage,
 								   TOutputImage,
 								   TInterpolatorPrecision>()
   {
-    
+
     m_SensorModel = SensorModelType::New();
     m_MapProjection = MapProjectionType::New();
     m_CompositeTransform = CompositeTransformType::New();
     m_IsComputed = false;
   }
-  
-  template <class TInputImage, 
-	    			class TOutputImage, 
-	    			class TMapProjection, 
+
+  template <class TInputImage,
+	    			class TOutputImage,
+	    			class TMapProjection,
 	    			class TInterpolatorPrecision>
-  OrthoRectificationFilter<TInputImage, 
-			   									 TOutputImage, 
-			   									 TMapProjection, 
+  OrthoRectificationFilter<TInputImage,
+			   									 TOutputImage,
+			   									 TMapProjection,
 			   									 TInterpolatorPrecision>
   ::~OrthoRectificationFilter()
   {
   }
-  
-  template <class TInputImage, 
-	    			class TOutputImage, 
-	    			class TMapProjection, 
+
+  template <class TInputImage,
+	    			class TOutputImage,
+	    			class TMapProjection,
 	    			class TInterpolatorPrecision>
-  void OrthoRectificationFilter<TInputImage, 
-															  TOutputImage, 
-																TMapProjection, 
+  void OrthoRectificationFilter<TInputImage,
+															  TOutputImage,
+																TMapProjection,
 																TInterpolatorPrecision>
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
     Superclass::PrintSelf(os, indent);
-    
+
     os << indent << "OrthoRectification" << "\n";
   }
-  
-  
-  template <class TInputImage, 
-	    			class TOutputImage, 
-	    			class TMapProjection, 
+
+
+  template <class TInputImage,
+	    			class TOutputImage,
+	    			class TMapProjection,
 	    			class TInterpolatorPrecision>
   void
-  OrthoRectificationFilter<TInputImage, 
-			   									 TOutputImage, 
-			   									 TMapProjection, 
+  OrthoRectificationFilter<TInputImage,
+			   									 TOutputImage,
+			   									 TMapProjection,
 			   									 TInterpolatorPrecision>
   ::GenerateInputRequestedRegion()
   {
     this->ComputeResampleTransformationModel();
-    
+
     Superclass::GenerateInputRequestedRegion();
   }
-  
-  template <class TInputImage, 
-	    			class TOutputImage, 
-	    			class TMapProjection, 
+
+  template <class TInputImage,
+	    			class TOutputImage,
+	    			class TMapProjection,
 	    			class TInterpolatorPrecision>
   void
-  OrthoRectificationFilter<TInputImage, 
-			   								 	 TOutputImage, 
-			   									 TMapProjection, 
+  OrthoRectificationFilter<TInputImage,
+			   								 	 TOutputImage,
+			   									 TMapProjection,
 			   									 TInterpolatorPrecision>
   ::ComputeResampleTransformationModel()
   {
@@ -102,23 +102,23 @@ namespace otb
       {
 				otbMsgDevMacro(<< "COMPUTE RESAMPLE TRANSFORMATION MODEL");
 				typename TOutputImage::Pointer output = this->GetOutput();
-	
+
 				// Get OSSIM sensor model from image keywordlist
 				m_SensorModel->SetImageGeometry(output->GetImageKeywordlist());
-				
+
 				// Initialize Map Projection if needed
 /*				PointType geoPoint;
 				geoPoint[1] = this->GetOutputOrigin()[1] + this->GetSize()[0]*this->GetOutputSpacing()[0]/2;
 				geoPoint[0] = this->GetOutputOrigin()[0] + this->GetSize()[1]*this->GetOutputSpacing()[1]/2;
 				m_MapProjection->Initialize(geoPoint);			*/
-			
+
 				m_CompositeTransform->SetFirstTransform(m_MapProjection);
 				m_CompositeTransform->SetSecondTransform(m_SensorModel);
-				this->SetTransform(m_CompositeTransform);		
+				this->SetTransform(m_CompositeTransform);
 				m_IsComputed = true;
       }
   }
-  
+
 } //namespace otb
 
 #endif
diff --git a/Code/Projections/otbPlaceNameToLonLat.h b/Code/Projections/otbPlaceNameToLonLat.h
index 188510b3bd..3e469ae6c0 100644
--- a/Code/Projections/otbPlaceNameToLonLat.h
+++ b/Code/Projections/otbPlaceNameToLonLat.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
diff --git a/Code/Projections/otbPlaceNameToLonLat.txx b/Code/Projections/otbPlaceNameToLonLat.txx
index 1a46c0eb3f..9e06bdb48e 100644
--- a/Code/Projections/otbPlaceNameToLonLat.txx
+++ b/Code/Projections/otbPlaceNameToLonLat.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -65,27 +65,27 @@ bool PlaceNameToLonLat::Evaluate()
   {
     std::ostringstream urlStream;
     urlStream << "http://maps.google.com/maps?q=";
-    urlStream << m_PlaceName; 
+    urlStream << m_PlaceName;
     urlStream << "&sll=38.9594,-95.2655&sspn=119.526,360&output=kml&ie=utf-8&v=2.2&cv=4.2.0180.1134&hl=en";
     RetrieveXML(urlStream);
     ParseXMLGoogle();
   }
-  
+
   if ((m_Lat == -1000.0) && (m_Lon == -1000.0))
   {
     std::ostringstream urlStream;
     urlStream << "http://maps.google.fr/maps?q=";
-    urlStream << m_PlaceName; 
+    urlStream << m_PlaceName;
     urlStream << "&sll=38.9594,-95.2655&sspn=119.526,360&output=kml&ie=utf-8&v=2.2&cv=4.2.0180.1134&hl=en";
     RetrieveXML(urlStream);
     ParseXMLGoogle();
   }
-  
+
   if ((m_Lat == -1000.0) && (m_Lon == -1000.0))
   {
     std::ostringstream urlStream;
     urlStream << "http://api.local.yahoo.com/MapsService/V1/geocode?appid=com.sun.blueprints.ui.geocoder&location=";
-    urlStream << m_PlaceName; 
+    urlStream << m_PlaceName;
     RetrieveXML(urlStream);
     ParseXMLYahoo();
   }
@@ -117,7 +117,7 @@ curlHandlerWriteMemoryCallback(void *ptr, size_t size, size_t nmemb,
 
 void PlaceNameToLonLat::RetrieveXML(std::ostringstream& urlStream)
 {
-  
+
   CURL *curl;
   CURLcode res;
 
@@ -146,7 +146,7 @@ void PlaceNameToLonLat::RetrieveXML(std::ostringstream& urlStream)
     /* always cleanup */
     curl_easy_cleanup(curl);
   }
-  
+
 }
 
 
@@ -155,7 +155,7 @@ void PlaceNameToLonLat::ParseXMLYahoo()
   TiXmlDocument doc( "out.xml" );
   doc.LoadFile();
   TiXmlHandle docHandle( &doc );
-  
+
   TiXmlElement* childLat = docHandle.FirstChild( "ResultSet" ).FirstChild( "Result" ).FirstChild( "Latitude" ).Element();
   if ( childLat )
   {
@@ -166,7 +166,7 @@ void PlaceNameToLonLat::ParseXMLYahoo()
   {
     m_Lon=atof(childLon->GetText());
   }
-  
+
 }
 
 void PlaceNameToLonLat::ParseXMLGoogle()
@@ -174,7 +174,7 @@ void PlaceNameToLonLat::ParseXMLGoogle()
   TiXmlDocument doc( "out.xml" );
   doc.LoadFile();
   TiXmlHandle docHandle( &doc );
-  
+
   TiXmlElement* childLat = docHandle.FirstChild( "kml" ).FirstChild( "Placemark" ).FirstChild( "LookAt" ).FirstChild( "latitude" ).Element();
   if ( childLat )
   {
@@ -185,7 +185,7 @@ void PlaceNameToLonLat::ParseXMLGoogle()
   {
     m_Lon=atof(childLon->GetText());
   }
-  
+
 }
 
 } // namespace otb
diff --git a/Code/Projections/otbPrepareSRTMDirectory.h b/Code/Projections/otbPrepareSRTMDirectory.h
index da8b8b1192..60f0a610a1 100644
--- a/Code/Projections/otbPrepareSRTMDirectory.h
+++ b/Code/Projections/otbPrepareSRTMDirectory.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,12 +30,12 @@ namespace otb
    * \brief Prepare SRTM directory for Ossim from a full archive
    *
    *  As ossim has some issue with directories containing too many SRTM tiles
-   * (>5000) this class enable to copy only the required tiles from 
+   * (>5000) this class enable to copy only the required tiles from
    * FullDEMDirectoryPath containing all the SRTM tiles to DEMDirectoryPath
    * that will be passed as the argument of the SetDEMDirectoryPath() of
    * the otb::DEMToImageGenerator for example
- * 
- * 
+ *
+ *
  */
 
 
diff --git a/Code/Projections/otbPrepareSRTMDirectory.txx b/Code/Projections/otbPrepareSRTMDirectory.txx
index c8483122ab..1a49d01143 100644
--- a/Code/Projections/otbPrepareSRTMDirectory.txx
+++ b/Code/Projections/otbPrepareSRTMDirectory.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -58,17 +58,17 @@ namespace otb
 
   bool PrepareSRTMDirectory::Evaluate()
   {
-    
+
     int startX = static_cast<int>(floor(m_ULLon));
     int endX = static_cast<int>(ceil(m_LRLon));
     int startY = static_cast<int>(floor(m_LRLat));
     int endY = static_cast<int>(ceil(m_ULLat));
-    
+
     std::cout << startX << std::endl;
     std::cout << endX << std::endl;
     std::cout << startY << std::endl;
     std::cout << endY << std::endl;
-    
+
     for (int j=startY; j<endY; j++)
     {
       for (int i=startX; i< endX; i++)
@@ -76,11 +76,11 @@ namespace otb
         std::ostringstream inputfilename;
         inputfilename << m_FullDEMDirectoryPath;
         inputfilename << "/";
-        
+
         std::ostringstream outputfilename;
         outputfilename << m_DEMDirectoryPath;
         outputfilename << "/";
-        
+
         if (j >= 0)
         {
           inputfilename << "N";
@@ -88,7 +88,7 @@ namespace otb
           outputfilename << "N";
           outputfilename << setfill('0') << setw(2) << j;
         }
-        else 
+        else
         {
           inputfilename << "S";
           inputfilename << setfill('0') << setw(2) << -j;
@@ -102,28 +102,28 @@ namespace otb
           outputfilename << "E";
           outputfilename << setfill('0') << setw(3) << i;
         }
-        else 
+        else
         {
           inputfilename << "W";
           inputfilename << setfill('0') << setw(3) << -i;
           outputfilename << "W";
           outputfilename << setfill('0') << setw(3) << -i;
         }
-        
+
         inputfilename << ".hgt";
         outputfilename << ".hgt";
-        
+
         std::cout << "Copying " << inputfilename.str() << " to " << outputfilename.str() << std::endl;
-            
+
         //copy input file to output file
         ossimFilename inputFile(inputfilename.str().c_str());
         ossimFilename outputFile(outputfilename.str().c_str());
         inputFile.copyFileTo(outputFile);
-        
-        
+
+
       }
     }
-    
+
     return true;
   }
 
diff --git a/Code/Projections/otbSVY21MapProjection.h b/Code/Projections/otbSVY21MapProjection.h
index 95325ec18a..fc8dd03ead 100644
--- a/Code/Projections/otbSVY21MapProjection.h
+++ b/Code/Projections/otbSVY21MapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -31,7 +31,7 @@ namespace otb
    *
     */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT SVY21MapProjection : public TransMercatorMapProjection<transform> 
+      class ITK_EXPORT SVY21MapProjection : public TransMercatorMapProjection<transform>
   {
     public :
       /** Standard class typedefs. */
@@ -39,27 +39,27 @@ namespace otb
       typedef TransMercatorMapProjection<transform>   Superclass;
       typedef itk::SmartPointer<Self>                    	    Pointer;
       typedef itk::SmartPointer<const Self>              	    ConstPointer;
-      
+
       typedef typename Superclass::ScalarType                 ScalarType;
       typedef itk::Point<ScalarType,2 >   	                  InputPointType;
       typedef itk::Point<ScalarType,2 >              	        OutputPointType;
-      
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( SVY21MapProjection, MapProjection );
 
-        
+
     protected:
-      SVY21MapProjection(); 
+      SVY21MapProjection();
       virtual ~SVY21MapProjection();
-	
+
     private :
       SVY21MapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);                       //purposely not implemented
   };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbSVY21MapProjection.txx b/Code/Projections/otbSVY21MapProjection.txx
index 36c8ed850b..8be81dfd06 100644
--- a/Code/Projections/otbSVY21MapProjection.txx
+++ b/Code/Projections/otbSVY21MapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,8 +22,8 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbSVY21MapProjection.h"
 
 namespace otb
-{ 
-  
+{
+
   template <InverseOrForwardTransformationEnum transform>
       SVY21MapProjection<transform>
   ::SVY21MapProjection()
@@ -32,28 +32,28 @@ namespace otb
     origin[0]=103.83333333333333;
     origin[1]=1.3666666666666667;
     std::string datum = "WE"; //WGS84 datum
-  
-  
+
+
     double falseEasting=28001.642;
     double falseNorthing=38744.572;
     double scaleFactor=1.00000;
     std::string ellipsoid = "WE"; //GRS-80 ellipsoid
-  
-    
+
+
     //TODO: 29-02-2008 Emmanuel: when ossim version > 1.7.2 only
     // SetOrigin required (remove SetEllipsoid)
-    this->SetOrigin(origin, datum);  
+    this->SetOrigin(origin, datum);
     this->SetEllipsoid(ellipsoid);
     this->SetParameters(falseEasting, falseNorthing, scaleFactor);
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       SVY21MapProjection<transform>
   ::~SVY21MapProjection()
   {
   }
-  
- 
+
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbSensorModelBase.h b/Code/Projections/otbSensorModelBase.h
index b8d463611a..c5f7796c1a 100644
--- a/Code/Projections/otbSensorModelBase.h
+++ b/Code/Projections/otbSensorModelBase.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -41,9 +41,9 @@ namespace otb
   unsigned int NInputDimensions=3,
   unsigned int NOutputDimensions=2,
   unsigned int NParametersDimensions=3>
-      class ITK_EXPORT SensorModelBase : public itk::Transform<TScalarType,          
-      NInputDimensions,  
-      NOutputDimensions> 
+      class ITK_EXPORT SensorModelBase : public itk::Transform<TScalarType,
+      NInputDimensions,
+      NOutputDimensions>
       {
 
         public :
@@ -55,83 +55,83 @@ namespace otb
           NOutputDimensions >         Superclass;
           typedef itk::SmartPointer<Self>                     Pointer;
           typedef itk::SmartPointer<const Self>               ConstPointer;
-      
+
           typedef itk::Point<TScalarType, NInputDimensions >  InputPointType;
-          typedef itk::Point<TScalarType, NOutputDimensions > OutputPointType;      
-      
+          typedef itk::Point<TScalarType, NOutputDimensions > OutputPointType;
+
           typedef DEMHandler				 DEMHandlerType;
-          typedef typename DEMHandlerType::Pointer		 DEMHandlerPointerType;     
-			
+          typedef typename DEMHandlerType::Pointer		 DEMHandlerPointerType;
+
           /** Method for creation through the object factory. */
           itkNewMacro( Self );
-      
+
           /** Run-time type information (and related methods). */
           itkTypeMacro( SensorModelBase, Transform );
-      
+
           itkStaticConstMacro(InputSpaceDimension,  unsigned int, NInputDimensions);
           itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
           itkStaticConstMacro(ParametersDimension,  unsigned int, NParametersDimensions); //A voir!!
-      
+
           /* Get the ImageKeywordlist */
           ImageKeywordlist GetImageGeometryKeywordlist(void) const;
           /* Get an ossimKeywordlist */
           ossimKeywordlist GetOssimKeywordlist(void);
           /* Get an ossimModel */
           ossimProjection* GetOssimModel(void);
-      
+
           /* Set the Imagekeywordlist and affect the ossim projection ( m_Model) */
           virtual void SetImageGeometry(const ImageKeywordlist image_kwl);
-      
+
           /* Set the Imagekeywordlist and affect the ossim projection ( m_Model) */
           virtual void SetImageGeometry(const ossimKeywordlist &geom_kwl);
-      
-     
+
+
 //      itkGetObjectMacro(DEMHandler, DEMHandlerType);
-      
-/*      virtual void SetDEMHandler(DEMHandlerType* _arg) 
-          { 
-          if (this->m_DEMHandler != _arg) 
-          { 
-          this->m_DEMHandler = _arg; 
-          this->Modified(); 
+
+/*      virtual void SetDEMHandler(DEMHandlerType* _arg)
+          {
+          if (this->m_DEMHandler != _arg)
+          {
+          this->m_DEMHandler = _arg;
+          this->Modified();
           this->UseDEM(true);
-      } 
+      }
       }*/
-      
+
           /** Set/Get the average elevation if the DEM is not used*/
           itkSetMacro(AverageElevation, TScalarType);
           itkGetMacro(AverageElevation, TScalarType);
-          
+
           virtual void SetDEMDirectory(const std::string& directory)
           {
             m_DEMHandler->OpenDEMDirectory(directory.c_str());
             m_DEMIsLoaded=true;
-            this->EnableDEM();	
+            this->EnableDEM();
           }
-			
+
           virtual void DisableDEM()
           {
-            m_UseDEM = false; 
+            m_UseDEM = false;
             this->Modified();
           }
-      
-          virtual void EnableDEM() 
-          { 
-            if (m_DEMIsLoaded) 
-              m_UseDEM = true; 
+
+          virtual void EnableDEM()
+          {
+            if (m_DEMIsLoaded)
+              m_UseDEM = true;
             this->Modified();
-          } 
+          }
 
         protected:
-          SensorModelBase(); 
+          SensorModelBase();
           virtual ~SensorModelBase();
-      
+
           /** Create the projection ( m_Model). Called by the SetImageGeometry methods */
           void CreateProjection(const ImageKeywordlist & image_kwl);
-      
+
           /** PrintSelf method */
           void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
           /** ImageKeywordlist */
           ImageKeywordlist m_ImageKeywordlist;
           /** Pointer on an ossim projection (created with the keywordlist) */
@@ -139,22 +139,22 @@ namespace otb
 
           /** Specify if DEM is used in Point Transformation */
           bool m_UseDEM ;
-			
+
           /** Object that read and use DEM */
           DEMHandlerPointerType m_DEMHandler;
-          
+
           /** Specify an average elevation to use */
           TScalarType m_AverageElevation;
-			
+
         private :
           SensorModelBase(const Self&); //purposely not implemented
           void operator=(const Self&); //purposely not implemented
-			
+
           /** Specify if DEM is loaded */
           bool m_DEMIsLoaded ;
-          
 
-     
+
+
       };
 
 } // namespace otb
diff --git a/Code/Projections/otbSensorModelBase.txx b/Code/Projections/otbSensorModelBase.txx
index 76e478f66a..150ce5c3dc 100644
--- a/Code/Projections/otbSensorModelBase.txx
+++ b/Code/Projections/otbSensorModelBase.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,8 +30,8 @@ PURPOSE.  See the above copyright notices for more information.
 #include "imaging/ossimImageHandler.h"
 
 namespace otb
-{ 
-  
+{
+
   template < class TScalarType,
   unsigned int NInputDimensions,
   unsigned int NOutputDimensions,
@@ -44,10 +44,10 @@ namespace otb
     m_UseDEM = false;
     m_DEMIsLoaded = false;
     m_AverageElevation = -10000;
-		
+
   }
-  
-  
+
+
   template < class TScalarType,
   unsigned int NInputDimensions,
   unsigned int NOutputDimensions,
@@ -61,8 +61,8 @@ namespace otb
       m_Model = NULL;
     }
   }
-  
-  
+
+
   /// Get the Geometry Keyword list
   template < class TScalarType,
   unsigned int NInputDimensions,
@@ -74,7 +74,7 @@ namespace otb
   {
     return m_ImageKeywordlist;
   }
-  
+
   /// Get the Geometry Keyword list
   template < class TScalarType,
   unsigned int NInputDimensions,
@@ -86,7 +86,7 @@ namespace otb
   {
     ossimKeywordlist geom;
     m_ImageKeywordlist.convertToOSSIMKeywordlist(geom);
-    
+
     return geom;
   }
 
@@ -99,10 +99,10 @@ namespace otb
       SensorModelBase< TScalarType,NInputDimensions,NOutputDimensions,NParametersDimensions>
   ::GetOssimModel(void)
   {
-    
+
     return m_Model;
   }
-  
+
   /** Set the Imagekeywordlist and affect the ossim projection ( m_Model) */
   template < class TScalarType,
   unsigned int NInputDimensions,
@@ -115,7 +115,7 @@ namespace otb
     m_ImageKeywordlist = image_kwl;
     CreateProjection(m_ImageKeywordlist);
   }
-  
+
   /** Set the Imagekeywordlist and affect the ossim projection ( m_Model) */
   template < class TScalarType,
   unsigned int NInputDimensions,
@@ -129,8 +129,8 @@ namespace otb
     m_ImageKeywordlist.SetKeywordlist(geom_kwl);
     CreateProjection(m_ImageKeywordlist);
   }
-  
-  
+
+
   /** Instatiate the sensor model from metadata. */
   template < class TScalarType,
   unsigned int NInputDimensions,
@@ -141,7 +141,7 @@ namespace otb
   ::CreateProjection(const ImageKeywordlist & image_kwl)
   {
     ossimKeywordlist geom;
-    
+
     otbMsgDevMacro(<<"CreateProjection(): ossimKeywordlist: "<<geom);
     image_kwl.convertToOSSIMKeywordlist(geom);
     m_Model = ossimProjectionFactoryRegistry::instance()->createProjection(geom);
@@ -150,7 +150,7 @@ namespace otb
       itkExceptionMacro(<<"Invalid Model pointer m_Model == NULL !\n The ossim keywordlist is bad!");
     }
   }
-  
+
   /**
    * PrintSelf method
    */
@@ -166,7 +166,7 @@ namespace otb
     os << indent << "Model: " << m_Model << std::endl;
     os << indent << "Keywordlist: " << m_ImageKeywordlist << std::endl;
   }
-  
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbSinusoidalMapProjection.h b/Code/Projections/otbSinusoidalMapProjection.h
index f313723f2f..a9ef7094cc 100644
--- a/Code/Projections/otbSinusoidalMapProjection.h
+++ b/Code/Projections/otbSinusoidalMapProjection.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,44 +27,44 @@ namespace otb
 
   /** \class SinusoidalMapProjection
    *  \brief This class implements the Sinusoidal map projection.
-   *  It converts coordinates in longitude,latitude (WGS84) to Sinusoidal map coordinates. 
+   *  It converts coordinates in longitude,latitude (WGS84) to Sinusoidal map coordinates.
    */
-  template <InverseOrForwardTransformationEnum transform> 
-      class ITK_EXPORT SinusoidalMapProjection : public	MapProjection<ossimSinusoidalProjection, transform> 
+  template <InverseOrForwardTransformationEnum transform>
+      class ITK_EXPORT SinusoidalMapProjection : public	MapProjection<ossimSinusoidalProjection, transform>
   {
     public :
-	
+
       /** Standard class typedefs. */
       typedef SinusoidalMapProjection                      Self;
       typedef MapProjection<ossimSinusoidalProjection, transform>  Superclass;
       typedef itk::SmartPointer<Self>                        Pointer;
       typedef itk::SmartPointer<const Self>                  ConstPointer;
-      
+
       typedef typename Superclass::ScalarType  			     ScalarType;
       typedef itk::Point<ScalarType,2>   	      	     InputPointType;
-      typedef itk::Point<ScalarType,2>  	      	     OutputPointType;     
+      typedef itk::Point<ScalarType,2>  	      	     OutputPointType;
 
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( SinusoidalMapProjection, MapProjection );
-      
+
       virtual void SetFalseEasting(double falseEasting);
       virtual void SetFalseNorthing(double falseNorthing);
       virtual double GetFalseNorthing() const;
       virtual double GetFalseEasting() const;
       virtual void SetParameters(double falseEasting,double falseNorthing);
       virtual void SetDefaults();
-      
+
     protected:
-      SinusoidalMapProjection(); 
+      SinusoidalMapProjection();
       virtual ~SinusoidalMapProjection();
-      
+
     private :
       SinusoidalMapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);            //purposely not implemented
-      
+
   };
 
 } // namespace otb
diff --git a/Code/Projections/otbSinusoidalMapProjection.txx b/Code/Projections/otbSinusoidalMapProjection.txx
index 2c413f824b..90522c3c08 100644
--- a/Code/Projections/otbSinusoidalMapProjection.txx
+++ b/Code/Projections/otbSinusoidalMapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,71 +23,71 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
-  template <InverseOrForwardTransformationEnum transform> 
-      SinusoidalMapProjection<transform> 
+
+  template <InverseOrForwardTransformationEnum transform>
+      SinusoidalMapProjection<transform>
   ::SinusoidalMapProjection()
   {
   }
-  
-  
-  template <InverseOrForwardTransformationEnum transform> 
+
+
+  template <InverseOrForwardTransformationEnum transform>
       SinusoidalMapProjection<transform>
   ::~SinusoidalMapProjection()
   {
   }
-  
+
   ///Set the false Easting
-  template <InverseOrForwardTransformationEnum transform> 
+  template <InverseOrForwardTransformationEnum transform>
       void SinusoidalMapProjection<transform>
-  ::SetFalseEasting(double falseEasting) 
+  ::SetFalseEasting(double falseEasting)
   {
     this->m_MapProjection->setFalseEasting(falseEasting);
   }
-  
+
   ///Set the False Northing
-  template <InverseOrForwardTransformationEnum transform> 
+  template <InverseOrForwardTransformationEnum transform>
       void SinusoidalMapProjection<transform>
-  ::SetFalseNorthing(double falseNorthing) 
+  ::SetFalseNorthing(double falseNorthing)
   {
     this->m_MapProjection->setFalseNorthing(falseNorthing);
   }
-  
+
   ///Set the default parameter
-  template <InverseOrForwardTransformationEnum transform> 
+  template <InverseOrForwardTransformationEnum transform>
       void SinusoidalMapProjection<transform>
-  ::SetDefaults() 
+  ::SetDefaults()
   {
     this->m_MapProjection->setDefaults();
   }
-  
+
   ///\return the False Northing (avoid negative coordinates)
-  template <InverseOrForwardTransformationEnum transform> 
+  template <InverseOrForwardTransformationEnum transform>
       double SinusoidalMapProjection<transform>
   ::GetFalseNorthing() const
   {
     double falseNorthing=this->m_MapProjection->getFalseNorthing();
-    
+
     return falseNorthing;
   }
-  
+
   ///\return the False Easting (avoid negative coordinates)
-  template <InverseOrForwardTransformationEnum transform> 
+  template <InverseOrForwardTransformationEnum transform>
       double SinusoidalMapProjection<transform>
   ::GetFalseEasting() const
   {
     double falseEasting=this->m_MapProjection->getFalseEasting();
-    
+
     return falseEasting;
   }
-  
-  template <InverseOrForwardTransformationEnum transform> 
+
+  template <InverseOrForwardTransformationEnum transform>
       void SinusoidalMapProjection<transform>
   ::SetParameters(double falseEasting,double falseNorthing)
   {
     this->m_MapProjection->setFalseEastingNorthing(falseEasting,falseNorthing);
   }
-  
-  
+
+
 }
 #endif
diff --git a/Code/Projections/otbTileMapTransform.h b/Code/Projections/otbTileMapTransform.h
index 6c3ef599c1..d7a465ecb3 100644
--- a/Code/Projections/otbTileMapTransform.h
+++ b/Code/Projections/otbTileMapTransform.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -21,7 +21,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include <iostream>
 #include <sstream>
 #include <stdio.h>
-// #include "projection/ossimTileMapTransform.h" 
+// #include "projection/ossimTileMapTransform.h"
 #include "itkTransform.h"
 #include "itkExceptionObject.h"
 #include "itkMacro.h"
@@ -36,17 +36,17 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   /** \class TileMapTransform
    *  \brief to do
    **/
-  
-  
+
+
   template <InverseOrForwardTransformationEnum transform,
   class TScalarType = double,
   unsigned int NInputDimensions=2,
   unsigned int NOutputDimensions=2>
-      class ITK_EXPORT TileMapTransform: public itk::Transform<TScalarType,       // Data type for scalars 
+      class ITK_EXPORT TileMapTransform: public itk::Transform<TScalarType,       // Data type for scalars
       NInputDimensions,  // Number of dimensions in the input space
       NOutputDimensions> // Number of dimensions in the output space
       {
@@ -58,33 +58,33 @@ namespace otb
           typedef TileMapTransform                    	        Self;
           typedef itk::SmartPointer<Self>                   Pointer;
           typedef itk::SmartPointer<const Self>             ConstPointer;
-      
+
           typedef typename Superclass::ScalarType 	        ScalarType;
           typedef ossimTileMapModel	OssimTileMapTransformType;
           typedef itk::Point<ScalarType,NInputDimensions >  InputPointType;
-          typedef itk::Point<ScalarType,NOutputDimensions > OutputPointType;        
-      
+          typedef itk::Point<ScalarType,NOutputDimensions > OutputPointType;
+
           /** Method for creation through the object factory. */
           itkNewMacro( Self );
-      
+
           /** Run-time type information (and related methods). */
           itkTypeMacro( TileMapTransform, Transform );
-      
+
           typedef InverseOrForwardTransformationEnum DirectionOfMappingEnumType;
-      
+
           itkStaticConstMacro(DirectionOfMapping,DirectionOfMappingEnumType,transform);
           itkStaticConstMacro(InputSpaceDimension, unsigned int, NInputDimensions);
           itkStaticConstMacro(OutputSpaceDimension, unsigned int, NOutputDimensions);
           itkStaticConstMacro(SpaceDimension, unsigned int, NInputDimensions);
           itkStaticConstMacro(ParametersDimension, unsigned int,NInputDimensions*(NInputDimensions+1));
-      
+
           void SetLevel(unsigned char level);
-      
+
 //           virtual void SetEllipsoid ();
 //           void SetEllipsoid (const ossimEllipsoid &ellipsoid);
 //           void SetEllipsoid(std::string code);
 //           void SetEllipsoid(const double &major_axis, const double &minor_axis);
- 
+
           OutputPointType TransformPoint(const InputPointType &point) const;
           virtual InputPointType Origin();
 //           virtual double GetFalseNorthing() const;
@@ -92,7 +92,7 @@ namespace otb
 //           virtual double GetStandardParallel1() const;
 //           virtual double GetStandardParallel2() const;
 //           virtual std::string GetProjectionName() const;
-//           virtual bool IsGeographic() const; 
+//           virtual bool IsGeographic() const;
 //           virtual double GetA() const;
 //           virtual double GetB() const;
 //           virtual double GetF() const;
@@ -107,19 +107,19 @@ namespace otb
 //           virtual void ComputeMetersPerPixel(double deltaDegreesPerPixelLat, double deltaDegreesPerPixelLon, OutputPointType &metersPerPixel);
 //       //virtual void SetMatrix(double rotation,  const OutputPointType &scale, const OutputPointType &translation);
 //           void SetFalseEasting(double falseEasting);
-			
+
           virtual void PrintMap() const ;
 
         protected:
           TileMapTransform();
           virtual ~TileMapTransform();
-          OssimTileMapTransformType* m_TileMapTransform;  
-      
+          OssimTileMapTransformType* m_TileMapTransform;
+
         private :
           TileMapTransform(const Self&); //purposely not implemented
           void operator=(const Self&); //purposely not implemented
       };
-  
+
 } // namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Projections/otbTileMapTransform.txx b/Code/Projections/otbTileMapTransform.txx
index e271de4674..47cc34e432 100644
--- a/Code/Projections/otbTileMapTransform.txx
+++ b/Code/Projections/otbTileMapTransform.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,46 +23,46 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
       TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::TileMapTransform() : Superclass(SpaceDimension,ParametersDimension)
   {
     m_TileMapTransform =  new OssimTileMapTransformType();
   }
-  
-  
+
+
   template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
       TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::~TileMapTransform()
   {
     delete m_TileMapTransform;
   }
-  
-  
-  
+
+
+
   template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
       typename TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
           TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::TransformPoint(const InputPointType & point) const
   {
     OutputPointType outputPoint;
-    
+
     switch(DirectionOfMapping)
     {
       case INVERSE:
       {
         otbMsgDevMacro(<< "Cartographic coordinates: (" << point[0] << "," << point[1] << ")");
-	  
-	  //from "itk::point" to "ossim::ossimDpt" 
+
+	  //from "itk::point" to "ossim::ossimDpt"
         ossimDpt ossimDPoint(point[0], point[1]);
-	  
+
 	  //map projection
         ossimGpt ossimGPoint;
 //         ossimGPoint=m_TileMapTransform->inverse(ossimDPoint);
         m_TileMapTransform->lineSampleToWorld(ossimDPoint, ossimGPoint);
 //	 	otbGenericMsgDebugMacro(<< "Inverse : " << std::endl << m_TileMapTransform->print(std::cout));
-		
+
         outputPoint[0]=ossimGPoint.lon;
         outputPoint[1]=ossimGPoint.lat;
         otbMsgDevMacro(<< "Geographic coordinates (long/lat) : (" << outputPoint[0] << "," << outputPoint[1] << ")");
@@ -73,7 +73,7 @@ namespace otb
         otbMsgDevMacro(<< "Geographic coordinates (long/lat) : (" << point[1] << "," << point[0] << ")");
 		//from "itk::point" to "ossim::ossimGpt"
         ossimGpt ossimGPoint(point[1], point[0]);
-	  
+
 	  //map projection
         ossimDpt ossimDPoint;
 //         ossimDPoint=m_TileMapTransform->forward(ossimGPoint);
@@ -81,7 +81,7 @@ namespace otb
 //	 	otbGenericMsgDebugMacro(<< "Forward : ========================= " << std::endl << m_TileMapTransform->print(std::cout));
         outputPoint[0]=ossimDPoint.x;
         outputPoint[1]=ossimDPoint.y;
-		
+
         otbMsgDevMacro(<< "Cartographic coordinates: (" << outputPoint[0] << "," << outputPoint[1] << ")");
 
         break;
@@ -90,17 +90,17 @@ namespace otb
       {
         itkExceptionMacro(<<"Model is INVERSE or FORWARD only !!");
         break;
-      }	
+      }
     }
-    
+
     return outputPoint;
   }
-  
-  
-  
+
+
+
   ///\return The geographic point corresponding to (0,0)
-  template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-      typename TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>::InputPointType 
+  template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+      typename TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>::InputPointType
           TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::Origin()
   {
@@ -108,16 +108,16 @@ namespace otb
     InputPointType otbOrigin;
     otbOrigin[0]= ossimOrigin.lat;
     otbOrigin[1]= ossimOrigin.lon;
-    
+
     return otbOrigin;
   }
-  
 
 
-  
-	
-  template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions> 
-      void 
+
+
+
+  template<InverseOrForwardTransformationEnum Transform, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
+      void
           TileMapTransform<Transform, TScalarType, NInputDimensions, NOutputDimensions>
   ::PrintMap() const
   {
@@ -130,7 +130,7 @@ namespace otb
   {
     m_TileMapTransform->setDepth(level);
   }
-	
+
 } // namespace otb
 
 #endif
diff --git a/Code/Projections/otbTransMercatorMapProjection.h b/Code/Projections/otbTransMercatorMapProjection.h
index 593d1d038b..20049aed74 100644
--- a/Code/Projections/otbTransMercatorMapProjection.h
+++ b/Code/Projections/otbTransMercatorMapProjection.h
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,23 +30,23 @@ namespace otb
    *
    */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT TransMercatorMapProjection : public MapProjection<ossimTransMercatorProjection,transform> 
+      class ITK_EXPORT TransMercatorMapProjection : public MapProjection<ossimTransMercatorProjection,transform>
   {
     public :
-	
+
       /** Standard class typedefs. */
       typedef TransMercatorMapProjection                 Self;
       typedef MapProjection<ossimTransMercatorProjection, transform>  Superclass;
       typedef itk::SmartPointer<Self>                      Pointer;
       typedef itk::SmartPointer<const Self>                ConstPointer;
-      
+
       typedef typename Superclass::ScalarType  			   ScalarType;
       typedef itk::Point<ScalarType,2>   	      	   InputPointType;
-      typedef itk::Point<ScalarType,2>  	      	   OutputPointType;     
-      
+      typedef itk::Point<ScalarType,2>  	      	   OutputPointType;
+
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( TransMercatorMapProjection, MapProjection );
       virtual void SetFalseEasting(double falseEasting);
@@ -57,15 +57,15 @@ namespace otb
       virtual double GetFalseNorthing() const;
       virtual double GetFalseEasting() const;
       virtual double GetScaleFactor() const;
-      
+
     protected:
-      TransMercatorMapProjection(); 
+      TransMercatorMapProjection();
       virtual ~TransMercatorMapProjection();
-	
+
     private :
       TransMercatorMapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);               //purposely not implemented
- 	
+
   };
 
 
diff --git a/Code/Projections/otbTransMercatorMapProjection.txx b/Code/Projections/otbTransMercatorMapProjection.txx
index cd9785c895..816bf7a0e7 100644
--- a/Code/Projections/otbTransMercatorMapProjection.txx
+++ b/Code/Projections/otbTransMercatorMapProjection.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-  
+
 Program:   ORFEO Toolbox
 Language:  C++
 Date:      $Date$
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  
+
   template <InverseOrForwardTransformationEnum transform>
       TransMercatorMapProjection<transform>
   ::TransMercatorMapProjection()
@@ -32,55 +32,55 @@ namespace otb
     this->m_MapProjection->setEllipsoid(ellipsoid);
     this->m_MapProjection->setOrigin(origin);
   }
-  
+
   /// Desctructor
   template <InverseOrForwardTransformationEnum transform>
       TransMercatorMapProjection<transform>
   ::~TransMercatorMapProjection()
   {
   }
-  
-  
+
+
   ///Set the false Easting
   template <InverseOrForwardTransformationEnum transform>
       void TransMercatorMapProjection<transform>
-  ::SetFalseEasting(double falseEasting) 
+  ::SetFalseEasting(double falseEasting)
   {
     this->m_MapProjection->setFalseEasting(falseEasting);
   }
-  
+
   ///Set the False Northing
   template <InverseOrForwardTransformationEnum transform>
       void TransMercatorMapProjection<transform>
-  ::SetFalseNorthing(double falseNorthing) 
+  ::SetFalseNorthing(double falseNorthing)
   {
     this->m_MapProjection->setFalseNorthing(falseNorthing);
   }
-  
+
   ///Set the scale factor
   template <InverseOrForwardTransformationEnum transform>
       void TransMercatorMapProjection<transform>
-  ::SetScaleFactor(double scaleFactor) 
+  ::SetScaleFactor(double scaleFactor)
   {
     this->m_MapProjection->setScaleFactor(scaleFactor);
   }
-  
+
   ///Set the parameters
   template <InverseOrForwardTransformationEnum transform>
       void TransMercatorMapProjection<transform>
-  ::SetParameters(double falseEasting,double falseNorthing,double scaleFactor) 
+  ::SetParameters(double falseEasting,double falseNorthing,double scaleFactor)
   {
     this->m_MapProjection->setParameters(falseEasting, falseNorthing, scaleFactor);
   }
-  
+
   ///Set the default parameters
   template <InverseOrForwardTransformationEnum transform>
       void TransMercatorMapProjection<transform>
-  ::SetDefaults() 
+  ::SetDefaults()
   {
     this->m_MapProjection->setDefaults();
   }
-  
+
   ///\return the scale factor
   template <InverseOrForwardTransformationEnum transform>
       double TransMercatorMapProjection<transform>
@@ -88,29 +88,29 @@ namespace otb
   {
     double scaleFactor;
     scaleFactor=this->m_MapProjection->getScaleFactor();
-    
+
     return scaleFactor;
   }
-  
+
   ///\return the false northing (avoid negative coordinates)
   template <InverseOrForwardTransformationEnum transform>
       double TransMercatorMapProjection<transform>
   ::GetFalseNorthing() const
   {
     double falseNorthing=this->m_MapProjection->getFalseNorthing();
-    
+
     return falseNorthing;
   }
-  
+
   ///\return the false easting (avoid negative coordinates)
   template <InverseOrForwardTransformationEnum transform>
       double TransMercatorMapProjection<transform>
   ::GetFalseEasting() const
   {
     double falseEasting=this->m_MapProjection->getFalseEasting();
-    
+
     return falseEasting;
   }
-  
+
 }
 #endif
diff --git a/Code/Projections/otbUtmMapProjection.h b/Code/Projections/otbUtmMapProjection.h
index d85354bdf8..654edea6a6 100644
--- a/Code/Projections/otbUtmMapProjection.h
+++ b/Code/Projections/otbUtmMapProjection.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,34 +23,34 @@ PURPOSE.  See the above copyright notices for more information.
 #include "otbMapProjection.h"
 
 namespace otb
-{ 
+{
   /** \class UtmMapProjection
    *  \brief This class implements the UTM map projection.
    * It converts coordinates in longitude,latitude (WGS84) to UTM map coordinates.
    */
   template <InverseOrForwardTransformationEnum transform>
-      class ITK_EXPORT UtmMapProjection : public MapProjection<ossimUtmProjection,transform> 
+      class ITK_EXPORT UtmMapProjection : public MapProjection<ossimUtmProjection,transform>
   {
     public :
-	
+
       /** Standard class typedefs. */
       typedef UtmMapProjection                Self;
       typedef MapProjection<ossimUtmProjection,transform> Superclass;
       typedef itk::SmartPointer<Self>           Pointer;
       typedef itk::SmartPointer<const Self>     ConstPointer;
-      
+
       typedef typename Superclass::ScalarType 		ScalarType;
       typedef itk::Point<ScalarType,2>   	InputPointType;
-      typedef itk::Point<ScalarType,2>  	OutputPointType;     
+      typedef itk::Point<ScalarType,2>  	OutputPointType;
 
       /** Method for creation through the object factory. */
       itkNewMacro( Self );
-      
+
       /** Run-time type information (and related methods). */
       itkTypeMacro( UtmMapProjection, MapProjection );
-      
+
       virtual void SetZone(long zone);
-      virtual void SetZone(const InputPointType &ground); 
+      virtual void SetZone(const InputPointType &ground);
       virtual void SetHemisphere(char hemisphere);
       virtual long GetZone();
       virtual const char GetHemisphere() const;
@@ -60,12 +60,12 @@ namespace otb
       virtual int GetZoneFromGeoPoint(const InputPointType& geoPoint);
 
 //      virtual void Initialize(const InputPointType& middlePoint);
-			
+
     protected:
-      UtmMapProjection(); 
+      UtmMapProjection();
       virtual ~UtmMapProjection();
-			
-        
+
+
     private:
       UtmMapProjection(const Self&); //purposely not implemented
       void operator=(const Self&);   //purposely not implemented
diff --git a/Code/Projections/otbUtmMapProjection.txx b/Code/Projections/otbUtmMapProjection.txx
index c2c00fd546..1355501d56 100644
--- a/Code/Projections/otbUtmMapProjection.txx
+++ b/Code/Projections/otbUtmMapProjection.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -30,13 +30,13 @@ namespace otb
   ::UtmMapProjection()
   {
   }
-  
+
   template <InverseOrForwardTransformationEnum transform>
       UtmMapProjection<transform>
   ::~UtmMapProjection()
   {
   }
-  
+
   ///Set the zone
   template <InverseOrForwardTransformationEnum transform>
       void UtmMapProjection<transform>
@@ -45,11 +45,11 @@ namespace otb
     this->m_MapProjection->setZone(zone);
     this->Modified();
   }
-  
+
   ///Set the zone
   template <InverseOrForwardTransformationEnum transform>
       void UtmMapProjection<transform>
-  ::SetZone(const InputPointType &ground) 
+  ::SetZone(const InputPointType &ground)
   {
     ossimGpt ossimGround;
     ossimGround.lon=ground[0];
@@ -57,16 +57,16 @@ namespace otb
     this->m_MapProjection->setZone(ossimGround);
     this->Modified();
   }
-  
+
   ///Set the hemisphere
   template <InverseOrForwardTransformationEnum transform>
       void UtmMapProjection<transform>
-  ::SetHemisphere(char hemisphere) 
+  ::SetHemisphere(char hemisphere)
   {
     this->m_MapProjection->setHemisphere(hemisphere);
     this->Modified();
   }
-	
+
   template <InverseOrForwardTransformationEnum transform>
       void UtmMapProjection<transform>
   ::SetZoneAndHemisphereFromGeoPoint(const InputPointType &geoPoint)
@@ -74,7 +74,7 @@ namespace otb
     double latitude = geoPoint[1];
     char hemisphere;
     int zone ;
-		
+
     if (latitude > 0.)
       hemisphere = 'N';
     else
@@ -84,19 +84,19 @@ namespace otb
     zone = this->GetZoneFromGeoPoint(geoPoint);
     this->SetZone(zone);
   }
-	
+
 	/*template <InverseOrForwardTransformationEnum transform>
   void UtmMapProjection<transform>
   ::SetZoneAndHemisphereFromCartoPoint(const OutputPointType &cartoPoint)
   {
   InputPointType geoPoint;
-		
+
 		// TODO : Tester que la projection est bien inverse !!!
   geoPoint = this->TransformPoint(cartoPoint);
   this->SetZoneAndHemisphereFromGeoPoint(geoPoint);
 }	*/
-	
-  
+
+
   ///\return the zone
   template <InverseOrForwardTransformationEnum transform>
       long UtmMapProjection<transform>
@@ -104,10 +104,10 @@ namespace otb
   {
     long zone;
     zone=this->m_MapProjection->getZone();
-    
+
     return zone;
   }
-  
+
   ///\return the hemisphere
   template <InverseOrForwardTransformationEnum transform>
       const char UtmMapProjection<transform>
@@ -115,10 +115,10 @@ namespace otb
   {
     char hemisphere=0;
     hemisphere=this->m_MapProjection->getHemisphere();
-	
+
     return hemisphere;
   }
-	
+
 
   template <InverseOrForwardTransformationEnum transform>
       int UtmMapProjection<transform>
@@ -127,7 +127,7 @@ namespace otb
     double longitude = geoPoint[0];
 		//double latitude = geoPoint[1];
     int zone;
-		
+
 		// Each UTM zone is a narrow zone of 6 degrees in width
 		// Zone 31 is between 0 and 6 degrees (lon)
 		// There is 60 zones in each hemisphere
@@ -135,15 +135,15 @@ namespace otb
 
     return zone;
   }
-	
+
 /*	template <InverseOrForwardTransformationEnum transform>
   void UtmMapProjection<transform>
   ::Initialize(const InputPointType& middlePoint)
   {
   this->SetZoneAndHemisphereFromCartoPoint(middlePoint);
 }*/
-	
-	
+
+
 
 }
 #endif
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx b/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
index 8b89b5a3f4..208a37cc7a 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
+++ b/Code/Radiometry/otbAtmosphericCorrectionParameters.cxx
@@ -10,27 +10,27 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
 
 #include "otbAtmosphericCorrectionParameters.h"
 
-namespace otb 
-{ 
+namespace otb
+{
   /***********************      FilterFunctionValues **************************/
   FilterFunctionValues
   ::FilterFunctionValues()
-  { 
+  {
      m_MinSpectralValue = 0;
      m_MaxSpectralValue = 0;
      m_FilterFunctionValues.clear();
   }
-  
+
   /**PrintSelf method */
-  void 
+  void
   FilterFunctionValues
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
@@ -55,15 +55,15 @@ namespace otb
   /**
    * Constructor
    */
-  
+
   AtmosphericCorrectionParameters
   ::AtmosphericCorrectionParameters()
-  { 
+  {
     m_AerosolModel = CONTINENTAL;
   }
-  
+
   /**PrintSelf method */
-  void 
+  void
   AtmosphericCorrectionParameters
   ::PrintSelf(std::ostream& os, itk::Indent indent) const
   {
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParameters.h b/Code/Radiometry/otbAtmosphericCorrectionParameters.h
index 599728c0bc..12c5e1509d 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParameters.h
+++ b/Code/Radiometry/otbAtmosphericCorrectionParameters.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include <vector>
 #include <iostream>
 
-namespace otb 
+namespace otb
 {
   /** \class FilterFunctionValues
    *  \brief This class contains the values of the filter function for the processed spectral band.
@@ -41,16 +41,16 @@ namespace otb
       typedef itk::DataObject               Superclass;
       typedef itk::SmartPointer<Self>       Pointer;
       typedef itk::SmartPointer<const Self> ConstPointer;
-      
+
       /** Type macro */
       itkTypeMacro(FilterFunctionValues,DataObject);
-      
+
       /** Creation through object factory macro */
       itkNewMacro(Self);
-      
+
       typedef double WavelenghtSpectralBandType;
       typedef std::vector<WavelenghtSpectralBandType>    ValuesVectorType;
-     
+
       /** Set vector that contains the filter function value. */
       void SetFilterFunctionValues(const ValuesVectorType & vect)
 	{
@@ -58,19 +58,19 @@ namespace otb
 	  this->Modified();
 	};
       /** Get vector that contains the filter function value. */
-      const ValuesVectorType & GetFilterFunctionValues() const { return m_FilterFunctionValues; }; 
+      const ValuesVectorType & GetFilterFunctionValues() const { return m_FilterFunctionValues; };
       /** Get vector that contains the filter function value 6S. */
       void SetFilterFunctionValues6S(const ValuesVectorType & vect)
-      { 
+      {
           m_FilterFunctionValues6S = vect;
 	  this->Modified();
-      }; 
+      };
       /** Get vector that contains the filter function value 6S. */
-      const ValuesVectorType & GetFilterFunctionValues6S() const { return m_FilterFunctionValues6S; }; 
+      const ValuesVectorType & GetFilterFunctionValues6S() const { return m_FilterFunctionValues6S; };
 
       /** Set minimum spectral value. */
-      itkSetMacro(MinSpectralValue,WavelenghtSpectralBandType);      
-      /** Get minimum spectral value. */ 
+      itkSetMacro(MinSpectralValue,WavelenghtSpectralBandType);
+      /** Get minimum spectral value. */
       itkGetMacro(MinSpectralValue,WavelenghtSpectralBandType);
       /** Set maximum spectral value. This value is automatically computed.*/
       itkSetMacro(MaxSpectralValue,WavelenghtSpectralBandType);
@@ -86,7 +86,7 @@ namespace otb
       FilterFunctionValues();
       /** Destructor */
       ~FilterFunctionValues(){};
-   
+
       /** PrintSelf method */
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
@@ -95,10 +95,10 @@ namespace otb
       FilterFunctionValues(const Self&) ; //purposely not implemented
       void operator=(const Self&) ; //purposely not implemented
 
-      
+
       /** Vector that contains the filter function value. */
       ValuesVectorType m_FilterFunctionValues;
-      /** Vector that contains the filter function value in 6S format (step of 0.0025µm). 
+      /** Vector that contains the filter function value in 6S format (step of 0.0025µm).
         * There values a computed by 6S. If the UserStep is 0.0025µm, then m_FilterFunctionValues is identical as m_FilterFunctionValues6S
         */
       ValuesVectorType m_FilterFunctionValues6S;
@@ -137,75 +137,75 @@ public:
   typedef enum {NO_AEROSOL=0,CONTINENTAL=1,MARITIME=2,URBAN=3,DESERTIC=5} AerosolModelType;
   typedef std::vector<FilterFunctionValues::Pointer>                               WavelenghtSpectralBandVectorType;
   //typedef itk::VariableSizeMatrix<WavelenghtSpectralBandType>    WavelenghtSpectralBandMatrixType;
-  
+
   /**
    * Set/Get the solar zenithal angle.
    */
-  itkSetMacro(SolarZenithalAngle,double); 
-  itkGetMacro(SolarZenithalAngle,double); 
+  itkSetMacro(SolarZenithalAngle,double);
+  itkGetMacro(SolarZenithalAngle,double);
   /**
    * Set/Get the solar azimutal angle.
    */
-  itkSetMacro(SolarAzimutalAngle,double); 
-  itkGetMacro(SolarAzimutalAngle,double); 
+  itkSetMacro(SolarAzimutalAngle,double);
+  itkGetMacro(SolarAzimutalAngle,double);
 
   /**
    * Set/Get the viewing zenithal angle.
    */
-  itkSetMacro(ViewingZenithalAngle,double); 
-  itkGetMacro(ViewingZenithalAngle,double); 
+  itkSetMacro(ViewingZenithalAngle,double);
+  itkGetMacro(ViewingZenithalAngle,double);
   /**
    * Set/Get the viewing azimutal angle.
    */
-  itkSetMacro(ViewingAzimutalAngle,double); 
-  itkGetMacro(ViewingAzimutalAngle,double); 
+  itkSetMacro(ViewingAzimutalAngle,double);
+  itkGetMacro(ViewingAzimutalAngle,double);
 
   /**
    * Set/Get the month.
    */
-  itkSetClampMacro(Month,unsigned int,1,12); 
-  itkGetMacro(Month,unsigned int); 
+  itkSetClampMacro(Month,unsigned int,1,12);
+  itkGetMacro(Month,unsigned int);
 
   /**
    * Set/Get the day.
    */
-  itkSetClampMacro(Day,unsigned int,1,31); 
-  itkGetMacro(Day,unsigned int); 
+  itkSetClampMacro(Day,unsigned int,1,31);
+  itkGetMacro(Day,unsigned int);
 
   /**
    * Set/Get the atmospheric pressure.
    */
-  itkSetMacro(AtmosphericPressure,double); 
-  itkGetMacro(AtmosphericPressure,double); 
+  itkSetMacro(AtmosphericPressure,double);
+  itkGetMacro(AtmosphericPressure,double);
 
   /**
    * Set/Get the water vapor amount.
    */
-  itkSetMacro(WaterVaporAmount,double); 
-  itkGetMacro(WaterVaporAmount,double); 
+  itkSetMacro(WaterVaporAmount,double);
+  itkGetMacro(WaterVaporAmount,double);
 
   /**
    * Set/Get the ozone amount.
    */
-  itkSetMacro(OzoneAmount,double); 
-  itkGetMacro(OzoneAmount,double); 
+  itkSetMacro(OzoneAmount,double);
+  itkGetMacro(OzoneAmount,double);
 
   /**
    * Set/Get the aerosol model.
    */
-  itkSetEnumMacro(AerosolModel,AerosolModelType); 
-  itkGetEnumMacro(AerosolModel,AerosolModelType); 
+  itkSetEnumMacro(AerosolModel,AerosolModelType);
+  itkGetEnumMacro(AerosolModel,AerosolModelType);
 
   /**
    * Set/Get the aerosol optical.
    */
-  itkSetMacro(AerosolOptical,double); 
-  itkGetMacro(AerosolOptical,double); 
+  itkSetMacro(AerosolOptical,double);
+  itkGetMacro(AerosolOptical,double);
 
   /**
    * Set/Get the wavelenght spectral band.
    */
-  void SetWavelenghtSpectralBand( const WavelenghtSpectralBandVectorType & waveband){ m_WavelenghtSpectralBand = waveband; }; 
+  void SetWavelenghtSpectralBand( const WavelenghtSpectralBandVectorType & waveband){ m_WavelenghtSpectralBand = waveband; };
   void SetWavelenghtSpectralBandWithIndex( unsigned int id, const FilterFunctionValues::Pointer & function)
     {
       if (m_WavelenghtSpectralBand.size() <  id+1)
@@ -218,8 +218,8 @@ public:
 	}
       m_WavelenghtSpectralBand[id] = function;
     };
-  WavelenghtSpectralBandVectorType GetWavelenghtSpectralBand(){ return m_WavelenghtSpectralBand; }; 
-  WavelenghtSpectralBandVectorType * GetWavelenghtSpectralBandRef(){ return &m_WavelenghtSpectralBand; }; 
+  WavelenghtSpectralBandVectorType GetWavelenghtSpectralBand(){ return m_WavelenghtSpectralBand; };
+  WavelenghtSpectralBandVectorType * GetWavelenghtSpectralBandRef(){ return &m_WavelenghtSpectralBand; };
 
   /** Constructor */
   AtmosphericCorrectionParameters();
@@ -248,7 +248,7 @@ private:
   /** The Day (in the month) */
   unsigned int m_Day;
   /** The Atmospheric pressure */
-  double m_AtmosphericPressure; 
+  double m_AtmosphericPressure;
   /** The Water vapor amount (Total water vapor content over vertical atmospheric column) */
   double m_WaterVaporAmount;
   /** The Ozone amount (Stratospheric ozone layer content) */
@@ -257,10 +257,10 @@ private:
   AerosolModelType m_AerosolModel;
   /** The Aerosol optical (radiative impact of aerosol for the reference wavelenght 550-nm) */
   double m_AerosolOptical;
-  
+
   /** Wavelenght for the each spectral band definition */
   WavelenghtSpectralBandVectorType m_WavelenghtSpectralBand;
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
index 4f7259a9fb..0f085b8d71 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
+++ b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.cxx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 
@@ -32,7 +32,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
   // Create the output. We use static_cast<> here because we know the default
   // output must be of type TOutputPointSet
   AtmosphericRadiativeTermsPointer output
-    = static_cast<AtmosphericRadiativeTermsType*>(this->MakeOutput(0).GetPointer()); 
+    = static_cast<AtmosphericRadiativeTermsType*>(this->MakeOutput(0).GetPointer());
 
   this->ProcessObject::SetNthOutput( 0, output.GetPointer() );
 
@@ -48,7 +48,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 }
 
 /**
- * 
+ *
  */
 void
 AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
@@ -59,7 +59,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 
 
 /**
- * 
+ *
  */
 void
 AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
@@ -67,9 +67,9 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 {
   if ( idx >= this->GetNumberOfOutputs() )
     {
-    itkExceptionMacro(<<"Requested to graft output " << idx << 
+    itkExceptionMacro(<<"Requested to graft output " << idx <<
         " but this filter only has " << this->GetNumberOfOutputs() << " Outputs.");
-    }  
+    }
 
   if ( !graft )
     {
@@ -122,7 +122,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms::AtmosphericCorrect
 AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 ::GetInput(void)
 {
-  // If there is no input 
+  // If there is no input
   if (this->GetNumberOfInputs()!=1)
     {
     // exit
@@ -140,12 +140,12 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 {
   AtmosphericCorrectionParametersPointer input = this->GetInput();
   AtmosphericRadiativeTermsPointer output = this->GetOutput();
-  
+
   output->GetValues().clear();
   typedef AtmosphericCorrectionParameters::WavelenghtSpectralBandVectorType WavelenghtSpectralBandVectorType;
   WavelenghtSpectralBandVectorType WavelenghtSpectralBandVector = input->GetWavelenghtSpectralBand();
   unsigned int NbBand = WavelenghtSpectralBandVector.size();
-  
+
   double atmosphericReflectance(0.);
   double atmosphericSphericalAlbedo(0.);
   double totalGaseousTransmission(0.);
@@ -155,7 +155,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
   double upwardDirectTransmittance(0.);
   double upwardDiffuseTransmittanceForRayleigh(0.);
   double upwardDiffuseTransmittanceForAerosol(0.);
-  
+
   for(unsigned int i=0 ; i<NbBand ; i++)
     {
       atmosphericReflectance = 0.;
@@ -181,17 +181,17 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 		       input->GetAerosolOptical(),                      /** The Aerosol optical (radiative impact of aerosol for the reference wavelenght 550-nm) */
 		       input->GetWavelenghtSpectralBand()[i],           /** Wavelenght for the spectral band definition */
 		                                                        /** Note : The Max wavelenght spectral band value must be updated ! */
-		       atmosphericReflectance,                          /** Atmospheric reflectance */     
+		       atmosphericReflectance,                          /** Atmospheric reflectance */
 		       atmosphericSphericalAlbedo,                      /** atmospheric spherical albedo */
 		       totalGaseousTransmission,                        /** Total gaseous transmission */
-		       downwardTransmittance,                           /** downward transmittance */      
+		       downwardTransmittance,                           /** downward transmittance */
 		       upwardTransmittance,                             /** upward transmittance */
                        upwardDiffuseTransmittance,                      /** Upward diffuse transmittance */
                        upwardDirectTransmittance,                       /** Upward direct transmittance */
                        upwardDiffuseTransmittanceForRayleigh,           /** Upward diffuse transmittance for rayleigh */
                        upwardDiffuseTransmittanceForAerosol             /** Upward diffuse transmittance for aerosols */
                        );
-      
+
       output->SetIntrinsicAtmosphericReflectance(i, atmosphericReflectance);
       output->SetSphericalAlbedo(i, atmosphericSphericalAlbedo);
       output->SetTotalGaseousTransmission(i, totalGaseousTransmission);
@@ -203,7 +203,7 @@ AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
       output->SetUpwardDiffuseTransmittanceForAerosol(i, upwardDiffuseTransmittanceForAerosol);
 
     }
-}        
+}
 
 /**
  * PrintSelf Method
diff --git a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h
index ee062d571d..6f2c2a8f34 100644
--- a/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h
+++ b/Code/Radiometry/otbAtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ class ITK_EXPORT AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
 
- 
+
 
   /** Runtime information */
   itkTypeMacro(AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms,itk::ProcessObject);
@@ -80,7 +80,7 @@ class ITK_EXPORT AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms
 
 private:
   AtmosphericCorrectionParametersTo6SAtmosphericRadiativeTerms(const Self&);//purposely not implemented
-  void operator=(const Self&); //purposely not implemented 
+  void operator=(const Self&); //purposely not implemented
 
 };
 
diff --git a/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx b/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx
index d2b60f2419..86a03626e5 100644
--- a/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx
+++ b/Code/Radiometry/otbAtmosphericRadiativeTerms.cxx
@@ -10,19 +10,19 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
 
 #include "otbAtmosphericRadiativeTerms.h"
 
-namespace otb 
+namespace otb
 {
-/*********************************** AtmosphericRadiativeTermsSingleChannel***********************************************/ 
+/*********************************** AtmosphericRadiativeTermsSingleChannel***********************************************/
 /**PrintSelf method */
-void 
+void
 AtmosphericRadiativeTermsSingleChannel
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
@@ -37,11 +37,11 @@ AtmosphericRadiativeTermsSingleChannel
   os << indent << "Upward diffuse transmittance for rayleigh: " << m_UpwardDiffuseTransmittanceForRayleigh << std::endl;
   os << indent << "Upward diffuse transmittance for aerosols: " << m_UpwardDiffuseTransmittanceForAerosol << std::endl;
 }
-  
 
 
 
-/*********************************** AtmosphericRadiativeTerms **********************************************************/ 
+
+/*********************************** AtmosphericRadiativeTerms **********************************************************/
 /**CONSTRUCTOR. */
 AtmosphericRadiativeTerms
 ::AtmosphericRadiativeTerms()
@@ -50,7 +50,7 @@ AtmosphericRadiativeTerms
   m_IsInitialized = false;
 }
 
-void 
+void
 AtmosphericRadiativeTerms
 ::ValuesInitialization(unsigned int nbChannel)
 {
@@ -63,53 +63,53 @@ AtmosphericRadiativeTerms
 }
 
 /** SET ACCESSORS WITH VECTORS. */
-void 
+void
 AtmosphericRadiativeTerms
 ::SetIntrinsicAtmosphericReflectances(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
-      
+
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
-    { 
+    {
       m_Values[nbChannel]->SetIntrinsicAtmosphericReflectance(vect[nbChannel]);
     }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetSphericalAlbedos(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetSphericalAlbedo(vect[nbChannel]);
-    } 
+    }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetTotalGaseousTransmissions(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetTotalGaseousTransmission(vect[nbChannel]);
-    }  
-  
+    }
+
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetDownwardTransmittances(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
@@ -117,81 +117,81 @@ AtmosphericRadiativeTerms
       m_Values[nbChannel]->SetDownwardTransmittance(vect[nbChannel]);
     }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetUpwardTransmittances(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetUpwardTransmittance(vect[nbChannel]);
-    }  
+    }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetUpwardDiffuseTransmittances(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetUpwardDiffuseTransmittance(vect[nbChannel]);
-    }  
+    }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetUpwardDirectTransmittances(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetUpwardDirectTransmittance(vect[nbChannel]);
-    }  
+    }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetUpwardDiffuseTransmittancesForRayleigh(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetUpwardDiffuseTransmittanceForRayleigh(vect[nbChannel]);
-    }  
+    }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetUpwardDiffuseTransmittancesForAerosol(const DataVectorType & vect)
 {
   if ( !m_IsInitialized)
-    { 
+    {
       this->ValuesInitialization(vect.size());
     }
   for (unsigned int nbChannel=0; nbChannel<vect.size(); nbChannel++)
     {
       m_Values[nbChannel]->SetUpwardDiffuseTransmittanceForAerosol(vect[nbChannel]);
-    }  
+    }
 }
 
 /** SET ACCESSORS WITH INDEX. */
-void 
+void
 AtmosphericRadiativeTerms
 ::SetValueByIndex(unsigned int id, const ValueType & val)
 {
   if ( m_IsInitialized )
     {
       if ( m_Values.size()<id+1 )
-	{ 
+	{
 	  for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	    {
 	      ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -205,12 +205,12 @@ AtmosphericRadiativeTerms
       itkExceptionMacro(<< "Can't insert value before iniatilizing vector value..."<<std::endl);
     }
 }
-void 
+void
 AtmosphericRadiativeTerms
 ::SetIntrinsicAtmosphericReflectance(unsigned int id, const double & val)
 {
   if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -218,7 +218,7 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetIntrinsicAtmosphericReflectance(val);
-} 
+}
 void
 AtmosphericRadiativeTerms
 ::SetSphericalAlbedo(unsigned int id, const double & val)
@@ -232,13 +232,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetSphericalAlbedo(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
 ::SetTotalGaseousTransmission(unsigned int id, const double & val)
 {
   if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -246,13 +246,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetTotalGaseousTransmission(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
-::SetDownwardTransmittance(unsigned int id, const double & val ) 
+::SetDownwardTransmittance(unsigned int id, const double & val )
 {
  if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -260,13 +260,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetDownwardTransmittance(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
-::SetUpwardTransmittance(unsigned int id, const  double & val ) 
+::SetUpwardTransmittance(unsigned int id, const  double & val )
 {
    if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -274,13 +274,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetUpwardTransmittance(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
-::SetUpwardDiffuseTransmittance(unsigned int id, const  double & val ) 
+::SetUpwardDiffuseTransmittance(unsigned int id, const  double & val )
 {
    if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -288,13 +288,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetUpwardDiffuseTransmittance(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
-::SetUpwardDirectTransmittance(unsigned int id, const  double & val ) 
+::SetUpwardDirectTransmittance(unsigned int id, const  double & val )
 {
    if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -302,13 +302,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetUpwardDirectTransmittance(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
-::SetUpwardDiffuseTransmittanceForRayleigh(unsigned int id, const  double & val ) 
+::SetUpwardDiffuseTransmittanceForRayleigh(unsigned int id, const  double & val )
 {
    if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -316,13 +316,13 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetUpwardDiffuseTransmittanceForRayleigh(val);
-} 
-void 
+}
+void
 AtmosphericRadiativeTerms
-::SetUpwardDiffuseTransmittanceForAerosol(unsigned int id, const  double & val ) 
+::SetUpwardDiffuseTransmittanceForAerosol(unsigned int id, const  double & val )
 {
    if ( m_Values.size()<id+1 )
-    { 
+    {
       for(unsigned int j=0; j<(id+1-m_Values.size());j++)
 	{
 	  ValueType temp = AtmosphericRadiativeTermsSingleChannel::New();
@@ -330,10 +330,10 @@ AtmosphericRadiativeTerms
 	}
     }
   m_Values[id]->SetUpwardDiffuseTransmittanceForAerosol(val);
-} 
+}
 
 /** GET ACCESSORS WITH VECTORS. */
-AtmosphericRadiativeTerms::DataVectorType 
+AtmosphericRadiativeTerms::DataVectorType
 AtmosphericRadiativeTerms
 ::GetIntrinsicAtmosphericReflectances()
 {
@@ -341,7 +341,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetIntrinsicAtmosphericReflectance();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -352,7 +352,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetSphericalAlbedo();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -363,18 +363,18 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetTotalGaseousTransmission();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
 AtmosphericRadiativeTerms
-::GetDownwardTransmittances() 
+::GetDownwardTransmittances()
 {
   DataVectorType vect(m_Values.size(), 0);
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetDownwardTransmittance();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -385,7 +385,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetUpwardTransmittance();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -396,7 +396,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetUpwardDiffuseTransmittance();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -407,7 +407,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetUpwardDirectTransmittance();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -418,7 +418,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetUpwardDiffuseTransmittanceForRayleigh();
-    } 
+    }
   return vect;
 }
 AtmosphericRadiativeTerms::DataVectorType
@@ -429,7 +429,7 @@ AtmosphericRadiativeTerms
   for (unsigned int nbChannel=0; nbChannel<m_Values.size(); nbChannel++)
     {
       vect[nbChannel] = m_Values[nbChannel]->GetUpwardDiffuseTransmittanceForAerosol();
-    } 
+    }
   return vect;
 }
 
@@ -442,7 +442,7 @@ AtmosphericRadiativeTerms
 }
 double
 AtmosphericRadiativeTerms
-::GetSphericalAlbedo(unsigned int id) 
+::GetSphericalAlbedo(unsigned int id)
 {
   return m_Values[id]->GetSphericalAlbedo();
 }
@@ -452,44 +452,44 @@ AtmosphericRadiativeTerms
 {
   return m_Values[id]->GetTotalGaseousTransmission();
 }
-double 
+double
 AtmosphericRadiativeTerms
-::GetDownwardTransmittance(unsigned int id) 
+::GetDownwardTransmittance(unsigned int id)
 {
   return m_Values[id]->GetDownwardTransmittance();
 }
-double 
+double
 AtmosphericRadiativeTerms
 ::GetUpwardTransmittance(unsigned int id)
 {
   return m_Values[id]->GetUpwardTransmittance();
 }
-double 
+double
 AtmosphericRadiativeTerms
 ::GetUpwardDiffuseTransmittance(unsigned int id)
 {
   return m_Values[id]->GetUpwardDiffuseTransmittance();
 }
-double 
+double
 AtmosphericRadiativeTerms
 ::GetUpwardDirectTransmittance(unsigned int id)
 {
   return m_Values[id]->GetUpwardDirectTransmittance();
 }
-double 
+double
 AtmosphericRadiativeTerms
 ::GetUpwardDiffuseTransmittanceForRayleigh(unsigned int id)
 {
   return m_Values[id]->GetUpwardDiffuseTransmittanceForRayleigh();
 }
-double 
+double
 AtmosphericRadiativeTerms
 ::GetUpwardDiffuseTransmittanceForAerosol(unsigned int id)
 {
   return m_Values[id]->GetUpwardDiffuseTransmittanceForAerosol();
 }
 
-const AtmosphericRadiativeTerms::ValueType 
+const AtmosphericRadiativeTerms::ValueType
 AtmosphericRadiativeTerms
 ::GetValueByIndex(unsigned int id) const
 {
@@ -497,7 +497,7 @@ AtmosphericRadiativeTerms
 }
 
 /**PrintSelf method */
-void 
+void
 AtmosphericRadiativeTerms
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/Radiometry/otbAtmosphericRadiativeTerms.h b/Code/Radiometry/otbAtmosphericRadiativeTerms.h
index 94630319df..302e5f278c 100644
--- a/Code/Radiometry/otbAtmosphericRadiativeTerms.h
+++ b/Code/Radiometry/otbAtmosphericRadiativeTerms.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@ PURPOSE.  See the above copyright notices for more information.
 #include <vector>
 
 
-namespace otb 
+namespace otb
 {
 
 /** \class AtmosphericRadiativeTermsSingleChannel
@@ -52,56 +52,56 @@ public:
   /**
    * Set/Get the intrinsic atmospheric reflectance.
    */
-  itkSetMacro(IntrinsicAtmosphericReflectance,double); 
-  itkGetMacro(IntrinsicAtmosphericReflectance,double); 
+  itkSetMacro(IntrinsicAtmosphericReflectance,double);
+  itkGetMacro(IntrinsicAtmosphericReflectance,double);
 
 
   /**
    * Set/Get the spherical albedo of the atmosphere.
    */
-  itkSetMacro(SphericalAlbedo,double); 
-  itkGetMacro(SphericalAlbedo,double); 
+  itkSetMacro(SphericalAlbedo,double);
+  itkGetMacro(SphericalAlbedo,double);
   /**
    * Set/Get the total gaseous transmission.
    */
-  itkSetMacro(TotalGaseousTransmission,double); 
-  itkGetMacro(TotalGaseousTransmission,double); 
+  itkSetMacro(TotalGaseousTransmission,double);
+  itkGetMacro(TotalGaseousTransmission,double);
 
    /**
    * Set/Get the downward transmittance of the atmosphere.
    */
-  itkSetMacro(DownwardTransmittance,double); 
-  itkGetMacro(DownwardTransmittance,double); 
+  itkSetMacro(DownwardTransmittance,double);
+  itkGetMacro(DownwardTransmittance,double);
 
   /**
    * Set/Get the upward transmittance of the atmosphere.
    */
-  itkSetMacro(UpwardTransmittance,double); 
-  itkGetMacro(UpwardTransmittance,double); 
+  itkSetMacro(UpwardTransmittance,double);
+  itkGetMacro(UpwardTransmittance,double);
 
   /**
-   * Set/Get the upward diffuse transmittance 
+   * Set/Get the upward diffuse transmittance
    */
-  itkSetMacro(UpwardDiffuseTransmittance,double); 
-  itkGetMacro(UpwardDiffuseTransmittance,double); 
+  itkSetMacro(UpwardDiffuseTransmittance,double);
+  itkGetMacro(UpwardDiffuseTransmittance,double);
 
   /**
-   * Set/Get the upward direct transmittance 
+   * Set/Get the upward direct transmittance
    */
-  itkSetMacro(UpwardDirectTransmittance,double); 
-  itkGetMacro(UpwardDirectTransmittance,double); 
+  itkSetMacro(UpwardDirectTransmittance,double);
+  itkGetMacro(UpwardDirectTransmittance,double);
 
   /**
-   * Set/Get the upward diffuse transmittance for rayleigh 
+   * Set/Get the upward diffuse transmittance for rayleigh
    */
-  itkSetMacro(UpwardDiffuseTransmittanceForRayleigh,double); 
-  itkGetMacro(UpwardDiffuseTransmittanceForRayleigh,double); 
+  itkSetMacro(UpwardDiffuseTransmittanceForRayleigh,double);
+  itkGetMacro(UpwardDiffuseTransmittanceForRayleigh,double);
 
   /**
    * Set/Get the upward diffuse transmittance for aerosols
    */
-  itkSetMacro(UpwardDiffuseTransmittanceForAerosol,double); 
-  itkGetMacro(UpwardDiffuseTransmittanceForAerosol,double); 
+  itkSetMacro(UpwardDiffuseTransmittanceForAerosol,double);
+  itkGetMacro(UpwardDiffuseTransmittanceForAerosol,double);
 
 protected:
   /** Constructor */
@@ -117,37 +117,37 @@ private:
 
 
   /** The intrinsic atmospheric reflectance. */
-  double m_IntrinsicAtmosphericReflectance; 
-  
+  double m_IntrinsicAtmosphericReflectance;
+
   /** The spherical albedo of the atmosphere.*/
-  double m_SphericalAlbedo; 
+  double m_SphericalAlbedo;
 
   /**The total gaseous transmission (for all species). */
-  double m_TotalGaseousTransmission; 
+  double m_TotalGaseousTransmission;
 
   /** The downward transmittance. */
-  double m_DownwardTransmittance; 
+  double m_DownwardTransmittance;
 
  /** The upward transmittance. */
-  double m_UpwardTransmittance; 
+  double m_UpwardTransmittance;
 
  /** The upward diffuse transmittance. */
-  double m_UpwardDiffuseTransmittance; 
+  double m_UpwardDiffuseTransmittance;
 
  /** The upward direct transmittance. */
-  double m_UpwardDirectTransmittance; 
+  double m_UpwardDirectTransmittance;
 
  /** The upward diffuse transmittance for rayleigh. */
-  double m_UpwardDiffuseTransmittanceForRayleigh; 
+  double m_UpwardDiffuseTransmittanceForRayleigh;
 
  /** The upward diffuse transmittance for aerosols. */
-  double m_UpwardDiffuseTransmittanceForAerosol; 
+  double m_UpwardDiffuseTransmittanceForAerosol;
 
 };
 
 
 /** \class AtmosphericRadiativeTerms
- *  \brief This class is a vector of AtmosphericRadiativeTermsSingleChannel, 
+ *  \brief This class is a vector of AtmosphericRadiativeTermsSingleChannel,
  *         it contains all atmospheric radiative terms for each studied channel.
  *
  * \ingroup AtmosphericRadiativeTermSingleChannel
@@ -168,64 +168,64 @@ public:
 
   /** Creation through object factory macro */
   itkNewMacro(Self);
-  
+
   typedef AtmosphericRadiativeTermsSingleChannel::Pointer   ValueType;
   typedef std::vector<ValueType>                            VectorValueType;
-  typedef std::vector<double>                               DataVectorType;  
+  typedef std::vector<double>                               DataVectorType;
   /**
    * Set/Get the values.
    */
-  void SetValues( const VectorValueType & val) 
-    { 
-      m_Values = val; 
+  void SetValues( const VectorValueType & val)
+    {
+      m_Values = val;
       this->Modified();
-    }; 
-  VectorValueType & GetValues() { return m_Values; }; 
-  const VectorValueType & GetValues() const { return m_Values; }; 
-  
+    };
+  VectorValueType & GetValues() { return m_Values; };
+  const VectorValueType & GetValues() const { return m_Values; };
+
   /** Set/Get the data classified by channel. */
   /** Set methods with vectors. */
-  void SetIntrinsicAtmosphericReflectances(const DataVectorType & vect); 
-  void SetSphericalAlbedos(const DataVectorType & vect); 
-  void SetTotalGaseousTransmissions(const DataVectorType & vect); 
-  void SetDownwardTransmittances(const DataVectorType & vect); 
-  void SetUpwardTransmittances(const DataVectorType & vect); 
+  void SetIntrinsicAtmosphericReflectances(const DataVectorType & vect);
+  void SetSphericalAlbedos(const DataVectorType & vect);
+  void SetTotalGaseousTransmissions(const DataVectorType & vect);
+  void SetDownwardTransmittances(const DataVectorType & vect);
+  void SetUpwardTransmittances(const DataVectorType & vect);
 
-  void SetUpwardDiffuseTransmittances(const DataVectorType & vect); 
-  void SetUpwardDirectTransmittances(const DataVectorType & vect); 
-  void SetUpwardDiffuseTransmittancesForRayleigh(const DataVectorType & vect); 
-  void SetUpwardDiffuseTransmittancesForAerosol(const DataVectorType & vect); 
+  void SetUpwardDiffuseTransmittances(const DataVectorType & vect);
+  void SetUpwardDirectTransmittances(const DataVectorType & vect);
+  void SetUpwardDiffuseTransmittancesForRayleigh(const DataVectorType & vect);
+  void SetUpwardDiffuseTransmittancesForAerosol(const DataVectorType & vect);
 
   /** Set methods with index. */
   void SetValueByIndex(unsigned int id, const ValueType & val);
-  void SetIntrinsicAtmosphericReflectance(unsigned int id, const double & val); 
-  void SetSphericalAlbedo(unsigned int id, const double & val); 
-  void SetTotalGaseousTransmission(unsigned int id, const double & val); 
-  void SetDownwardTransmittance(unsigned int id, const double & val ); 
-  void SetUpwardTransmittance(unsigned int id, const  double & val ); 
+  void SetIntrinsicAtmosphericReflectance(unsigned int id, const double & val);
+  void SetSphericalAlbedo(unsigned int id, const double & val);
+  void SetTotalGaseousTransmission(unsigned int id, const double & val);
+  void SetDownwardTransmittance(unsigned int id, const double & val );
+  void SetUpwardTransmittance(unsigned int id, const  double & val );
 
-  void SetUpwardDiffuseTransmittance(unsigned int id, const  double & val ); 
-  void SetUpwardDirectTransmittance(unsigned int id, const  double & val ); 
-  void SetUpwardDiffuseTransmittanceForRayleigh(unsigned int id, const  double & val ); 
-  void SetUpwardDiffuseTransmittanceForAerosol(unsigned int id, const  double & val ); 
+  void SetUpwardDiffuseTransmittance(unsigned int id, const  double & val );
+  void SetUpwardDirectTransmittance(unsigned int id, const  double & val );
+  void SetUpwardDiffuseTransmittanceForRayleigh(unsigned int id, const  double & val );
+  void SetUpwardDiffuseTransmittanceForAerosol(unsigned int id, const  double & val );
 
   /** Get methods with vectors. */
-  DataVectorType GetIntrinsicAtmosphericReflectances(); 
-  DataVectorType GetSphericalAlbedos(); 
-  DataVectorType GetTotalGaseousTransmissions(); 
-  DataVectorType GetDownwardTransmittances(); 
-  DataVectorType GetUpwardTransmittances(); 
+  DataVectorType GetIntrinsicAtmosphericReflectances();
+  DataVectorType GetSphericalAlbedos();
+  DataVectorType GetTotalGaseousTransmissions();
+  DataVectorType GetDownwardTransmittances();
+  DataVectorType GetUpwardTransmittances();
 
-  DataVectorType GetUpwardDiffuseTransmittances(); 
-  DataVectorType GetUpwardDirectTransmittances(); 
-  DataVectorType GetUpwardDiffuseTransmittancesForRayleigh(); 
-  DataVectorType GetUpwardDiffuseTransmittancesForAerosol(); 
+  DataVectorType GetUpwardDiffuseTransmittances();
+  DataVectorType GetUpwardDirectTransmittances();
+  DataVectorType GetUpwardDiffuseTransmittancesForRayleigh();
+  DataVectorType GetUpwardDiffuseTransmittancesForAerosol();
 
  /** Get methods with index. */
-  double GetIntrinsicAtmosphericReflectance(unsigned int id); 
-  double GetSphericalAlbedo(unsigned int id); 
-  double GetTotalGaseousTransmission(unsigned int id); 
-  double GetDownwardTransmittance(unsigned int id); 
+  double GetIntrinsicAtmosphericReflectance(unsigned int id);
+  double GetSphericalAlbedo(unsigned int id);
+  double GetTotalGaseousTransmission(unsigned int id);
+  double GetDownwardTransmittance(unsigned int id);
   double GetUpwardTransmittance(unsigned int id);
   double GetUpwardDiffuseTransmittance(unsigned int id);
   double GetUpwardDirectTransmittance(unsigned int id);
@@ -233,7 +233,7 @@ public:
   double GetUpwardDiffuseTransmittanceForAerosol(unsigned int id);
 
   const ValueType GetValueByIndex(unsigned int id) const;
- 
+
   /** Initialization method.*/
   void ValuesInitialization(unsigned int nbChannel);
 
@@ -250,9 +250,9 @@ private:
   void operator=(const Self&) ; //purposely not implemented
 
   /** The vector containing each channel information. */
-  VectorValueType m_Values; 
+  VectorValueType m_Values;
   /** Boolean to know if m_Values has been initialized. */
-  bool m_IsInitialized; 
+  bool m_IsInitialized;
 };
 
 
diff --git a/Code/Radiometry/otbDEMCaracteristicsExtractor.h b/Code/Radiometry/otbDEMCaracteristicsExtractor.h
index 1f658862a4..9ea2b13b28 100644
--- a/Code/Radiometry/otbDEMCaracteristicsExtractor.h
+++ b/Code/Radiometry/otbDEMCaracteristicsExtractor.h
@@ -8,7 +8,7 @@
 
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -48,40 +48,40 @@ namespace otb
    *  \brief Calculates the slope, the orientation incidence and exitance radius values for each pixel.
    *
    * To note that azimuth value are projection over North-South direction and angles have to be given in degres.
-   * 
+   *
    * \ingroup DEMHanler
    * \ingroup DEMToImageGenerator
    */
   template <class TInputImage, class TOutputImage >
-    class ITK_EXPORT DEMCaracteristicsExtractor : 
+    class ITK_EXPORT DEMCaracteristicsExtractor :
     public itk::ImageToImageFilter<TInputImage, TOutputImage>
     {
     public:
       /** Extract input and output images dimensions.*/
       itkStaticConstMacro( InputImageDimension, unsigned int, TInputImage::ImageDimension);
       itkStaticConstMacro( OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
-      
+
       /** "typedef" to simplify the variables definition and the declaration. */
       typedef TInputImage         InputImageType;
       typedef TOutputImage        OutputImageType;
-      
+
       /** "typedef" for standard classes. */
       typedef DEMCaracteristicsExtractor                               Self;
-      typedef itk::ImageToImageFilter< TInputImage, OutputImageType >  Superclass; 
+      typedef itk::ImageToImageFilter< TInputImage, OutputImageType >  Superclass;
       typedef itk::SmartPointer<Self>                                  Pointer;
       typedef itk::SmartPointer<const Self>                            ConstPointer;
-      
+
       /** object factory method. */
       itkNewMacro(Self);
-      
+
       /** return class name. */
       itkTypeMacro(DEMCaracteristicsExtractor, ImageToImageFilter);
-      
+
       /** Supported images definition. */
       typedef typename InputImageType::PixelType                           InputPixelType;
       typedef typename InputImageType::InternalPixelType                   InputInternalPixelType;
       typedef typename OutputImageType::PixelType                          OutputPixelType;
-      typedef typename OutputImageType::InternalPixelType                  OutputInternalPixelType; 
+      typedef typename OutputImageType::InternalPixelType                  OutputInternalPixelType;
       typedef itk::CovariantVector< InputInternalPixelType, 2 >            VectorPixelType;
       typedef Image< VectorPixelType, 2 >                                  VectorGradientImageType;
 
@@ -101,31 +101,31 @@ namespace otb
       typedef itk::SinImageFilter<OutputImageType, OutputImageType>                        SinImageFilterType;
       typedef itk::ShiftScaleImageFilter<OutputImageType, OutputImageType>                 ShiftScaleImageFilterType;
       typedef itk::AddImageFilter<OutputImageType, OutputImageType, OutputImageType>       AddImageFilterType;
- 
+
       /** Get the slop output image */
       OutputImageType* GetSlopOutput()
-	{ 
+	{
 	  return static_cast<OutputImageType*>( this->itk::ProcessObject::GetOutput(0) );
 	};
-      
+
       /** Get the aspect output image */
       OutputImageType* GetAspectOutput()
-	{ 
+	{
 	  return static_cast<OutputImageType*>( this->itk::ProcessObject::GetOutput(1) );
 	};
       /** Get the incidence output image */
       OutputImageType* GetIncidenceOutput()
-	{ 
+	{
 	  return static_cast<OutputImageType*>( this->itk::ProcessObject::GetOutput(2) );
 	};
-      
+
       /** Get the exitance output image */
       OutputImageType* GetExitanceOutput()
-	{ 
+	{
 	  return static_cast<OutputImageType*>( this->itk::ProcessObject::GetOutput(3) );
 	};
-    
-      
+
+
       /** Angle parameters*/
       /** Set/Get Solar Angle */
       itkSetMacro(SolarAngle, double);
@@ -139,16 +139,16 @@ namespace otb
       /** Set/Get View Solar */
       itkSetMacro(ViewAzimut, double);
       itkGetConstMacro(ViewAzimut, double);
-      
+
     protected:
       DEMCaracteristicsExtractor();
       virtual ~DEMCaracteristicsExtractor();
       /**PrintSelf method */
       void PrintSelf(std::ostream& os, itk::Indent indent) const;
-      
+
       void GenerateData();
-      
-      
+
+
     private:
       /** Angle parameters*/
       /** Solar Angle */
@@ -160,7 +160,7 @@ namespace otb
       /** View Solar */
       double m_ViewAzimut;
     };
-  
+
 } // end namespace otb
 
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Radiometry/otbDEMCaracteristicsExtractor.txx b/Code/Radiometry/otbDEMCaracteristicsExtractor.txx
index e7dccabdbe..bbdc198512 100644
--- a/Code/Radiometry/otbDEMCaracteristicsExtractor.txx
+++ b/Code/Radiometry/otbDEMCaracteristicsExtractor.txx
@@ -1,5 +1,5 @@
 /*=========================================================================
-	
+
   Program:   ORFEO Toolbox
   Language:  C++
   Date:      $Date$
@@ -25,14 +25,14 @@
 
 namespace otb
 {
-  
+
   template <class TInputImage, class TOutputImage>
   DEMCaracteristicsExtractor<TInputImage, TOutputImage>
   ::DEMCaracteristicsExtractor()
   {
     this->SetNumberOfInputs(1);
     this->SetNumberOfOutputs(3);
-    
+
     this->SetNthOutput(0,OutputImageType::New());
     this->SetNthOutput(1,OutputImageType::New());
     this->SetNthOutput(2,OutputImageType::New());
@@ -43,15 +43,15 @@ namespace otb
     m_ViewAngle = 0;
     m_ViewAzimut = 0;
   }
-  
-  
+
+
   template <class TInputImage, class TOutputImage>
   DEMCaracteristicsExtractor<TInputImage, TOutputImage>
   ::~DEMCaracteristicsExtractor()
   {
   }
-  
-  
+
+
   /**
    * ThreadedGenerateData Performs the pixel-wise addition
    */
@@ -67,13 +67,13 @@ namespace otb
     typename OutputImageType::Pointer IncidenceOutputPtr = this->GetIncidenceOutput();
     typename OutputImageType::Pointer ExitanceOutputPtr = this->GetExitanceOutput();
 
-    // Gradient Magnitude Image Filter used to compute the slope.  
+    // Gradient Magnitude Image Filter used to compute the slope.
     typename GradientMagnitudeFilterType::Pointer GradientMagnitudeFilter = GradientMagnitudeFilterType::New();
-    // Gradient Recursive Gaussian Image Filter used to compute the aspect. 
+    // Gradient Recursive Gaussian Image Filter used to compute the aspect.
     typename GradientRecursiveGaussianImageFilterType::Pointer GradientRecursiveGaussianFilter= GradientRecursiveGaussianImageFilterType::New();
     // Atan used to compute the slop
     typename AtanFilterType::Pointer  AtanFilter   = AtanFilterType::New();
-    // Atan2 Image Filter used to compute the aspect.  
+    // Atan2 Image Filter used to compute the aspect.
     typename Atan2FilterType::Pointer AspectFilter = Atan2FilterType::New();
     // Inverse cosinus Image filter used to compute the incidence image
     typename AcosImageFilterType::Pointer IncidenceFilter = AcosImageFilterType::New();
@@ -84,7 +84,7 @@ namespace otb
     double rad2degCoef;
     rad2degCoef = 180/M_PI;
 
-    // Slop calculation 
+    // Slop calculation
     GradientMagnitudeFilter->SetInput(inputPtr);
     AtanFilter->SetInput( GradientMagnitudeFilter->GetOutput() );
     // Transform values from radian to degrees.
@@ -99,7 +99,7 @@ namespace otb
     // Aspect calcultation
     GradientRecursiveGaussianFilter->SetInput(inputPtr);
     GradientRecursiveGaussianFilter->Update();
-    
+
     // // Extract the X and the Y gradient
     typename AdaptorType::Pointer XAdaptator = AdaptorType::New();
     typename AdaptorType::Pointer YAdaptator = AdaptorType::New();
@@ -117,7 +117,7 @@ namespace otb
     rad2DegFilter1->GraftOutput( AspectOutputPtr );
     rad2DegFilter1->Update();
     this->GraftNthOutput( 1, rad2DegFilter1->GetOutput() );
-    
+
 
     // Angle calculation :
     // sin(slop)
@@ -204,9 +204,9 @@ namespace otb
     rad2DegFilter3->GraftOutput( ExitanceOutputPtr );
     rad2DegFilter3->Update();
     this->GraftNthOutput( 3, rad2DegFilter3->GetOutput() );
-    
+
   }
-  
+
   /**PrintSelf method */
   template <class TInputImage, class TOutputImage>
   void
@@ -219,5 +219,5 @@ namespace otb
     os << indent << "View Angle: " << m_ViewAngle << std::endl;
     os << indent << "View Azimut: " << m_ViewAzimut << std::endl;
   }
- 
+
 } // end namespace otb
diff --git a/Code/Radiometry/otbImageToLuminanceImageFilter.h b/Code/Radiometry/otbImageToLuminanceImageFilter.h
index d583ab0cc1..d7f6ae2b4d 100644
--- a/Code/Radiometry/otbImageToLuminanceImageFilter.h
+++ b/Code/Radiometry/otbImageToLuminanceImageFilter.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -44,7 +44,7 @@ namespace otb
 	class ImageToLuminanceImageFunctor
 	{
 	public:
-	  ImageToLuminanceImageFunctor() 
+	  ImageToLuminanceImageFunctor()
 	    {
 	      m_Alpha = 1.;
 	      m_Beta = 0.;
@@ -55,13 +55,13 @@ namespace otb
 	   void SetBeta(double beta){ m_Beta = beta;};
 	   double GetAlpha(){ return m_Alpha;};
 	   double GetBeta(){ return m_Beta;};
-	
 
-	  inline TOutput operator() (const TInput & inPixel) 
+
+	  inline TOutput operator() (const TInput & inPixel)
 	    {
 	      TOutput outPixel;
-	      double temp; 
- 	      temp = static_cast<double>(inPixel)/m_Alpha + m_Beta; 
+	      double temp;
+ 	      temp = static_cast<double>(inPixel)/m_Alpha + m_Beta;
 	      outPixel = static_cast<TOutput>(temp);
 	      return outPixel;
 	    }
@@ -73,15 +73,15 @@ namespace otb
     }
 
   /** \class ImageToLuminanceImageFilter
-   *  \brief Transform a classical image into the luminance image. For this it uses the functor ImageToLuminanceImageFunctor calling for each component of each pixel. 
+   *  \brief Transform a classical image into the luminance image. For this it uses the functor ImageToLuminanceImageFunctor calling for each component of each pixel.
    *
    * \ingroup ImageToLuminanceImageFunctor
    */
 template <class TInputImage, class TOutputImage>
-class ITK_EXPORT ImageToLuminanceImageFilter : 
+class ITK_EXPORT ImageToLuminanceImageFilter :
 public UnaryImageFunctorWithVectorImageFilter< TInputImage,
                                                TOutputImage,
-                                               ITK_TYPENAME Functor::ImageToLuminanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType, 
+                                               ITK_TYPENAME Functor::ImageToLuminanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType,
                                                                                                    ITK_TYPENAME TOutputImage::InternalPixelType > >
 {
 public:
@@ -92,13 +92,13 @@ public:
   /** "typedef" to simplify the variables definition and the declaration. */
   typedef TInputImage         InputImageType;
   typedef TOutputImage        OutputImageType;
-  typedef typename Functor::ImageToLuminanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType, 
+  typedef typename Functor::ImageToLuminanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType,
                                                          ITK_TYPENAME OutputImageType::InternalPixelType> FunctorType;
 
 
   /** "typedef" for standard classes. */
   typedef ImageToLuminanceImageFilter Self;
-  typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass; 
+  typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
@@ -107,7 +107,7 @@ public:
 
   /** return class name. */
   itkTypeMacro(ImageToLuminanceImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
-  
+
   /** Supported images definition. */
   typedef typename InputImageType::PixelType                           InputPixelType;
   typedef typename InputImageType::InternalPixelType                   InputInternalPixelType;
@@ -118,7 +118,7 @@ public:
 
 
   typedef typename itk::VariableLengthVector<double>                   VectorType;
- 
+
   /** Image size "typedef" definition. */
   typedef typename InputImageType::SizeType SizeType;
 
@@ -131,10 +131,10 @@ public:
   itkSetMacro(Beta, VectorType);
   /** Give the absolute calibration bias. */
   itkGetConstReferenceMacro(Beta, VectorType);
-   
-  
+
+
  protected:
-  
+
   ImageToLuminanceImageFilter()
   {
     m_Alpha.SetSize(1);
@@ -155,8 +155,8 @@ public:
 	  this->GetFunctorVector().push_back(functor);
 	}
     }
-  
-                        
+
+
 private:
   /** Ponderation declaration*/
   VectorType m_Alpha;
diff --git a/Code/Radiometry/otbImageToReflectanceImageFilter.h b/Code/Radiometry/otbImageToReflectanceImageFilter.h
index eae24c9e78..5743ef4a95 100644
--- a/Code/Radiometry/otbImageToReflectanceImageFilter.h
+++ b/Code/Radiometry/otbImageToReflectanceImageFilter.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -50,23 +50,23 @@ namespace otb
 
 	  typedef Functor::ImageToLuminanceImageFunctor<TInput, TOutput>        ImToLumFunctorType;
 	  typedef Functor::LuminanceToReflectanceImageFunctor<TInput, TOutput>  LumToReflecFunctorType;
- 
+
 	  void SetAlpha(double alpha){ m_ImToLumFunctor.SetAlpha(alpha); };
 	  void SetBeta(double beta){ m_ImToLumFunctor.SetBeta(beta); };
 	  void SetSolarIllumination(double solarIllumination){ m_LumToReflecFunctor.SetSolarIllumination(solarIllumination); };
 	  void SetIlluminationCorrectionCoefficient(double coef){ m_LumToReflecFunctor.SetIlluminationCorrectionCoefficient(coef); };
-	  
+
 	  double GetAlpha(){ return m_ImToLumFunctor.GetAlpha();};
 	  double GetBeta(){ return m_ImToLumFunctor.GetBeta();};
 	  double GetSolarIllumination(){ return  m_LumToReflecFunctor.GetSolarIllumination();};
 	  double GetIlluminationCorrectionCoefficient(){ return m_LumToReflecFunctor.GetIlluminationCorrectionCoefficient();};
 
-	  inline TOutput operator() (const TInput & inPixel) 
+	  inline TOutput operator() (const TInput & inPixel)
 	    {
 	      TOutput outPixel;
 	      TOutput tempPix;
 	      tempPix = m_ImToLumFunctor(inPixel);
- 	      outPixel = m_LumToReflecFunctor(tempPix); 
+ 	      outPixel = m_LumToReflecFunctor(tempPix);
 
 	      return outPixel;
 	    }
@@ -80,22 +80,22 @@ namespace otb
     }
 
 /** \class ImageToReflectanceImageFilter
-   *  \brief Transform a classical image into the reflectance image. For this it uses the functor ImageToReflectanceFunctor calling for each component of each pixel. 
+   *  \brief Transform a classical image into the reflectance image. For this it uses the functor ImageToReflectanceFunctor calling for each component of each pixel.
    *
    *  Transform a classical image into the reflectance image. For this it uses the functor ImageToReflectanceFunctor calling for each component of each pixel.
-   *  The flux normalization coefficient (that is the ratio solar distance over mean solar distance) can be directly set or the user can 
-   *  give the day and the mounth of the observation and the class will used a coefficient given by a 6S routine that will give the corresponding coefficient. 
+   *  The flux normalization coefficient (that is the ratio solar distance over mean solar distance) can be directly set or the user can
+   *  give the day and the mounth of the observation and the class will used a coefficient given by a 6S routine that will give the corresponding coefficient.
    *  To note that in the case, 6S gives the square of the distances ratio.
-   *  
+   *
    * \ingroup ImageToReflectanceImageFunctor
    * \ingroup ImageToLuminanceImageFilter
    * \ingroup ReflectanceToLuminanceImageFilter
    */
 template <class TInputImage, class TOutputImage>
-class ITK_EXPORT ImageToReflectanceImageFilter : 
+class ITK_EXPORT ImageToReflectanceImageFilter :
 public UnaryImageFunctorWithVectorImageFilter< TInputImage,
                                                TOutputImage,
-                                               ITK_TYPENAME Functor::ImageToReflectanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType, 
+                                               ITK_TYPENAME Functor::ImageToReflectanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType,
                                                                                                    ITK_TYPENAME TOutputImage::InternalPixelType > >
 {
 public:
@@ -106,13 +106,13 @@ public:
   /** "typedef" to simplify the variables definition and the declaration. */
   typedef TInputImage         InputImageType;
   typedef TOutputImage        OutputImageType;
-  typedef typename Functor::ImageToReflectanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType, 
+  typedef typename Functor::ImageToReflectanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType,
                                                          ITK_TYPENAME OutputImageType::InternalPixelType> FunctorType;
 
 
   /** "typedef" for standard classes. */
   typedef ImageToReflectanceImageFilter Self;
-  typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass; 
+  typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
@@ -121,7 +121,7 @@ public:
 
   /** return class name. */
   itkTypeMacro(ImageToReflectanceImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
-  
+
   /** Supported images definition. */
   typedef typename InputImageType::PixelType                           InputPixelType;
   typedef typename InputImageType::InternalPixelType                   InputInternalPixelType;
@@ -132,7 +132,7 @@ public:
 
 
   typedef typename itk::VariableLengthVector<double>                   VectorType;
- 
+
   /** Image size "typedef" definition. */
   typedef typename InputImageType::SizeType SizeType;
 
@@ -147,7 +147,7 @@ public:
   itkGetConstReferenceMacro(Beta, VectorType);
       /** Set the solar illumination value. */
   itkSetMacro(SolarIllumination, VectorType);
-  
+
   /** Give the solar illumination value. */
   itkGetConstReferenceMacro(SolarIllumination, VectorType);
 
@@ -155,7 +155,7 @@ public:
   itkSetMacro(ZenithalSolarAngle, double);
   /** Give the zenithal solar angle. */
   itkGetConstReferenceMacro(ZenithalSolarAngle, double);
-   
+
   /** Set the flux normalization coefficient. */
   void SetFluxNormalizationCoefficient(double coef)
     {
@@ -163,7 +163,7 @@ public:
       m_IsSetFluxNormalizationCoefficient = true;
       this->Modified();
     };
-  
+
     /** Set the acquisition day. */
     itkSetClampMacro(Day, int, 1, 31);
     /** Get the acquisition day. */
@@ -172,8 +172,8 @@ public:
     itkSetClampMacro(Month, int, 1, 12);
     /** Set the  acquisition mounth. */
     itkGetConstReferenceMacro(Month, int);
-	  
-  
+
+
  protected:
   ImageToReflectanceImageFilter()
     {
@@ -197,7 +197,7 @@ public:
       for(unsigned int i = 0;i<this->GetInput()->GetNumberOfComponentsPerPixel();++i)
 	{
 	  FunctorType functor;
-	  double coefTemp = 0.;  
+	  double coefTemp = 0.;
 	  if (!m_IsSetFluxNormalizationCoefficient)
 	    {
 	      if (m_Day*m_Month != 0 && m_Day<32 && m_Month<13)
@@ -225,8 +225,8 @@ public:
 	  this->GetFunctorVector().push_back(functor);
 	}
     }
-  
-                        
+
+
 private:
   /** Ponderation declaration*/
   VectorType m_Alpha;
diff --git a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h
index 81c84ae1ea..073fa872d5 100644
--- a/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h
+++ b/Code/Radiometry/otbLuminanceToReflectanceImageFilter.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -43,7 +43,7 @@ namespace otb
 	class LuminanceToReflectanceImageFunctor
 	{
 	public:
-	  LuminanceToReflectanceImageFunctor() 
+	  LuminanceToReflectanceImageFunctor()
 	    {
 	      m_SolarIllumination = 1.;
 	      m_IlluminationCorrectionCoefficient = 1.;
@@ -52,18 +52,18 @@ namespace otb
 
 	  void SetSolarIllumination(double solarIllumination){ m_SolarIllumination = solarIllumination;};
 	  void SetIlluminationCorrectionCoefficient(double coef){ m_IlluminationCorrectionCoefficient = coef;};
-	  
+
 	  double GetSolarIllumination(){ return m_SolarIllumination;};
 	  double GetIlluminationCorrectionCoefficient(){ return m_IlluminationCorrectionCoefficient;};
 
-	  inline TOutput operator() (const TInput & inPixel) 
+	  inline TOutput operator() (const TInput & inPixel)
 	    {
 	      TOutput outPixel;
 	      double temp;
- 	      temp = static_cast<double>(inPixel) 
-		         * static_cast<double>(M_PI) 
+ 	      temp = static_cast<double>(inPixel)
+		         * static_cast<double>(M_PI)
                          * m_IlluminationCorrectionCoefficient
-		         / m_SolarIllumination; 
+		         / m_SolarIllumination;
 	      outPixel = static_cast<TOutput>(temp);
 	      return outPixel;
 	    }
@@ -75,16 +75,16 @@ namespace otb
     }
 
   /** \class LuminanceToReflectanceImageFilter
-   *  \brief Transform a luminance image into the reflectance. For this it uses the functor LuminanceToReflectanceImageFunctor 
-   *   calling for each component of each pixel. 
+   *  \brief Transform a luminance image into the reflectance. For this it uses the functor LuminanceToReflectanceImageFunctor
+   *   calling for each component of each pixel.
    *
    * \ingroup ImageToLuminanceImageFunctor
    */
 template <class TInputImage, class TOutputImage>
-class ITK_EXPORT LuminanceToReflectanceImageFilter : 
+class ITK_EXPORT LuminanceToReflectanceImageFilter :
 public UnaryImageFunctorWithVectorImageFilter< TInputImage,
                                                TOutputImage,
-                                               ITK_TYPENAME Functor::LuminanceToReflectanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType, 
+                                               ITK_TYPENAME Functor::LuminanceToReflectanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType,
                                                                                                    ITK_TYPENAME TOutputImage::InternalPixelType > >
 {
 public:
@@ -95,13 +95,13 @@ public:
   /** "typedef" to simplify the variables definition and the declaration. */
   typedef TInputImage         InputImageType;
   typedef TOutputImage        OutputImageType;
-  typedef typename Functor::LuminanceToReflectanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType, 
+  typedef typename Functor::LuminanceToReflectanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType,
                                                          ITK_TYPENAME OutputImageType::InternalPixelType> FunctorType;
 
 
   /** "typedef" for standard classes. */
   typedef LuminanceToReflectanceImageFilter Self;
-  typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass; 
+  typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType > Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
 
@@ -110,7 +110,7 @@ public:
 
   /** return class name. */
   itkTypeMacro(LuminanceToReflectanceImageFilter, UnaryImageFunctorWithVectorImageFiltermageFilter);
-  
+
   /** Supported images definition. */
   typedef typename InputImageType::PixelType                           InputPixelType;
   typedef typename InputImageType::InternalPixelType                   InputInternalPixelType;
@@ -121,7 +121,7 @@ public:
 
 
   typedef typename itk::VariableLengthVector<double>                   VectorType;
- 
+
   /** Image size "typedef" definition. */
   typedef typename InputImageType::SizeType SizeType;
 
@@ -144,7 +144,7 @@ public:
   itkSetClampMacro(Month, int, 1, 12);
   /** Give the mounth. */
   itkGetConstReferenceMacro(Month, int);
-   
+
     /** Set the flux normalization coefficient. */
   void SetFluxNormalizationCoefficient(double coef)
     {
@@ -183,7 +183,7 @@ public:
       for(unsigned int i = 0;i<this->GetInput()->GetNumberOfComponentsPerPixel();++i)
 	{
 	  FunctorType functor;
-	  double coefTemp = 0.;  
+	  double coefTemp = 0.;
 	  if (!m_IsSetFluxNormalizationCoefficient)
 	    {
 	      if (m_Day*m_Month != 0 && m_Day<32 && m_Month<13)
@@ -210,7 +210,7 @@ public:
 	  this->GetFunctorVector().push_back(functor);
 	}
     }
-                 
+
 private:
 
   /** Set the zenithal soalr angle. */
@@ -226,7 +226,7 @@ private:
   /** Used to know if the user has set a value for the FluxNormalizationCoefficient parameter
    * or if the class has to compute it */
   bool m_IsSetFluxNormalizationCoefficient;
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.h b/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.h
index e97efdd1cb..f4480dcdc2 100644
--- a/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.h
+++ b/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
-  
+
 /** \class MultiChannelRAndBAndNIRVegetationIndexImageFilter
  * \brief Implements mutli channel R and B and NIR vegetation index operation, pixel-wise generic vegetation index operation on one vector image.
  *
@@ -33,12 +33,12 @@ namespace otb
  * operation to be applied, using a Functor style.
  *
  */
-template <class TInputImage, class TOutputImage, 
+template <class TInputImage, class TOutputImage,
         class TFunction = Functor::ARVI<        typename TInputImage::InternalPixelType,
                                                 typename TInputImage::InternalPixelType,
                                                 typename TInputImage::InternalPixelType,
                                                 typename TOutputImage::PixelType>  >
-class ITK_EXPORT MultiChannelRAndBAndNIRVegetationIndexImageFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage> 
+class ITK_EXPORT MultiChannelRAndBAndNIRVegetationIndexImageFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -49,7 +49,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(MultiChannelRAndBAndNIRVegetationIndexImageFilter, InPlaceImageFilter);
 
@@ -57,8 +57,8 @@ public:
   typedef TFunction   FunctorType;
   typedef TInputImage InputImageType;
   typedef typename    InputImageType::ConstPointer    InputImagePointer;
-  typedef typename    InputImageType::RegionType InputImageRegionType; 
-  typedef typename    InputImageType::PixelType  InputImagePixelType; 
+  typedef typename    InputImageType::RegionType InputImageRegionType;
+  typedef typename    InputImageType::PixelType  InputImagePixelType;
   typedef TOutputImage OutputImageType;
   typedef typename     OutputImageType::Pointer    OutputImagePointer;
   typedef typename     OutputImageType::RegionType OutputImageRegionType;
@@ -85,7 +85,7 @@ public:
       this->Modified();
       }
   }
-  
+
   /** Set/Get the red channel index. Value must be in [1...[ */
   itkSetMacro(RedIndex,unsigned int);
   itkGetMacro(RedIndex,unsigned int);
@@ -95,7 +95,7 @@ public:
   /** Set/Get the nir channel index. Value must be in [1...[ */
   itkSetMacro(NIRIndex,unsigned int);
   itkGetMacro(NIRIndex,unsigned int);
-  
+
 protected:
   MultiChannelRAndBAndNIRVegetationIndexImageFilter();
   virtual ~MultiChannelRAndBAndNIRVegetationIndexImageFilter() {};
diff --git a/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.txx b/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.txx
index ba15741539..4c4b6cba67 100644
--- a/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.txx
+++ b/Code/Radiometry/otbMultiChannelRAndBAndNIRVegetationIndexImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,23 +37,23 @@ MultiChannelRAndBAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunc
   this->InPlaceOff();
 }
 
-/** 
+/**
  * MultiChannelRAndBAndNIRVegetationIndexImageFilter can produce an image which is a different resolution
  * than its input image.  As such, MultiChannelRAndBAndNIRVegetationIndexImageFilter needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template <class TInputImage, class TOutputImage, class TFunction>
-void 
+void
 MultiChannelRAndBAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction>
 ::GenerateOutputInformation()
 {
   // do not call the superclass' implementation of this method since
   // this filter allows the input the output to be of different dimensions
- 
+
   // get pointers to the input and output
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
   typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
@@ -107,7 +107,7 @@ MultiChannelRAndBAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunc
           }
         else
           {
-          outputDirection[j][i] = 0.0;          
+          outputDirection[j][i] = 0.0;
           }
         }
       }
@@ -123,7 +123,7 @@ MultiChannelRAndBAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunc
           }
         else
           {
-          outputDirection[j][i] = 0.0;          
+          outputDirection[j][i] = 0.0;
           }
         }
       }
@@ -156,7 +156,7 @@ MultiChannelRAndBAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunc
 {
   InputImagePointer  inputPtr = this->GetInput();
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
   // Define the portion of the input to walk for this thread, using
   // the CallCopyOutputRegionToInputRegion method allows for the input
   // and output images to be different dimensions
@@ -172,7 +172,7 @@ MultiChannelRAndBAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunc
   inputIt.GoToBegin();
   outputIt.GoToBegin();
 
-  while( !inputIt.IsAtEnd() ) 
+  while( !inputIt.IsAtEnd() )
     {
     outputIt.Set( m_Functor( inputIt.Get()[m_RedIndex-1],inputIt.Get()[m_BlueIndex-1], inputIt.Get()[m_NIRIndex-1] ) );
     ++inputIt;
diff --git a/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.h b/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.h
index a39d82fe92..f3112d18b2 100644
--- a/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.h
+++ b/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
-  
+
 /** \class MultiChannelRAndNIRVegetationIndexImageFilter
  * \brief Implements mutli channel R and NIR vegetation index operation, pixel-wise generic vegetation index operation on one vector image.
  *
@@ -33,11 +33,11 @@ namespace otb
  * operation to be applied, using a Functor style.
  *
  */
-template <class TInputImage, class TOutputImage, 
+template <class TInputImage, class TOutputImage,
         class TFunction = Functor::NDVI<        typename TInputImage::InternalPixelType,
                                                 typename TInputImage::InternalPixelType,
                                                 typename TOutputImage::PixelType>  >
-class ITK_EXPORT MultiChannelRAndNIRVegetationIndexImageFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage> 
+class ITK_EXPORT MultiChannelRAndNIRVegetationIndexImageFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -48,7 +48,7 @@ public:
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(MultiChannelRAndNIRVegetationIndexImageFilter, InPlaceImageFilter);
 
@@ -56,8 +56,8 @@ public:
   typedef TFunction   FunctorType;
   typedef TInputImage InputImageType;
   typedef typename    InputImageType::ConstPointer    InputImagePointer;
-  typedef typename    InputImageType::RegionType InputImageRegionType; 
-  typedef typename    InputImageType::PixelType  InputImagePixelType; 
+  typedef typename    InputImageType::RegionType InputImageRegionType;
+  typedef typename    InputImageType::PixelType  InputImagePixelType;
   typedef TOutputImage OutputImageType;
   typedef typename     OutputImageType::Pointer    OutputImagePointer;
   typedef typename     OutputImageType::RegionType OutputImageRegionType;
@@ -84,14 +84,14 @@ public:
       this->Modified();
       }
   }
-  
+
   /** Set/Get the red channel index. Value must be in [1...[ */
   itkSetMacro(RedIndex,unsigned int);
   itkGetMacro(RedIndex,unsigned int);
   /** Set/Get the nir channel index. Value must be in [1...[ */
   itkSetMacro(NIRIndex,unsigned int);
   itkGetMacro(NIRIndex,unsigned int);
-  
+
 protected:
   MultiChannelRAndNIRVegetationIndexImageFilter();
   virtual ~MultiChannelRAndNIRVegetationIndexImageFilter() {};
diff --git a/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.txx b/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.txx
index eaa0589363..f652a5b00c 100644
--- a/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.txx
+++ b/Code/Radiometry/otbMultiChannelRAndNIRVegetationIndexImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,23 +37,23 @@ MultiChannelRAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction
   this->InPlaceOff();
 }
 
-/** 
+/**
  * MultiChannelRAndNIRVegetationIndexImageFilter can produce an image which is a different resolution
  * than its input image.  As such, MultiChannelRAndNIRVegetationIndexImageFilter needs to provide an
  * implementation for GenerateOutputInformation() in order to inform
  * the pipeline execution model.  The original documentation of this
  * method is below.
  *
- * \sa ProcessObject::GenerateOutputInformaton() 
+ * \sa ProcessObject::GenerateOutputInformaton()
  */
 template <class TInputImage, class TOutputImage, class TFunction>
-void 
+void
 MultiChannelRAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction>
 ::GenerateOutputInformation()
 {
   // do not call the superclass' implementation of this method since
   // this filter allows the input the output to be of different dimensions
- 
+
   // get pointers to the input and output
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
   typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
@@ -107,7 +107,7 @@ MultiChannelRAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction
           }
         else
           {
-          outputDirection[j][i] = 0.0;          
+          outputDirection[j][i] = 0.0;
           }
         }
       }
@@ -123,7 +123,7 @@ MultiChannelRAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction
           }
         else
           {
-          outputDirection[j][i] = 0.0;          
+          outputDirection[j][i] = 0.0;
           }
         }
       }
@@ -156,7 +156,7 @@ MultiChannelRAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction
 {
   InputImagePointer  inputPtr = this->GetInput();
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
   // Define the portion of the input to walk for this thread, using
   // the CallCopyOutputRegionToInputRegion method allows for the input
   // and output images to be different dimensions
@@ -172,7 +172,7 @@ MultiChannelRAndNIRVegetationIndexImageFilter<TInputImage,TOutputImage,TFunction
   inputIt.GoToBegin();
   outputIt.GoToBegin();
 
-  while( !inputIt.IsAtEnd() ) 
+  while( !inputIt.IsAtEnd() )
     {
 //    outputIt.Set( m_Functor( inputIt.Get() ) );
     outputIt.Set( m_Functor( inputIt.Get()[m_RedIndex-1], inputIt.Get()[m_NIRIndex-1] ) );
diff --git a/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.h b/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.h
index ad172dc486..d1c991a3b3 100644
--- a/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.h
+++ b/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,11 +25,11 @@ namespace otb
 {
 
 /** \class RAndBAndNIRVegetationIndexImageFilter
- * \brief 
- * 
+ * \brief
+ *
  */
 
-template <class TInputImageR, class TInputImageB, class TInputImageNIR, class TOutputImage, 
+template <class TInputImageR, class TInputImageB, class TInputImageNIR, class TOutputImage,
           class TFunction = Functor::ARVI<              typename TInputImageR::PixelType,
                                                         typename TInputImageB::PixelType,
                                                         typename TInputImageNIR::PixelType,
@@ -43,15 +43,15 @@ public:
   typedef itk::TernaryFunctorImageFilter< TInputImageR, TInputImageB, TInputImageNIR, TOutputImage, TFunction >  Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(RAndBAndNIRVegetationIndexImageFilter,TernaryFunctorImageFilter);
-  
-  void SetInputR( const TInputImageR * image ); 
-  void SetInputB( const TInputImageB * image ); 
+
+  void SetInputR( const TInputImageR * image );
+  void SetInputB( const TInputImageB * image );
   void SetInputNIR( const TInputImageNIR * image );
 
   /** Template parameters typedefs */
@@ -80,5 +80,5 @@ private:
 #include "otbRAndBAndNIRVegetationIndexImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.txx b/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.txx
index 4160ffb17f..90654ed650 100644
--- a/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.txx
+++ b/Code/Radiometry/otbRAndBAndNIRVegetationIndexImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ namespace otb
 /**
  * Constructor
  */
-template <class TInputImageR, class TInputImageB, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageB, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,TOutputImage,TFunction>
 ::RAndBAndNIRVegetationIndexImageFilter()
@@ -37,11 +37,11 @@ RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,T
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template <class TInputImageR, class TInputImageB, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageB, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 void
 RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,TOutputImage,TFunction>
-::SetInputR( const TInputImageR * image ) 
+::SetInputR( const TInputImageR * image )
 {
   // Process object is not const-correct so the const casting is required.
   SetInput1( image );
@@ -51,11 +51,11 @@ RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,T
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template <class TInputImageR, class TInputImageB, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageB, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 void
 RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,TOutputImage,TFunction>
-::SetInputB( const TInputImageB * image ) 
+::SetInputB( const TInputImageB * image )
 {
   SetInput2( image );
 }
@@ -63,11 +63,11 @@ RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,T
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template <class TInputImageR, class TInputImageB, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageB, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 void
 RAndBAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageB,TInputImageNIR,TOutputImage,TFunction>
-::SetInputNIR( const TInputImageNIR * image ) 
+::SetInputNIR( const TInputImageNIR * image )
 {
   SetInput3( image );
 }
diff --git a/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.h b/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.h
index e0971424a1..9c87377a9e 100644
--- a/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.h
+++ b/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,11 +25,11 @@ namespace otb
 {
 
 /** \class RAndNIRVegetationIndexImageFilter
- * \brief 
- * 
+ * \brief
+ *
  */
 
-template <class TInputImageR, class TInputImageNIR, class TOutputImage, 
+template <class TInputImageR, class TInputImageNIR, class TOutputImage,
           class TFunction = Functor::NDVI<              typename TInputImageR::PixelType,
                                                         typename TInputImageNIR::PixelType,
                                                         typename TOutputImage::PixelType > >
@@ -42,14 +42,14 @@ public:
   typedef itk::BinaryFunctorImageFilter< TInputImageR, TInputImageNIR, TOutputImage, TFunction >  Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(RAndNIRVegetationIndexImageFilter,BinaryFunctorImageFilter);
-  
-  void SetInputR( const TInputImageR * image1 ); 
+
+  void SetInputR( const TInputImageR * image1 );
   void SetInputNIR( const TInputImageNIR * image2 );
 
   /** Template parameters typedefs */
@@ -84,5 +84,5 @@ private:
 #include "otbRAndNIRVegetationIndexImageFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.txx b/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.txx
index 00ccc0524a..a57662f277 100644
--- a/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.txx
+++ b/Code/Radiometry/otbRAndNIRVegetationIndexImageFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@ namespace otb
 /**
  * Constructor
  */
-template <class TInputImageR, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 RAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageNIR,TOutputImage,TFunction>
 ::RAndNIRVegetationIndexImageFilter()
@@ -41,11 +41,11 @@ RAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageNIR,TOutputImage,TFunc
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template <class TInputImageR, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 void
 RAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageNIR,TOutputImage,TFunction>
-::SetInputR( const TInputImageR * image1 ) 
+::SetInputR( const TInputImageR * image1 )
 {
   // Process object is not const-correct so the const casting is required.
   SetInput1( image1 );
@@ -55,11 +55,11 @@ RAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageNIR,TOutputImage,TFunc
 /**
  * Connect one of the operands for pixel-wise addition
  */
-template <class TInputImageR, class TInputImageNIR, 
+template <class TInputImageR, class TInputImageNIR,
           class TOutputImage, class TFunction  >
 void
 RAndNIRVegetationIndexImageFilter<TInputImageR,TInputImageNIR,TOutputImage,TFunction>
-::SetInputNIR( const TInputImageNIR * image2 ) 
+::SetInputNIR( const TInputImageNIR * image2 )
 {
   // Process object is not const-correct so the const casting is required.
 //  SetNthInput(1, const_cast<TInputImageNIR *>( image2 ));
@@ -87,7 +87,7 @@ RAndNIRVegetationIndexImageFilter<TInputImageR, TInputImageNIR, TOutputImage, TF
   NIRInputImagePointer inputPtr2
     = dynamic_cast<const TInputImageNIR*>(itk::ProcessObject::GetInput(1));
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
   itk::ImageRegionConstIterator<TInputImageR> inputItR(inputPtr1, outputRegionForThread);
   itk::ImageRegionConstIterator<TInputImageNIR> inputItNIR(inputPtr2, outputRegionForThread);
 
@@ -99,7 +99,7 @@ RAndNIRVegetationIndexImageFilter<TInputImageR, TInputImageNIR, TOutputImage, TF
   inputItNIR.GoToBegin();
   outputIt.GoToBegin();
 
-  while( !inputItR.IsAtEnd() ) 
+  while( !inputItR.IsAtEnd() )
     {
     outputIt.Set( this->GetFunctor()( inputItR.Get(), inputItNIR.Get() ) );
     ++inputItNIR;
diff --git a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
index 7756789632..74b11b38f3 100644
--- a/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
+++ b/Code/Radiometry/otbReflectanceToSurfaceReflectanceImageFilter.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -40,7 +40,7 @@ namespace otb
 	class ReflectanceToSurfaceReflectanceImageFunctor
 	{
 	public:
-	  ReflectanceToSurfaceReflectanceImageFunctor() 
+	  ReflectanceToSurfaceReflectanceImageFunctor()
 	    {
 	     m_Coefficient = 1.;
 	     m_Residu = 1.;
@@ -51,29 +51,29 @@ namespace otb
 	  /**
 	   * Set/Get the spherical albedo of the atmosphere.
 	   */
-	  void SetSphericalAlbedo(double albedo){ m_SphericalAlbedo=albedo;}; 
-	  double GetSphericalAlbedo(){ return m_SphericalAlbedo; }; 
+	  void SetSphericalAlbedo(double albedo){ m_SphericalAlbedo=albedo;};
+	  double GetSphericalAlbedo(){ return m_SphericalAlbedo; };
 
 	  /**
 	   * Set/Get Coefficient, computed from AtmosphericRadiativeTermsPointerType datas.
 	   */
-	  void SetCoefficient(double coef){ m_Coefficient = coef; }; 
+	  void SetCoefficient(double coef){ m_Coefficient = coef; };
 	  double GetCoefficient(){ return m_Coefficient; };
-	  
+
 	  /**
 	   * Set/Get Residu, computed from AtmosphericRadiativeTermsPointerType datas.
 	   */
-	  void SetResidu(double res){ m_Residu = res; }; 
+	  void SetResidu(double res){ m_Residu = res; };
 	  double GetResidu(){ return m_Residu; };
 
-	  inline TOutput operator() (const TInput & inPixel) 
+	  inline TOutput operator() (const TInput & inPixel)
 	    {
 	      TOutput outPixel;
 	      double temp, temp2;
 	      temp = static_cast<double>(inPixel)*m_Coefficient + m_Residu;
 	      temp2 =  temp / (1. + m_SphericalAlbedo *  temp);
 	      outPixel = static_cast<TOutput>(temp2);
-	      
+
 
 	      return outPixel;
 	    }
@@ -87,41 +87,41 @@ namespace otb
   /** \class ReflectanceToSurfaceReflectanceImageFilter
    *  \brief Calculates the slope, the orientation incidence and exitance radius values for each pixel.
    *
-   * 
+   *
    * \ingroup AtmosphericRadiativeTerms
    * \ingroup AtmosphericCorrectionParameters
    * \ingroup LuminanceToReflectanceImageFilter
    * \ingroup ImageToReflectanceImageFilter
    */
   template <class TInputImage, class TOutputImage >
-    class ITK_EXPORT ReflectanceToSurfaceReflectanceImageFilter : 
+    class ITK_EXPORT ReflectanceToSurfaceReflectanceImageFilter :
     public UnaryImageFunctorWithVectorImageFilter< TInputImage,
                                                    TOutputImage,
-                                                   ITK_TYPENAME Functor::ReflectanceToSurfaceReflectanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType, 
+                                                   ITK_TYPENAME Functor::ReflectanceToSurfaceReflectanceImageFunctor< ITK_TYPENAME TInputImage::InternalPixelType,
                                                                                                                       ITK_TYPENAME TOutputImage::InternalPixelType > >
     {
     public:
       /** Extract input and output images dimensions.*/
       itkStaticConstMacro( InputImageDimension, unsigned int, TInputImage::ImageDimension);
       itkStaticConstMacro( OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
-      
+
       /** "typedef" to simplify the variables definition and the declaration. */
       typedef TInputImage         InputImageType;
       typedef TOutputImage        OutputImageType;
-      typedef typename Functor::ReflectanceToSurfaceReflectanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType, 
+      typedef typename Functor::ReflectanceToSurfaceReflectanceImageFunctor<ITK_TYPENAME InputImageType::InternalPixelType,
 	                                                                    ITK_TYPENAME OutputImageType::InternalPixelType> FunctorType;
       /** "typedef" for standard classes. */
       typedef ReflectanceToSurfaceReflectanceImageFilter                                                     Self;
-      typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType >    Superclass; 
+      typedef UnaryImageFunctorWithVectorImageFilter< InputImageType, OutputImageType, FunctorType >    Superclass;
       typedef itk::SmartPointer<Self>                                                                        Pointer;
       typedef itk::SmartPointer<const Self>                                                                  ConstPointer;
-      
+
       /** object factory method. */
       itkNewMacro(Self);
-      
+
       /** return class name. */
       itkTypeMacro(ReflectanceToSurfaceReflectanceImageFilter, UnaryImageFunctorWithVectorImageFilter);
-      
+
       /** Supported images definition. */
       typedef typename InputImageType::PixelType                           InputPixelType;
       typedef typename InputImageType::InternalPixelType                   InputInternalPixelType;
@@ -144,7 +144,7 @@ namespace otb
 	  return m_AtmosphericRadiativeTerms;
 	}
 
-       
+
     protected:
       /** Constructor */
       ReflectanceToSurfaceReflectanceImageFilter()
@@ -153,7 +153,7 @@ namespace otb
 	};
       /** Destructor */
       virtual ~ReflectanceToSurfaceReflectanceImageFilter(){};
-   
+
       /** Initialize the functor vector */
       void BeforeThreadedGenerateData ()
 	{
@@ -176,11 +176,11 @@ namespace otb
 	      this->GetFunctorVector().push_back(functor);
 	    }
 	}
- 
+
     private:
       AtmosphericRadiativeTermsPointerType m_AtmosphericRadiativeTerms;
     };
-  
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Radiometry/otbSIXSTraits.cxx b/Code/Radiometry/otbSIXSTraits.cxx
index 07fc63bd36..9408b7c670 100644
--- a/Code/Radiometry/otbSIXSTraits.cxx
+++ b/Code/Radiometry/otbSIXSTraits.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,10 +40,10 @@ SIXSTraits::ComputeAtmosphericParameters(
         const   double                  AerosolOptical,                         /** The Aerosol optical (radiative impact of aerosol for the reference wavelenght 550-nm) */
                 WavelenghtSpectralType* WavelenghtSpectralBand,                 /** Wavelenght for the spectral band definition */
                                                                                 /** Note : The Max wavelenght spectral band value must be updated ! */
-                double &                AtmosphericReflectance,                 /** Atmospheric reflectance */     
+                double &                AtmosphericReflectance,                 /** Atmospheric reflectance */
                 double &                AtmosphericSphericalAlbedo,             /** atmospheric spherical albedo */
                 double &                TotalGaseousTransmission,               /** Total gaseous transmission */
-                double &                DownwardTransmittance,                  /** downward transmittance */      
+                double &                DownwardTransmittance,                  /** downward transmittance */
                 double &                UpwardTransmittance,                    /** upward transmittance */
                 double &                UpwardDiffuseTransmittance,             /** upward diffuse transmittance */
                 double &                UpwardDirectTransmittance,              /** Upward direct transmittance */
@@ -52,7 +52,7 @@ SIXSTraits::ComputeAtmosphericParameters(
         )
 {
 // geometrical conditions
-        otb_6s_doublereal asol(static_cast<otb_6s_doublereal>(SolarZenithalAngle)); 
+        otb_6s_doublereal asol(static_cast<otb_6s_doublereal>(SolarZenithalAngle));
         otb_6s_doublereal phi0(static_cast<otb_6s_doublereal>(SolarAzimutalAngle));
         otb_6s_doublereal avis(static_cast<otb_6s_doublereal>(ViewingZenithalAngle));
         otb_6s_doublereal phiv(static_cast<otb_6s_doublereal>(ViewingAzimutalAngle));
@@ -60,32 +60,32 @@ SIXSTraits::ComputeAtmosphericParameters(
         otb_6s_integer jday(static_cast<otb_6s_integer>(Day));
         otb_6s_doublereal pressure(static_cast<otb_6s_doublereal>(AtmosphericPressure));
         otb_6s_doublereal uw(static_cast<otb_6s_doublereal>(WaterVaporAmount));
-        otb_6s_doublereal uo3(static_cast<otb_6s_doublereal>(OzoneAmount)); 
+        otb_6s_doublereal uo3(static_cast<otb_6s_doublereal>(OzoneAmount));
 // atmospheric model
         otb_6s_integer iaer(static_cast<otb_6s_integer>(AerosolModel));
         otb_6s_doublereal taer55(static_cast<otb_6s_doublereal>(AerosolOptical));
 
-        // Init output parameters       
-        AtmosphericReflectance = 0.;   
-        AtmosphericSphericalAlbedo = 0.; 
-        TotalGaseousTransmission = 0.;  
-        DownwardTransmittance = 0.;    
-        UpwardTransmittance = 0.;      
-        UpwardDiffuseTransmittance = 0.;      
-        UpwardDirectTransmittance = 0.;      
-        UpwardDiffuseTransmittanceForRayleigh = 0.;      
-        UpwardDiffuseTransmittanceForAerosol = 0.;      
+        // Init output parameters
+        AtmosphericReflectance = 0.;
+        AtmosphericSphericalAlbedo = 0.;
+        TotalGaseousTransmission = 0.;
+        DownwardTransmittance = 0.;
+        UpwardTransmittance = 0.;
+        UpwardDiffuseTransmittance = 0.;
+        UpwardDirectTransmittance = 0.;
+        UpwardDiffuseTransmittanceForRayleigh = 0.;
+        UpwardDiffuseTransmittanceForAerosol = 0.;
 
         otb_6s_doublereal wlinf(0.), wlsup(0.);
         otb_6s_doublereal otb_ratm__(0.), sast(0.), tgasm(0.), sdtott(0.), sutott(0.);
         otb_6s_doublereal tdif_up(0.), tdir_up(0.), tdif_up_ray(0.), tdif_up_aer(0.);
         try
         {
-                // 6S official Wavelenght Spectral Band step value 
+                // 6S official Wavelenght Spectral Band step value
                 const float SIXSStepOfWavelenghtSpectralBandValues = .0025;
                 // Generate 6s Wavelenght Spectral Band with the offcicial step value
                 ComputeWavelenghtSpectralBandValuesFor6S(       SIXSStepOfWavelenghtSpectralBandValues,
-                                                                WavelenghtSpectralBand // Update 
+                                                                WavelenghtSpectralBand // Update
                                                                 );
 
                 // 6S official tab size Wavelenght Spectral
@@ -93,7 +93,7 @@ SIXSTraits::ComputeAtmosphericParameters(
                 // Generate WavelenghtSpectralBand  in 6S compatible buffer s[1501]
                 wlinf = static_cast<otb_6s_doublereal>(WavelenghtSpectralBand->GetMinSpectralValue());
                 wlsup = static_cast<otb_6s_doublereal>(WavelenghtSpectralBand->GetMaxSpectralValue());
-                
+
                 otb_6s_integer iinf = static_cast<otb_6s_integer>((wlinf - (float).25) / SIXSStepOfWavelenghtSpectralBandValues + (float)1.5);
                 otb_6s_integer isup = static_cast<otb_6s_integer>((wlsup - (float).25) / SIXSStepOfWavelenghtSpectralBandValues + (float)1.5);
 
@@ -110,16 +110,16 @@ SIXSTraits::ComputeAtmosphericParameters(
                 }
                 // Call 6s main function
                 otbMsgDevMacro(<< "Start call 6S main function ...");
-                otb_6s_ssssss_otb_main_function(        &asol, &phi0, &avis, &phiv, &month, &jday, 
-                                                        &pressure, &uw, &uo3, 
-	                                                &iaer, 
-                                                        &taer55, 
-                                                        &wlinf, &wlsup, 
-                                                        s, 
-                                                        &otb_ratm__, 
-                                                        &sast, 
-                                                        &tgasm, 
-                                                        &sdtott, 
+                otb_6s_ssssss_otb_main_function(        &asol, &phi0, &avis, &phiv, &month, &jday,
+                                                        &pressure, &uw, &uo3,
+	                                                &iaer,
+                                                        &taer55,
+                                                        &wlinf, &wlsup,
+                                                        s,
+                                                        &otb_ratm__,
+                                                        &sast,
+                                                        &tgasm,
+                                                        &sdtott,
                                                         &sutott,
                                                         &tdif_up,
                                                         &tdir_up,
@@ -133,21 +133,21 @@ SIXSTraits::ComputeAtmosphericParameters(
         {
                 itkGenericExceptionMacro( <<"Exception bad_alloc in SIXSTraits class: "<<(char*)err.what());
         }
-        catch (...) 
+        catch (...)
         {
                 itkGenericExceptionMacro( <<"Unknown exception in SIXSTraits class (catch(...)");
         }
 
-        // Set outputs parameters       
-        AtmosphericReflectance = static_cast<double>(otb_ratm__);   
-        AtmosphericSphericalAlbedo = static_cast<double>(sast); 
-        TotalGaseousTransmission = static_cast<double>(tgasm);  
-        DownwardTransmittance = static_cast<double>(sdtott);    
-        UpwardTransmittance = static_cast<double>(sutott);   
-        UpwardDiffuseTransmittance = static_cast<double>(tdif_up);      
-        UpwardDirectTransmittance = static_cast<double>(tdir_up);      
-        UpwardDiffuseTransmittanceForRayleigh = static_cast<double>(tdif_up_ray);      
-        UpwardDiffuseTransmittanceForAerosol = static_cast<double>(tdif_up_aer);      
+        // Set outputs parameters
+        AtmosphericReflectance = static_cast<double>(otb_ratm__);
+        AtmosphericSphericalAlbedo = static_cast<double>(sast);
+        TotalGaseousTransmission = static_cast<double>(tgasm);
+        DownwardTransmittance = static_cast<double>(sdtott);
+        UpwardTransmittance = static_cast<double>(sutott);
+        UpwardDiffuseTransmittance = static_cast<double>(tdif_up);
+        UpwardDirectTransmittance = static_cast<double>(tdir_up);
+        UpwardDiffuseTransmittanceForRayleigh = static_cast<double>(tdif_up_ray);
+        UpwardDiffuseTransmittanceForAerosol = static_cast<double>(tdif_up_aer);
 }
 
 
@@ -165,24 +165,24 @@ SIXSTraits::ComputeWavelenghtSpectralBandValuesFor6S(
         unsigned int j = 1;
         const double invStep = static_cast<double>(1./L_userStep);
         double value(0.);
-        
+
         // Generate WavelenghtSpectralBand if the step is not the offical 6S step value
-        if( vcl_abs(L_userStep-SIXSStepOfWavelenghtSpectralBandValues) > .000001 ) 
+        if( vcl_abs(L_userStep-SIXSStepOfWavelenghtSpectralBandValues) > .000001 )
         {
                 ValuesVectorType values(1, FilterFunctionValues[0]); //vector size 1 with the value vect[0]
-                
+
 	        // Stop the interpolation at the max spectral value.
 	        value = i*SIXSStepOfWavelenghtSpectralBandValues;
                 while(L_min+value <= L_max )
 	        {
 	                // Search the User interval that surround the StepOfWavelenghtSpectralBandValues current value.
-                        
+
 			// removed the <= here, might be wrong
 	                while(j*L_userStep < value)
 	                {
 		                j++;
 	                }
-			
+
 			// Check if we are not out of bound
 			if(j>=FilterFunctionValues.size())
 			{
@@ -190,7 +190,7 @@ SIXSTraits::ComputeWavelenghtSpectralBandValuesFor6S(
 			}
 
 	                double valueTemp;
-	                valueTemp = static_cast<double>(FilterFunctionValues[j-1]) 
+	                valueTemp = static_cast<double>(FilterFunctionValues[j-1])
 	                                + ((static_cast<double>(FilterFunctionValues[j])-static_cast<double>(FilterFunctionValues[j-1]))*invStep)
 	                                *(value-L_userStep*(j-1));
 	                values.push_back(static_cast<WavelenghtSpectralBandType>(valueTemp));
@@ -203,9 +203,9 @@ SIXSTraits::ComputeWavelenghtSpectralBandValuesFor6S(
 	        {
 	                values.push_back(0);
 	        }
-	         // Store this values        
+	         // Store this values
                 WavelenghtSpectralBand->SetFilterFunctionValues6S(values);
-                // Store the new Max MaxSpectralValue         
+                // Store the new Max MaxSpectralValue
                 WavelenghtSpectralBand->SetMaxSpectralValue(static_cast<WavelenghtSpectralBandType>(L_min + i*SIXSStepOfWavelenghtSpectralBandValues));
 
         }
diff --git a/Code/Radiometry/otbSIXSTraits.h b/Code/Radiometry/otbSIXSTraits.h
index c0362cf2b5..cb36bd8060 100644
--- a/Code/Radiometry/otbSIXSTraits.h
+++ b/Code/Radiometry/otbSIXSTraits.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,10 +28,10 @@ namespace otb
  * \brief SIXSTraits operations.
  *
  * Call 6S main function. The main method call 6S to calculate atmospheric correction parameters.
- * It use by the OTB Atmospheric correction framework. 
+ * It use by the OTB Atmospheric correction framework.
  *
  */
-class ITK_EXPORT SIXSTraits 
+class ITK_EXPORT SIXSTraits
 {
 public:
 
@@ -58,22 +58,22 @@ public:
         const   double                  AerosolOptical,                         /** The Aerosol optical (radiative impact of aerosol for the reference wavelenght 550-nm) */
                 WavelenghtSpectralType* WavelenghtSpectralBand,                 /** Wavelenght for the spectral band definition */
                                                                                 /** Note : The Max wavelenght spectral band value must be updated ! */
-                double &                AtmosphericReflectance,                 /** Atmospheric reflectance */     
+                double &                AtmosphericReflectance,                 /** Atmospheric reflectance */
                 double &                AtmosphericSphericalAlbedo,             /** atmospheric spherical albedo */
                 double &                TotalGaseousTransmission,               /** Total gaseous transmission */
-                double &                DownwardTransmittance,                  /** downward transmittance */      
+                double &                DownwardTransmittance,                  /** downward transmittance */
                 double &                UpwardTransmittance,                    /** upward transmittance */
                 double &                UpwardDiffuseTransmittance,             /** upward diffuse transmittance */
                 double &                UpwardDirectTransmittance,              /** Upward direct transmittance */
                 double &                UpwardDiffuseTransmittanceForRayleigh,  /** upward diffuse transmittance for rayleigh */
                 double &                UpwardDiffuseTransmittanceForAerosol    /** upward diffuse transmittance for aerosols */
         );
-  
-  /** 
-  * Check the correpondance between the vector value size and 
+
+  /**
+  * Check the correpondance between the vector value size and
   * the interval number between min and max.
   * If the vector step is not at 0.0025, the new values are computed.
-  * The output vector values is store in the m_FilterFunctionValues6S 
+  * The output vector values is store in the m_FilterFunctionValues6S
   * of WavelenghtSpectralBand
   *
   */
diff --git a/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.h b/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.h
index 6dcded6a2d..8449123c7e 100644
--- a/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.h
+++ b/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.h
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -34,9 +34,9 @@ namespace otb
  namespace Functor
     {
        /** \class ComputeNeighborhoodContributionFunctor
-       *  \brief Unary neighborhood functor to compute the value of a pixel which is a sum 
+       *  \brief Unary neighborhood functor to compute the value of a pixel which is a sum
        *   of the surrounding pixels value ponderated by a coefficient.
-       *  
+       *
        *  \ingroup Functor
        */
       template <class TNeighIter, class TOutput>
@@ -45,7 +45,7 @@ namespace otb
 	public:
 	  ComputeNeighborhoodContributionFunctor() {};
 	  ~ComputeNeighborhoodContributionFunctor() {};
-	  
+
 	  typedef itk::VariableSizeMatrix<double>             WeightingMatrixType;
 	  typedef typename std::vector<WeightingMatrixType>   WeightingValuesContainerType;
 	  typedef typename TOutput::RealValueType             RealValueType;
@@ -59,7 +59,7 @@ namespace otb
 	  DoubleContainerType GetDiffuseRatio(){ return m_DiffuseRatio;};
 
 	  inline TOutput operator()(const TNeighIter & it)
-	    {	 
+	    {
 	      unsigned int neighborhoodSize = it.Size();
 	      double contribution = 0.;
 	      TOutput outPixel;
@@ -73,7 +73,7 @@ namespace otb
 		  WeightingMatrixType TempChannelWeighting = m_WeightingValues[j];
 		  // Loop over the neighborhood
 		  for (unsigned int i = 0; i < neighborhoodSize; ++i)
-		    { 
+		    {
 		      // Current neighborhood pixel index calculation
 		      unsigned int RowIdx = 0;
 		      unsigned int ColIdx = 0;
@@ -90,7 +90,7 @@ namespace otb
 		      double idVal = TempChannelWeighting(RowIdx, ColIdx);
 		      // Extract the current neighborhood pixel value
 		      TOutput tempPix = it.GetPixel(i);
-		      
+
 		      contribution += static_cast<double>( tempPix[j] )*idVal;
 
 		    }
@@ -104,32 +104,32 @@ namespace otb
 	  DoubleContainerType m_UpwardTransmittanceRatio;
 	  DoubleContainerType m_DiffuseRatio;
 	};
-  
+
     }
 
   /** \class SurfaceAdjencyEffect6SCorrectionSchemeFilter
-   *  \brief Correct the scheme taking care of the surrounding pixels. 
-   *   
-   *   The SurfaceAdjencyEffect6SCorrectionSchemeFilter class allows to introduce a neighbor correction to the 
-   *   reflectance estimation. The satelite signal is considered as to be a combinaison of the signal coming from 
+   *  \brief Correct the scheme taking care of the surrounding pixels.
+   *
+   *   The SurfaceAdjencyEffect6SCorrectionSchemeFilter class allows to introduce a neighbor correction to the
+   *   reflectance estimation. The satelite signal is considered as to be a combinaison of the signal coming from
    *   the target pixel and a weighting of the siganls coming from the neighbor pixels.
    *
    */
 template <class TInputImage, class TOutputImage>
-class ITK_EXPORT SurfaceAdjencyEffect6SCorrectionSchemeFilter : 
+class ITK_EXPORT SurfaceAdjencyEffect6SCorrectionSchemeFilter :
  public UnaryFunctorNeighborhoodImageFilter< TInputImage,
                                              TOutputImage,
-                                             ITK_TYPENAME Functor::ComputeNeighborhoodContributionFunctor< itk::ConstNeighborhoodIterator<TInputImage>, 
+                                             ITK_TYPENAME Functor::ComputeNeighborhoodContributionFunctor< itk::ConstNeighborhoodIterator<TInputImage>,
                                                                                                                  ITK_TYPENAME TOutputImage::PixelType >       >
 {
 public:
   /** "typedef" to simplify the variables definition and the declaration. */
-  typedef Functor::ComputeNeighborhoodContributionFunctor<itk::ConstNeighborhoodIterator<TInputImage>, 
+  typedef Functor::ComputeNeighborhoodContributionFunctor<itk::ConstNeighborhoodIterator<TInputImage>,
                                                                    ITK_TYPENAME TOutputImage::PixelType> FunctorType;
 
   /** "typedef" for standard classes. */
-  typedef SurfaceAdjencyEffect6SCorrectionSchemeFilter                                           Self; 
-  typedef UnaryFunctorNeighborhoodImageFilter< TInputImage, TOutputImage, FunctorType >    Superclass; 
+  typedef SurfaceAdjencyEffect6SCorrectionSchemeFilter                                           Self;
+  typedef UnaryFunctorNeighborhoodImageFilter< TInputImage, TOutputImage, FunctorType >    Superclass;
   typedef itk::SmartPointer<Self>                                                                Pointer;
   typedef itk::SmartPointer<const Self>                                                          ConstPointer;
 
@@ -142,7 +142,7 @@ public:
 
   /** return class name. */
   itkTypeMacro(SurfaceAdjencyEffect6SCorrectionSchemeFilter, UnaryFunctorNeighborhoodImageFilter);
-  
+
 /** 	Extract input and output images dimensions.*/
   itkStaticConstMacro( InputImageDimension, unsigned int, TInputImage::ImageDimension);
   itkStaticConstMacro( OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
@@ -165,7 +165,7 @@ public:
 
   /** typedef for calculation*/
   typedef typename itk::ConstNeighborhoodIterator<InputImageType>          NeighborIterType;
- 
+
    /** Set/Get the Size of the neighbor window. */
   void SetWindowRadius(unsigned int rad)
     {
@@ -174,7 +174,7 @@ public:
       this->Modified();
     }
   itkGetConstReferenceMacro(WindowRadius, unsigned int);
-  
+
   /** Set/Get the pixel spacing in kilometers */
   itkSetMacro(PixelSpacingInKilometers,double);
   itkGetMacro(PixelSpacingInKilometers,double);
@@ -226,7 +226,7 @@ private:
   double m_ZenithalViewingAngle;
   /** Radiative terms object */
   AtmosphericRadiativeTermsPointerType m_AtmosphericRadiativeTerms;
-  
+
 };
 
 } // end namespace otb
diff --git a/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx b/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx
index f780897a4a..a680b7870d 100644
--- a/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx
+++ b/Code/Radiometry/otbSurfaceAdjencyEffect6SCorrectionSchemeFilter.txx
@@ -9,7 +9,7 @@
   Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
   See OTBCopyright.txt for details.
 
-  
+
   Some parts of this code are derived from ITK. See ITKCopyright.txt
   for details.
 
@@ -42,7 +42,7 @@ namespace otb
 template <class TInputImage, class TOutputImage>
 SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 ::SurfaceAdjencyEffect6SCorrectionSchemeFilter()
-{ 
+{
   m_WindowRadius = 1;
   m_PixelSpacingInKilometers = 1.;
   m_ZenithalViewingAngle = 0;
@@ -50,21 +50,21 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 ::GenerateOutputInformation()
 {
   Superclass::GenerateOutputInformation();
   typename InputImageType::Pointer inputPtr = const_cast< TInputImage * >( this->GetInput() );
   typename OutputImageType::Pointer outputPtr = const_cast< TOutputImage * >( this->GetOutput() );
-  
+
   if(!inputPtr || !outputPtr)
     return;
   outputPtr->SetNumberOfComponentsPerPixel(inputPtr->GetNumberOfComponentsPerPixel());
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 ::Modified()
 {
@@ -73,7 +73,7 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 ::BeforeThreadedGenerateData ()
 {
@@ -85,7 +85,7 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 }
 
 template <class TInputImage, class TOutputImage>
-void 
+void
 SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 ::ComputeParameters()
 {
@@ -93,7 +93,7 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
   typename InputImageType::Pointer inputPtr = const_cast< TInputImage * >( this->GetInput() );
   typename OutputImageType::Pointer outputPtr = const_cast< TOutputImage * >( this->GetOutput() );
 
-  
+
   WeightingMatrixType radiusMatrix(2*m_WindowRadius+1,2*m_WindowRadius+1);
   radiusMatrix.Fill(0.);
 
@@ -118,7 +118,7 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
       WeightingMatrixType currentWeightingMatrix(2*m_WindowRadius+1,2*m_WindowRadius+1);
       double rayleigh = m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittanceForRayleigh(band);
       double aerosol =  m_AtmosphericRadiativeTerms->GetUpwardDiffuseTransmittanceForAerosol(band);
-     
+
       currentWeightingMatrix.Fill(0.);
 
       for(unsigned int i = 0; i<2*m_WindowRadius+1; ++i)
@@ -133,11 +133,11 @@ SurfaceAdjencyEffect6SCorrectionSchemeFilter<TInputImage, TOutputImage>
 	    }
 	}
       m_WeightingValues.push_back(currentWeightingMatrix);
-    }  
-  
-  
+    }
+
+
   DoubleContainerType upwardTransmittanceRatio,diffuseRatio;
-  
+
   for(unsigned int band = 0; band<inputPtr->GetNumberOfComponentsPerPixel();++band)
     {
       upwardTransmittanceRatio.push_back(m_AtmosphericRadiativeTerms->GetUpwardTransmittance(band)/m_AtmosphericRadiativeTerms->GetUpwardDirectTransmittance(band));
diff --git a/Code/Radiometry/otbVegetationIndex.h b/Code/Radiometry/otbVegetationIndex.h
index 6f774d944e..72877e502f 100644
--- a/Code/Radiometry/otbVegetationIndex.h
+++ b/Code/Radiometry/otbVegetationIndex.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ namespace Functor
   {
     /** \class NDVI
      *  \brief This functor calculate the NormalizeD Vegetation Index (NDVI)
-     *  
+     *
      *  [Pearson et Miller, 1972]
      *
      *  \ingroup Functor
@@ -52,7 +52,7 @@ namespace Functor
 
     /** \class RVI
      *  \brief This functor calculate the Ratio Vegetation Index (RVI)
-     *  
+     *
      *  [Rouse et al., 1973]
      *
      *  \ingroup Functor
@@ -76,7 +76,7 @@ namespace Functor
       };
     /** \class PVI
      *  \brief This functor calculate the Perpendicular Vegetation Index (PVI)
-     *  
+     *
      *  [Richardson et Wiegand, 1977]
      *
      *  \ingroup Functor2
@@ -95,7 +95,7 @@ namespace Functor
 	 }
          /** Set/Get A and B parameters */
          void SetA(const double A)
-         { 
+         {
                 m_A = A;
                 m_Coeff = 1./(vcl_sqrt(m_A*m_A + 1.));
          }
@@ -104,7 +104,7 @@ namespace Functor
          double GetB(void)const    { return (  m_B ); }
 
        private:
-          
+
           /** A and B parameters */
           double  m_A;
           double  m_B;
@@ -116,7 +116,7 @@ namespace Functor
 
     /** \class SAVI
      *  \brief This functor calculate the Soil Adjusted Vegetation Index (SAVI)
-     *  
+     *
      *  [Huete, 1988]
      *
      *  \ingroup Functor
@@ -143,14 +143,14 @@ namespace Functor
          double GetL(void)const    { return (  m_L ); }
 
        private:
-          
+
           /** L correction */
           double  m_L;
 
       };
     /** \class TSAVI
      *  \brief This functor calculate the Transformed Soil Adjusted Vegetation Index (TSAVI)
-     *  
+     *
      *  [Baret et al. 1989, Baret et Guyot, 1991]
      *
      *  \ingroup Functor
@@ -182,7 +182,7 @@ namespace Functor
          double GetX(void)const    { return (m_X); }
 
        private:
-          
+
           /** A and B parameters */
           double  m_A;
           double  m_B;
@@ -193,7 +193,7 @@ namespace Functor
 
     /** \class MSAVI
      *  \brief This functor calculate the Modified Soil Adjusted Vegetation Index (MSAVI)
-     *  
+     *
      *  [Qi et al., 1994]
      *
      *  \ingroup Functor
@@ -222,7 +222,7 @@ namespace Functor
      *  \brief This functor calculate the Atmospherically Resistant Vegetation Index (ARVI)
      *
      *  This vegetation index use three inputs channels
-     *  
+     *
      *  [Yoram J. Kaufman and Didier Tanré, 1992]
      *
      *  \ingroup Functor
@@ -251,7 +251,7 @@ namespace Functor
          double GetGamma(void)const    { return (m_Gamma); }
 
        private:
-          
+
           /** Gamma parameter */
           double  m_Gamma;
       };
diff --git a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h
index fdad60da15..e53c7336ee 100644
--- a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h
+++ b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,20 +28,20 @@ namespace otb
 {
 
 /** \class MultiChannelsPolarimetricSynthesisFilter
- * \brief 
+ * \brief
+ *
+ *
  *
- * 
- * 
  */
 
 template <class TInputImage, class TOutputImage,
-        class TFunction = Functor::PolarimetricSynthesisFunctor<        
+        class TFunction = Functor::PolarimetricSynthesisFunctor<
+                                                typename TInputImage::InternalPixelType,
                                                 typename TInputImage::InternalPixelType,
                                                 typename TInputImage::InternalPixelType,
                                                 typename TInputImage::InternalPixelType,
-                                                typename TInputImage::InternalPixelType,                                                                                                                                                
                                                 typename TOutputImage::PixelType>  >
-class ITK_EXPORT MultiChannelsPolarimetricSynthesisFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage> 
+class ITK_EXPORT MultiChannelsPolarimetricSynthesisFilter : public itk::InPlaceImageFilter<TInputImage,TOutputImage>
 {
 public:
   /** Standard class typedefs. */
@@ -49,20 +49,20 @@ public:
   typedef itk::InPlaceImageFilter<TInputImage,TOutputImage>  Superclass;
   typedef itk::SmartPointer<Self>   Pointer;
   typedef itk::SmartPointer<const Self>  ConstPointer;
-  
+
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
-  itkTypeMacro(MultiChannelsPolarimetricSynthesisFilter, InPlaceImageFilter);  
-  
+  itkTypeMacro(MultiChannelsPolarimetricSynthesisFilter, InPlaceImageFilter);
+
   /** Some typedefs. */
-  typedef std::complex <double>                   InputPixelType;  
+  typedef std::complex <double>                   InputPixelType;
   typedef TFunction    FunctorType;
   typedef TInputImage  InputImageType;
   typedef typename     InputImageType::ConstPointer   InputImagePointer;
-  typedef typename     InputImageType::RegionType     InputImageRegionType; 
-  typedef typename     InputImageType::PixelType      InputImagePixelType; 
+  typedef typename     InputImageType::RegionType     InputImageRegionType;
+  typedef typename     InputImageType::PixelType      InputImagePixelType;
   typedef TOutputImage                                OutputImageType;
   typedef typename     OutputImageType::Pointer       OutputImagePointer;
   typedef typename     OutputImageType::RegionType    OutputImageRegionType;
@@ -71,15 +71,15 @@ public:
   typedef typename     itk::FixedArray<ComplexType,2> ComplexArrayType;
   typedef typename     itk::FixedArray<int,4>         IndexArrayType;
 
-  
-    
+
+
   /** Get the functor object.  The functor is returned by reference.
    * (Functors do not have to derive from itk::LightObject, so they do
    * not necessarily have a reference count. So we cannot return a
    * SmartPointer.) */
   FunctorType& GetFunctor() { return m_Functor; };
-  const FunctorType& GetFunctor() const { return m_Functor; };  
-  
+  const FunctorType& GetFunctor() const { return m_Functor; };
+
 
   /** Set the functor object.  This replaces the current Functor with a
    * copy of the specified Functor. This allows the user to specify a
@@ -94,8 +94,8 @@ public:
       m_Functor = functor;
       this->Modified();
       }
-  }  
-  /** Set the Incident ElectroMagneticField */ 
+  }
+  /** Set the Incident ElectroMagneticField */
   void SetEi(ComplexArrayType ei)
   {
        m_Ei = ei;
@@ -109,7 +109,7 @@ public:
        this->GetFunctor().SetEr(er);
        this->Modified();
   }
-  
+
   /** Set/Get PsiI */
   itkSetMacro(PsiI,double);
   itkGetMacro(PsiI,double);
@@ -122,22 +122,22 @@ public:
   /** Set/Get KhiR */
   itkSetMacro(KhiR,double);
   itkGetMacro(KhiR,double);
-  /** Set/Get EmissionH */  
+  /** Set/Get EmissionH */
   itkSetMacro(EmissionH,bool);
   itkGetMacro(EmissionH,bool);
-  /** Set/Get EmissionV */    
+  /** Set/Get EmissionV */
   itkSetMacro(EmissionV,bool);
   itkGetMacro(EmissionV,bool);
-  /** Set/Get Mode */    
+  /** Set/Get Mode */
   itkSetMacro(Mode,int);
   itkGetMacro(Mode,int);
   /** Set the gain */
   itkSetMacro(Gain,double);
-  itkGetMacro(Gain,double);  
+  itkGetMacro(Gain,double);
   /** Force the copolar mode */
-  void ForceCoPolar();  
+  void ForceCoPolar();
   /** Force the crosspolar mode */
-  void ForceCrossPolar();  
+  void ForceCrossPolar();
 
 
 protected:
@@ -146,7 +146,7 @@ protected:
   /** Destructor */
   virtual ~MultiChannelsPolarimetricSynthesisFilter(){};
 
-  /** MultiChannelsPolarimetricSynthesisFilter can produce an image  
+  /** MultiChannelsPolarimetricSynthesisFilter can produce an image
    * which is a synthesis of channels HH, HV, VH and VV.
    *
    * As such, MultiChannelsPolarimetricSynthesisFilter
@@ -157,9 +157,9 @@ protected:
    *
    * \sa ProcessObject::GenerateOutputInformaton()  */
   virtual void GenerateOutputInformation();
-  
-  virtual void BeforeThreadedGenerateData(); 
-  
+
+  virtual void BeforeThreadedGenerateData();
+
   /** MultiChannelsPolarimetricSynthesisFilter can be implemented as a multithreaded filter.
    * Therefore, this implementation provides a ThreadedGenerateData() routine
    * which is called for each processing thread. The output image data is
@@ -171,21 +171,21 @@ protected:
    * \sa ImageToImageFilter::ThreadedGenerateData(),
    *     ImageToImageFilter::GenerateData()  */
   void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                            int threadId );  
+                            int threadId );
+
+  /** Computation of the electromagnetic fields Ei Er */
+  void ComputeElectromagneticFields();
 
-  /** Computation of the electromagnetic fields Ei Er */ 
-  void ComputeElectromagneticFields();  
-  
   /** Verify and force the inputs, if only  2 or 3 channels are present */
-  void VerifyAndForceInputs();  
+  void VerifyAndForceInputs();
 
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
-  void Print();    
+
+  void Print();
 
 private :
   MultiChannelsPolarimetricSynthesisFilter(const Self&); //purposely not implemented
-  
+
   /** Psi Incident */
   double m_PsiI;
   /** Khi Incident */
@@ -194,27 +194,27 @@ private :
   double m_PsiR;
   /** Khi Reflected */
   double m_KhiR;
-  
+
   /** Gain */
   double m_Gain;
-  
+
   /** None = 0 , copolar = 1 , crosspolar = 2 */
   int m_Mode;
-  
+
   /** Champs Electromagnetic Incident */
   ComplexArrayType m_Ei;
   /** Champs Electromagnetic Reflechi */
-  ComplexArrayType m_Er;  
-   
+  ComplexArrayType m_Er;
+
   /** Architecture Type */
   PolarimetricData::Pointer m_ArchitectureType;
 
   FunctorType m_Functor;
-  
+
   /** Emission mode */
   bool m_EmissionH;
   bool m_EmissionV;
-   
+
 };
 
 } // end namespace otb
diff --git a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx
index 21d7dab380..f6e3a7f56a 100644
--- a/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx
+++ b/Code/SARPolarimetry/otbMultiChannelsPolarimetricSynthesisFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,22 +37,22 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
   this->SetNumberOfRequiredInputs( 1 );
   this->InPlaceOff();
   SetEmissionH(false);
-  SetEmissionV(false);  
+  SetEmissionV(false);
   SetGain(1);
   m_ArchitectureType = PolarimetricData::New();
 }
 
- /** 
-  * GenerateOutputInformation() 
+ /**
+  * GenerateOutputInformation()
   */
 template <class TInputImage, class TOutputImage, class TFunction>
-void 
+void
 MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 ::GenerateOutputInformation()
 {
   // do not call the superclass' implementation of this method since
   // this filter allows the input the output to be of different dimensions
- 
+
   // get pointers to the input and output
   typename Superclass::OutputImagePointer      outputPtr = this->GetOutput();
   typename Superclass::InputImageConstPointer  inputPtr  = this->GetInput();
@@ -106,7 +106,7 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
           }
         else
           {
-          outputDirection[j][i] = 0.0;          
+          outputDirection[j][i] = 0.0;
           }
         }
       }
@@ -122,7 +122,7 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
           }
         else
           {
-          outputDirection[j][i] = 0.0;          
+          outputDirection[j][i] = 0.0;
           }
         }
       }
@@ -131,7 +131,7 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
     outputPtr->SetSpacing( outputSpacing );
     outputPtr->SetOrigin( outputOrigin );
     outputPtr->SetDirection( outputDirection );
-    
+
     }
   else
     {
@@ -152,10 +152,10 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 ::ThreadedGenerateData( const OutputImageRegionType &outputRegionForThread,
                         int threadId)
 {
- 
+
   InputImagePointer  inputPtr = this->GetInput();
   OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
   // Define the portion of the input to walk for this thread, using
   // the CallCopyOutputRegionToInputRegion method allows for the input
   // and output images to be different dimensions
@@ -177,19 +177,19 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
   switch (val)
   {
           case HH_HV_VH_VV :
-                while( !inputIt.IsAtEnd() ) 
+                while( !inputIt.IsAtEnd() )
                 {
-                outputIt.Set( m_Gain * GetFunctor()( inputIt.Get()[0], inputIt.Get()[1], 
+                outputIt.Set( m_Gain * GetFunctor()( inputIt.Get()[0], inputIt.Get()[1],
                                                      inputIt.Get()[2], inputIt.Get()[3] ) );
                 ++inputIt;
                 ++outputIt;
                 progress.CompletedPixel();  // potential exception thrown here
                 }
-              break;  
+              break;
 
           // With 3 channels : HH HV VV ou HH VH VV
           case HH_HV_VV :
-                while( !inputIt.IsAtEnd() ) 
+                while( !inputIt.IsAtEnd() )
                 {
                 outputIt.Set( m_Gain * GetFunctor()( inputIt.Get()[0], inputIt.Get()[1],
                                                      inputIt.Get()[1], inputIt.Get()[2] ) );
@@ -197,35 +197,35 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
                 ++outputIt;
                 progress.CompletedPixel();  // potential exception thrown here
                 }
-              break;  
-               
-          // Only HH and HV are present                
+              break;
+
+          // Only HH and HV are present
           case HH_HV :
-                while( !inputIt.IsAtEnd() ) 
+                while( !inputIt.IsAtEnd() )
                 {
                 outputIt.Set( m_Gain * GetFunctor()( inputIt.Get()[0], inputIt.Get()[1], 0, 0 ) );
                 ++inputIt;
                 ++outputIt;
                 progress.CompletedPixel();  // potential exception thrown here
                 }
-              break;  
-                                
+              break;
+
           // Only VH and VV are present
           case VH_VV :
-                while( !inputIt.IsAtEnd() ) 
+                while( !inputIt.IsAtEnd() )
                 {
                 outputIt.Set( m_Gain * GetFunctor()( 0, 0, inputIt.Get()[2], inputIt.Get()[3] ) );
                 ++inputIt;
                 ++outputIt;
                 progress.CompletedPixel();  // potential exception thrown here
                 }
-              break;  
-       
+              break;
+
           default :
               itkExceptionMacro("Unknown architecture : Polarimetric synthesis is impossible !");
               return;
-  }    
-    
+  }
+
 }
 
 /**
@@ -237,35 +237,35 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 ::ComputeElectromagneticFields()
 {
   ComplexArrayType AEi, AEr;
-  
+
   /** Conversion coefficient Degre To Radian */
-  double DTOR=M_PI/180;  
+  double DTOR=M_PI/180;
   double real,imag;
-  
+
   real = vcl_cos(DTOR*m_PsiI)*vcl_cos(DTOR*m_KhiI);
   imag = -vcl_sin(DTOR*m_PsiI)*vcl_sin(DTOR*m_KhiI);
   ComplexType Ei0(real,imag);
-  
+
   real = vcl_sin(DTOR*m_PsiI)*vcl_cos(DTOR*m_KhiI);
   imag = vcl_cos(DTOR*m_PsiI)*vcl_sin(DTOR*m_KhiI);
   ComplexType Ei1(real,imag);
-  
+
   real = vcl_cos(DTOR*m_PsiR)*vcl_cos(DTOR*m_KhiR);
   imag = -vcl_sin(DTOR*m_PsiR)*vcl_sin(DTOR*m_KhiR);
   ComplexType Er0(real,imag);
-  
+
   real = vcl_sin(DTOR*m_PsiR)*vcl_cos(DTOR*m_KhiR);
   imag = vcl_cos(DTOR*m_PsiR)*vcl_sin(DTOR*m_KhiR);
   ComplexType Er1(real,imag);
-    
+
   AEi[0]=Ei0;
   AEi[1]=Ei1;
   AEr[0]=Er0;
   AEr[1]=Er1;
 
   this->SetEi(AEi);
-  this->SetEr(AEr);  
-      
+  this->SetEr(AEr);
+
 }
 
 /**
@@ -276,42 +276,42 @@ void
 MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 ::VerifyAndForceInputs()
 {
-  
+
   ArchitectureType val = m_ArchitectureType->GetArchitectureType();
-  
+
   switch(val)
     {
-                
+
           case HH_HV_VH_VV :
                   break;
           case HH_HV_VV :
-                  break;           
+                  break;
           case HH_VH_VV :
-                  break;                  
-          // Only HH and HV are present                
+                  break;
+          // Only HH and HV are present
           case HH_HV :
-                             
+
         	// Forcing KhiI=0 PsiI=0
                 this->SetKhiI(0);
                 this->SetPsiI(0);
                 break;
-                                
+
           // Only VH and VV are present
           case VH_VV :
-        
-                // Forcing KhiI=0 PsiI=90          
+
+                // Forcing KhiI=0 PsiI=90
                 this->SetKhiI(0);
                 this->SetPsiI(90);
                 break;
-                
+
           default :
                 itkExceptionMacro("Unknown architecture : Polarimetric synthesis is impossible !!");
                 return;
     }
-    
+
   if(GetMode()==1)ForceCoPolar();
-  else if(GetMode()==2)ForceCrossPolar();    
-        
+  else if(GetMode()==2)ForceCrossPolar();
+
 }
 
 /**
@@ -327,13 +327,13 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 
   // First Part. Determine the kind of architecture of the input picture
   m_ArchitectureType->DetermineArchitecture(NumberOfImages,GetEmissionH(),GetEmissionV());
-  
+
   // Second Part. Verify and force the inputs
-  VerifyAndForceInputs();   
-  
+  VerifyAndForceInputs();
+
   // Third Part. Estimation of the incident field Ei and the reflected field Er
   ComputeElectromagneticFields();
- 
+
 }
 
 /**
@@ -345,7 +345,7 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 ::ForceCoPolar()
 {
         SetPsiR(m_PsiI);
-        SetKhiR(m_KhiI);        
+        SetKhiR(m_KhiI);
 }
 
 /**
@@ -358,7 +358,7 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
 {
         SetPsiR(m_PsiI+90);
         SetKhiR(-m_KhiI);
-        SetMode(2);        
+        SetMode(2);
 }
 
 /**
@@ -384,12 +384,12 @@ MultiChannelsPolarimetricSynthesisFilter<TInputImage,TOutputImage,TFunction>
   std::cout<<"KhiI: "<<m_KhiI<<std::endl;
   std::cout<<"PsiR: "<<m_PsiR<<std::endl;
   std::cout<<"KhiR: "<<m_KhiR<<std::endl;
-  
+
   std::cout<<"Ei0 im: "<<m_Ei[0].imag()<<std::endl;
   std::cout<<"Ei0 re: "<<m_Ei[0].real()<<std::endl;
   std::cout<<"Ei1 im: "<<m_Ei[1].imag()<<std::endl;
   std::cout<<"Ei1 re: "<<m_Ei[1].real()<<std::endl;
-  
+
   std::cout<<"Er0 im: "<<m_Er[0].imag()<<std::endl;
   std::cout<<"Er0 re: "<<m_Er[0].real()<<std::endl;
   std::cout<<"Er1 im: "<<m_Er[1].imag()<<std::endl;
diff --git a/Code/SARPolarimetry/otbPolarimetricData.cxx b/Code/SARPolarimetry/otbPolarimetricData.cxx
index 9da377dfee..d158c44bfa 100644
--- a/Code/SARPolarimetry/otbPolarimetricData.cxx
+++ b/Code/SARPolarimetry/otbPolarimetricData.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ PolarimetricData
   SetArchitectureType(UNKNOWN);
 }
 
-void 
+void
 PolarimetricData
 ::DetermineArchitecture(bool *IsPresent)
 {
@@ -42,11 +42,11 @@ PolarimetricData
     {
         SetArchitectureType(HH_HV_VH_VV);
     }
-  else 
-  // With 3 channels : HH HV VV  
+  else
+  // With 3 channels : HH HV VV
   if ( IsPresent[0] && IsPresent[1] && !IsPresent[2] && IsPresent[3] )
   {
-        SetArchitectureType(HH_HV_VV);  
+        SetArchitectureType(HH_HV_VV);
   }
   else
   // With 3 channels : HH VH VV
@@ -54,12 +54,12 @@ PolarimetricData
   {
         SetArchitectureType(HH_VH_VV);
   }
-  else    
+  else
   // Only HH and HV are present
   if ( IsPresent[0] && IsPresent[1] && !IsPresent[2] && !IsPresent[3] )
     {
         SetArchitectureType(HH_HV);
-  }    
+  }
   else
   // Only VH and VV are present
   if ( !IsPresent[0] && !IsPresent[1] && IsPresent[2] && IsPresent[3] )
@@ -67,8 +67,8 @@ PolarimetricData
         SetArchitectureType(VH_VV);
   }
   else
-  // Only HH and VV are present  
-  if ( IsPresent[0] && !IsPresent[1] && !IsPresent[2] && IsPresent[3] ) 
+  // Only HH and VV are present
+  if ( IsPresent[0] && !IsPresent[1] && !IsPresent[2] && IsPresent[3] )
   {
        SetArchitectureType(HH_VV);
   }
@@ -78,7 +78,7 @@ PolarimetricData
   }
 }
 
-void 
+void
 PolarimetricData
 ::DetermineArchitecture(int NumberOfImages, bool EmissionH,bool EmissionV)
 {
@@ -88,7 +88,7 @@ PolarimetricData
       case 4 :
         SetArchitectureType(HH_HV_VH_VV);
         break;
-        
+
       case 3:
         SetArchitectureType(HH_HV_VV);
         break;
@@ -104,16 +104,16 @@ PolarimetricData
             SetArchitectureType(VH_VV);
           }
         break;
-      
+
       default:
         itkExceptionMacro("Unknown architecture !");
         return;
-    }             
+    }
 }
 
 
 /**PrintSelf method */
-void 
+void
 PolarimetricData
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
diff --git a/Code/SARPolarimetry/otbPolarimetricData.h b/Code/SARPolarimetry/otbPolarimetricData.h
index 9fe28e0d93..46c9b5d1c4 100644
--- a/Code/SARPolarimetry/otbPolarimetricData.h
+++ b/Code/SARPolarimetry/otbPolarimetricData.h
@@ -1,4 +1,4 @@
-/*=================g=======================================================
+/*========================================================================
 
   Program:   ORFEO Toolbox
   Language:  C++
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,57 +30,57 @@ namespace otb
  typedef enum {
  HH_HV_VH_VV=0,
  HH_HV_VV=1,
- HH_VH_VV=2, 
+ HH_VH_VV=2,
  HH_HV=3,
  VH_VV=4,
  HH_VV=5,
- UNKNOWN=6} ArchitectureType;  
- 
- 
+ UNKNOWN=6} ArchitectureType;
+
+
  /** \class PolarimetricData
  *  \brief This class allows to determine the type of architecture we get.
  *
  *
- * \sa 
+ * \sa
  */
 
 class ITK_EXPORT PolarimetricData : public itk::DataObject
 {
   public:
- 
+
   /** Standard typedefs */
   typedef PolarimetricData                           Self;
   typedef itk::DataObject                            Superclass;
   typedef itk::SmartPointer<Self>                    Pointer;
   typedef itk::SmartPointer<const Self>              ConstPointer;
-  
+
   /** Type macro */
   itkTypeMacro(PolarimetricData,DataObject);
-    
+
   /** Creation through object factory macro */
   itkNewMacro(Self);
-  
+
   /** Determine the kind of architecture of the input */
   void DetermineArchitecture(bool *PresentInputImages);
   void DetermineArchitecture(int NumberOfImages, bool EmissionH,bool EmissionV);
 
   /** Set/Get ArchitectureType */
   itkSetMacro(ArchitectureType,ArchitectureType);
-  itkGetMacro(ArchitectureType,ArchitectureType);     
-  
+  itkGetMacro(ArchitectureType,ArchitectureType);
+
   protected:
   /** Constructor */
   PolarimetricData();
   /** Destructor */
-  ~PolarimetricData(){};  
+  ~PolarimetricData(){};
   /**PrintSelf method */
-  void PrintSelf(std::ostream& os, itk::Indent indent) const;      
+  void PrintSelf(std::ostream& os, itk::Indent indent) const;
+
 
-  
   private:
   PolarimetricData(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-   
+
   /** Architecture Type */
   ArchitectureType m_ArchitectureType;
 
diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h
index 2700d13939..e6971c609f 100644
--- a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h
+++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,42 +28,42 @@ namespace otb
 {
 
 /** \class PolarimetricSynthesisFilter
- * \brief 
+ * \brief
  *
  * This class compute the polarimetric synthesis from two to four radar images,
  * depening on the polarimetric architecture:
  * \begin{enumerate}
- *    \item HH_HV : two channels are available: $S_{HH}$ and $S_{HV}$. 
+ *    \item HH_HV : two channels are available: $S_{HH}$ and $S_{HV}$.
  *                  Emit polarisation is fixed to horizontal orientation: $\psi_{i}=0$ and $\chi_{i}=0$.
  *    \item VV_VH : two channels are available: $S_{VV}$ and $S_{VH}$.
  *                  Emit polarisation is fixed to vertical orientation: $\psi_{i}=90^\circ$ and $\chi_{i}=0$.
- *    \item HH_HV_VV : three channels are available: $S_{HH}$, $S_{HV}$ and $S_{VV}$. 
+ *    \item HH_HV_VV : three channels are available: $S_{HH}$, $S_{HV}$ and $S_{VV}$.
  *                     we make the assumption that cross polarisation are reciprocal ($S_{HV} =  S_{VH}$).
  *    \item HH_HV_VH_VV: four channels are available $S_{HH}$, $S_{HV}$, $S_{VH}$ and $S_{VV}$.
  * \end{enumerate}
- * 
- * To resolve the synthesis, four parameters are required: $\psi_{i}$ , $\chi_{i}$, $\psi_{r}$ and $\chi_{r}$. 
+ *
+ * To resolve the synthesis, four parameters are required: $\psi_{i}$ , $\chi_{i}$, $\psi_{r}$ and $\chi_{r}$.
  * These parameters depend on the polarimetric architecture describe below.
- * 
+ *
  * The result of the synthesis is a scalar image. Three modes are available:
  * \begin{enumerate}
  *     \item none: set the four parameters;
  *     \item co: $\psi_{r} = \psi_{i}$ and $\chi_{r} = \chi_{i}$
- *     \item cross: $\psi_{r} = \psi_{i} + 90^\circ$ and $\chi_{r} = -\chi_{i}$ 
+ *     \item cross: $\psi_{r} = \psi_{i} + 90^\circ$ and $\chi_{r} = -\chi_{i}$
  * \end{enumerate}
  *
  * This class is parameterized over the type of the input images and
  * the type of the output image.  It is also parameterized by the
- * operation to be applied, using a Functor style.  
- * 
+ * operation to be applied, using a Functor style.
+ *
  */
 
-template <class TInputImageHH,class TInputImageHV,class TInputImageVH,class TInputImageVV,class TOutputImage, 
-          class TFunction = Functor::PolarimetricSynthesisFunctor<              
+template <class TInputImageHH,class TInputImageHV,class TInputImageVH,class TInputImageVV,class TOutputImage,
+          class TFunction = Functor::PolarimetricSynthesisFunctor<
                                                         typename TInputImageHH::PixelType,
                                                         typename TInputImageHV::PixelType,
                                                         typename TInputImageVH::PixelType,
-                                                        typename TInputImageVV::PixelType,                                                        
+                                                        typename TInputImageVV::PixelType,
                                                         typename TOutputImage::PixelType > >
 class ITK_EXPORT PolarimetricSynthesisFilter :  public otb::QuaternaryFunctorImageFilter< TInputImageHH,
                         TInputImageHV, TInputImageVH, TInputImageVV, TOutputImage, TFunction >
@@ -72,17 +72,17 @@ public:
 
   /** Standard typedefs */
   typedef PolarimetricSynthesisFilter       Self;
-  typedef otb::QuaternaryFunctorImageFilter< TInputImageHH, TInputImageHV, 
+  typedef otb::QuaternaryFunctorImageFilter< TInputImageHH, TInputImageHV,
                 TInputImageVH, TInputImageVV, TOutputImage, TFunction >  Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(PolarimetricSynthesisFilter,QuaternaryFunctorImageFilter);
-  
+
   /** Template parameters typedefs */
   typedef std::complex <double>                   InputPixelType;
   typedef otb::Image< InputPixelType,  2 >        InputImageType;
@@ -93,13 +93,13 @@ public:
   typedef typename Superclass::Input3ImageType    VHInputImageType;
   typedef typename Superclass::Input3ImagePointer VHInputImagePointer;
   typedef typename Superclass::Input4ImageType    VVInputImageType;
-  typedef typename Superclass::Input4ImagePointer VVInputImagePointer;  
+  typedef typename Superclass::Input4ImagePointer VVInputImagePointer;
   typedef typename Superclass::OutputImageType    OutputImageType;
-  typedef typename OutputImageType::Pointer       OutputImagePointer;  
-  typedef typename OutputImageType::RegionType    OutputImageRegionType;  
+  typedef typename OutputImageType::Pointer       OutputImagePointer;
+  typedef typename OutputImageType::RegionType    OutputImageRegionType;
   typedef typename Superclass::FunctorType        FunctorType;
   typedef typename std::complex <double>          ComplexType;
-  typedef typename itk::FixedArray<ComplexType,2> ComplexArrayType;   
+  typedef typename itk::FixedArray<ComplexType,2> ComplexArrayType;
 
   void SetInputHH( const TInputImageHH * image );
   void SetInputHV( const TInputImageHV * image );
@@ -118,40 +118,40 @@ public:
   /** Set/Get KhiR */
   itkSetMacro(KhiR,double);
   itkGetMacro(KhiR,double);
-  /** Set/Get Mode */    
+  /** Set/Get Mode */
   itkSetMacro(Mode,int);
   itkGetMacro(Mode,int);
   /** Set the gain */
   itkSetMacro(Gain,double);
-  /** Set the ElectroMagneticField Incident */  
+  /** Set the ElectroMagneticField Incident */
   void SetEi(ComplexArrayType ei)
   {
        m_Ei = ei;
        this->GetFunctor().SetEi(ei);
        this->Modified();
   }
-  /** Set the ElectroMagneticField Reflected */  
+  /** Set the ElectroMagneticField Reflected */
   void SetEr(ComplexArrayType er)
   {
        m_Er = er;
        this->GetFunctor().SetEr(er);
        this->Modified();
-  }   
+  }
   /** Force the copolar mode */
-  void ForceCoPolar();  
-  /** Force the crosspolar mode */  
+  void ForceCoPolar();
+  /** Force the crosspolar mode */
   void ForceCrossPolar();
-  
+
 protected:
   /**  Constructor */
   PolarimetricSynthesisFilter();
-  /**  Destructor */  
+  /**  Destructor */
   virtual ~PolarimetricSynthesisFilter() {};
-  
+
   virtual void GenerateOutputInformation();
-  
-  virtual void BeforeThreadedGenerateData(); 
-  
+
+  virtual void BeforeThreadedGenerateData();
+
   /** ThreadedGenerateData().  ThreadedGenerateData can only write to the
    * portion of the output image specified by the parameter
    * "outputRegionForThread"
@@ -159,21 +159,21 @@ protected:
    * \sa ImageToImageFilter::ThreadedGenerateData(),
    *     ImageToImageFilter::GenerateData()  */
   virtual void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread,
-                            int threadId );  
-  
-  /** Computation of the electromagnetic fields Ei Er */ 
+                            int threadId );
+
+  /** Computation of the electromagnetic fields Ei Er */
   void ComputeElectromagneticFields();
 
   /** Verify and force the inputs, if only  2 or 3 channels are present */
   void VerifyAndForceInputs();
-  
+
   void PrintSelf(std::ostream& os, itk::Indent indent) const;
 
 private:
 
   PolarimetricSynthesisFilter(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   /** Psi Incident */
   double m_PsiI;
   /** Khi Incident */
@@ -185,19 +185,19 @@ private:
 
   /** Gain */
   double m_Gain;
-     
+
   /** None = 0 , copolar = 1 , crosspolar = 2 */
   int m_Mode;
-  
+
   /** Champs Electromagnetic Incident */
   ComplexArrayType m_Ei;
   /** Champs Electromagnetic Reflechi */
-  ComplexArrayType m_Er;  
-  
+  ComplexArrayType m_Er;
+
   /** Architecture Type */
   PolarimetricData::Pointer m_ArchitectureType;
   bool m_PresentInputImages[4];
-   
+
 };
 
 } // end namespace otb
@@ -206,5 +206,5 @@ private:
 #include "otbPolarimetricSynthesisFilter.txx"
 #endif
 
-  
+
 #endif
diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx
index 2e43d9672a..16b368d8d2 100644
--- a/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx
+++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -38,7 +38,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
   m_PresentInputImages[0] = false;
   m_PresentInputImages[1] = false;
   m_PresentInputImages[2] = false;
-  m_PresentInputImages[3] = false;    
+  m_PresentInputImages[3] = false;
   m_ArchitectureType = PolarimetricData::New();
 }
 
@@ -48,14 +48,14 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 ::GenerateOutputInformation()
 {
   // if HH is set, use HH to generate output information
-  if(m_PresentInputImages[0])  
+  if(m_PresentInputImages[0])
   {
         this->GetOutput()->CopyInformation(this->GetInput(0));
   }
   // else, use VH
   else if(m_PresentInputImages[2])
   {
-        this->GetOutput()->CopyInformation(this->GetInput(2));        
+        this->GetOutput()->CopyInformation(this->GetInput(2));
   }
   else
   {
@@ -69,7 +69,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 template <class TInputImageHH,class TInputImageHV,class TInputImageVH,class TInputImageVV,class TOutputImage,class TFunction  >
 void
 PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImageVV,TOutputImage,TFunction>
-::SetInputHH( const TInputImageHH * image ) 
+::SetInputHH( const TInputImageHH * image )
 {
   // Process object is not const-correct so the const casting is required.
   SetInput1( image );
@@ -82,10 +82,10 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 template <class TInputImageHH,class TInputImageHV,class TInputImageVH,class TInputImageVV,class TOutputImage,class TFunction  >
 void
 PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImageVV,TOutputImage,TFunction>
-::SetInputHV( const TInputImageHV * image ) 
+::SetInputHV( const TInputImageHV * image )
 {
   SetInput2( image );
-  m_PresentInputImages[1]=true;  
+  m_PresentInputImages[1]=true;
 }
 
 /**
@@ -94,10 +94,10 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 template <class TInputImageHH,class TInputImageHV,class TInputImageVH,class TInputImageVV,class TOutputImage,class TFunction  >
 void
 PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImageVV,TOutputImage,TFunction>
-::SetInputVH( const TInputImageVH * image ) 
+::SetInputVH( const TInputImageVH * image )
 {
   SetInput3( image );
-  m_PresentInputImages[2]=true;  
+  m_PresentInputImages[2]=true;
 }
 
 /**
@@ -106,10 +106,10 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 template <class TInputImageHH,class TInputImageHV,class TInputImageVH,class TInputImageVV,class TOutputImage,class TFunction  >
 void
 PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImageVV,TOutputImage,TFunction>
-::SetInputVV( const TInputImageVV * image ) 
+::SetInputVV( const TInputImageVV * image )
 {
   SetInput4( image );
-  m_PresentInputImages[3]=true;  
+  m_PresentInputImages[3]=true;
 }
 
 /**
@@ -121,17 +121,17 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 ::PrintSelf(std::ostream& os, itk::Indent indent) const
 {
   Superclass::PrintSelf(os,indent);
-  
+
   os<<"PsiI: "<<m_PsiI<<std::endl;
   os<<"KhiI: "<<m_KhiI<<std::endl;
   os<<"PsiR: "<<m_PsiR<<std::endl;
   os<<"KhiR: "<<m_KhiR<<std::endl;
-  
+
   os<<"Ei0 im: "<<m_Ei[0].imag()<<std::endl;
   os<<"Ei0 re: "<<m_Ei[0].real()<<std::endl;
   os<<"Ei1 im: "<<m_Ei[1].imag()<<std::endl;
   os<<"Ei1 re: "<<m_Ei[1].real()<<std::endl;
-  
+
   os<<"Er0 im: "<<m_Er[0].imag()<<std::endl;
   os<<"Er0 re: "<<m_Er[0].real()<<std::endl;
   os<<"Er1 im: "<<m_Er[1].imag()<<std::endl;
@@ -147,7 +147,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 ::ForceCoPolar()
 {
         SetPsiR(m_PsiI);
-        SetKhiR(m_KhiI);        
+        SetKhiR(m_KhiI);
         SetMode(1);
 }
 
@@ -161,7 +161,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 {
         SetPsiR(m_PsiI+90);
         SetKhiR(-m_KhiI);
-        SetMode(2);        
+        SetMode(2);
 }
 
 /**
@@ -180,26 +180,26 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
         this->SetKhiI(0);
         this->SetPsiI(0);
         break;
-      
+
       case VH_VV :
-        // Forcing KhiI=0 PsiI=90          
+        // Forcing KhiI=0 PsiI=90
         this->SetKhiI(0);
         this->SetPsiI(90);
-        break;        
-        
+        break;
+
       case HH_VV :
         itkExceptionMacro("Only the HH and VV channels are available : Polarimetric synthesis is not supported !");
         return;
 
       case UNKNOWN :
         itkExceptionMacro("Unknown architecture : Polarimetric synthesis is impossible !");
-        return;        
-      
+        return;
+
       default :
         break;
-        
+
    }
-  
+
   if(GetMode()==1)ForceCoPolar();
   else if(GetMode()==2)ForceCrossPolar();
 
@@ -214,35 +214,35 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 ::ComputeElectromagneticFields()
 {
   ComplexArrayType AEi, AEr;
-  
+
   /** Conversion coefficient Degre To Radian */
-  double DTOR=M_PI/180;  
+  double DTOR=M_PI/180;
   double real,imag;
-  
+
   real = vcl_cos(DTOR*m_PsiI)*vcl_cos(DTOR*m_KhiI);
   imag = -vcl_sin(DTOR*m_PsiI)*vcl_sin(DTOR*m_KhiI);
   ComplexType Ei0(real,imag);
-  
+
   real = vcl_sin(DTOR*m_PsiI)*vcl_cos(DTOR*m_KhiI);
   imag = vcl_cos(DTOR*m_PsiI)*vcl_sin(DTOR*m_KhiI);
   ComplexType Ei1(real,imag);
-  
+
   real = vcl_cos(DTOR*m_PsiR)*vcl_cos(DTOR*m_KhiR);
   imag = -vcl_sin(DTOR*m_PsiR)*vcl_sin(DTOR*m_KhiR);
   ComplexType Er0(real,imag);
-  
+
   real = vcl_sin(DTOR*m_PsiR)*vcl_cos(DTOR*m_KhiR);
   imag = vcl_cos(DTOR*m_PsiR)*vcl_sin(DTOR*m_KhiR);
   ComplexType Er1(real,imag);
-  
+
   AEi[0]=Ei0;
   AEi[1]=Ei1;
   AEr[0]=Er0;
   AEr[1]=Er1;
 
   this->SetEi(AEi);
-  this->SetEr(AEr);  
-           
+  this->SetEr(AEr);
+
 }
 
 /**
@@ -256,10 +256,10 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
 
    // First Part. Determine the kind of architecture
    m_ArchitectureType->DetermineArchitecture(m_PresentInputImages);
-   
+
    // Second Part. Verify and force the inputs
-   VerifyAndForceInputs();   
-  
+   VerifyAndForceInputs();
+
    // Third Part. Estimation of the incident field Ei and the reflected field Er
    ComputeElectromagneticFields();
 
@@ -278,7 +278,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
   OutputImagePointer outputPtr = this->GetOutput(0);
   itk::ImageRegionIterator<TOutputImage> outputIt(outputPtr, outputRegionForThread);
   outputIt.GoToBegin();
-                
+
   switch (m_ArchitectureType->GetArchitectureType())
   {
         // With 4 channels :
@@ -291,24 +291,24 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
                     = dynamic_cast<const TInputImageHH*>((itk::ProcessObject::GetInput(0)));
                 HVInputImagePointer inputPtrHV
                     = dynamic_cast<const TInputImageHV*>((itk::ProcessObject::GetInput(1)));
-                VHInputImagePointer inputPtrVH 
+                VHInputImagePointer inputPtrVH
                     = dynamic_cast<const TInputImageVH*>((itk::ProcessObject::GetInput(2)));
                 VVInputImagePointer inputPtrVV
                     = dynamic_cast<const TInputImageVV*>((itk::ProcessObject::GetInput(3)));
-  
+
                 itk::ImageRegionConstIterator<TInputImageHH> inputItHH(inputPtrHH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageHV> inputItHV(inputPtrHV, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageVH> inputItVH(inputPtrVH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageVV> inputItVV(inputPtrVV, outputRegionForThread);
 
                 itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-        
+
                 inputItHH.GoToBegin();
                 inputItHV.GoToBegin();
                 inputItVH.GoToBegin();
-                inputItVV.GoToBegin();  
-         
-                while( !inputItHH.IsAtEnd() ) 
+                inputItVV.GoToBegin();
+
+                while( !inputItHH.IsAtEnd() )
                 {
                     outputIt.Set( m_Gain * Superclass::GetFunctor()(inputItHH.Get(), inputItHV.Get(), inputItVH.Get(), inputItVV.Get()) );
                     ++inputItHH;
@@ -320,7 +320,7 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
                 }
                 break;
         }
-        // With 3 channels : HH HV VV 
+        // With 3 channels : HH HV VV
         case HH_HV_VV :
 
         {
@@ -330,19 +330,19 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
                     = dynamic_cast<const TInputImageHV*>((itk::ProcessObject::GetInput(1)));
                 VVInputImagePointer inputPtrVV
                     = dynamic_cast<const TInputImageVV*>((itk::ProcessObject::GetInput(3)));
-  
+
                 itk::ImageRegionConstIterator<TInputImageHH> inputItHH(inputPtrHH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageHV> inputItHV(inputPtrHV, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageVV> inputItVV(inputPtrVV, outputRegionForThread);
                 itk::ImageRegionIterator<TOutputImage> outputIt(outputPtr, outputRegionForThread);
-        
+
                 itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-        
+
                 inputItHH.GoToBegin();
                 inputItHV.GoToBegin();
-                inputItVV.GoToBegin();  
+                inputItVV.GoToBegin();
 
-                while( !inputItHH.IsAtEnd() ) 
+                while( !inputItHH.IsAtEnd() )
                 {
                     outputIt.Set( m_Gain * Superclass::GetFunctor()(inputItHH.Get(), inputItHV.Get(), inputItHV.Get(), inputItVV.Get()) );
                     ++inputItHH;
@@ -356,26 +356,26 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
         // With 3 channels : HH VH VV
         case HH_VH_VV :
         {
-          
+
                 HHInputImagePointer inputPtrHH
                     = dynamic_cast<const TInputImageHH*>((itk::ProcessObject::GetInput(0)));
-                VHInputImagePointer inputPtrVH 
+                VHInputImagePointer inputPtrVH
                     = dynamic_cast<const TInputImageVH*>((itk::ProcessObject::GetInput(2)));
                 VVInputImagePointer inputPtrVV
                     = dynamic_cast<const TInputImageVV*>((itk::ProcessObject::GetInput(3)));
                 OutputImagePointer outputPtr = this->GetOutput(0);
-  
+
                 itk::ImageRegionConstIterator<TInputImageHH> inputItHH(inputPtrHH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageVH> inputItVH(inputPtrVH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageVV> inputItVV(inputPtrVV, outputRegionForThread);
-        
+
                 itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-        
+
                 inputItHH.GoToBegin();
                 inputItVH.GoToBegin();
-                inputItVV.GoToBegin();  
-                
-                while( !inputItHH.IsAtEnd() ) 
+                inputItVV.GoToBegin();
+
+                while( !inputItHH.IsAtEnd() )
                 {
                     outputIt.Set( m_Gain * Superclass::GetFunctor()(inputItHH.Get(), inputItVH.Get(), inputItVH.Get(), inputItVV.Get()) );
                     ++inputItHH;
@@ -385,26 +385,26 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
                     progress.CompletedPixel(); // potential exception thrown here
                 }
                 break;
-        }        
+        }
         // With 2 channels : HH HV
         case HH_HV :
         {
-        
+
                 HHInputImagePointer inputPtrHH
                     = dynamic_cast<const TInputImageHH*>((itk::ProcessObject::GetInput(0)));
                 HVInputImagePointer inputPtrHV
                     = dynamic_cast<const TInputImageHV*>((itk::ProcessObject::GetInput(1)));
-  
+
                 itk::ImageRegionConstIterator<TInputImageHH> inputItHH(inputPtrHH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageHV> inputItHV(inputPtrHV, outputRegionForThread);
                 itk::ImageRegionIterator<TOutputImage> outputIt(outputPtr, outputRegionForThread);
-        
+
                 itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-        
+
                 inputItHH.GoToBegin();
                 inputItHV.GoToBegin();
-          
-                while( !inputItHH.IsAtEnd() ) 
+
+                while( !inputItHH.IsAtEnd() )
                 {
                     outputIt.Set( m_Gain * Superclass::GetFunctor()(inputItHH.Get(), inputItHV.Get(), 0,0 ));
                     ++inputItHH;
@@ -413,25 +413,25 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
                     progress.CompletedPixel(); // potential exception thrown here
                 }
                 break;
-        }       
-        // With 2 channels : VH VV                
+        }
+        // With 2 channels : VH VV
         case VH_VV :
-        {  
-                VHInputImagePointer inputPtrVH 
+        {
+                VHInputImagePointer inputPtrVH
                     = dynamic_cast<const TInputImageVH*>((itk::ProcessObject::GetInput(2)));
                 VVInputImagePointer inputPtrVV
                     = dynamic_cast<const TInputImageVV*>((itk::ProcessObject::GetInput(3)));
-  
+
                 itk::ImageRegionConstIterator<TInputImageVH> inputItVH(inputPtrVH, outputRegionForThread);
                 itk::ImageRegionConstIterator<TInputImageVV> inputItVV(inputPtrVV, outputRegionForThread);
                 itk::ImageRegionIterator<TOutputImage> outputIt(outputPtr, outputRegionForThread);
-        
+
                 itk::ProgressReporter progress(this, threadId, outputRegionForThread.GetNumberOfPixels());
-        
+
                 inputItVH.GoToBegin();
-                inputItVV.GoToBegin();  
-                
-                while( !inputItVH.IsAtEnd() ) 
+                inputItVV.GoToBegin();
+
+                while( !inputItVH.IsAtEnd() )
                 {
                     outputIt.Set( m_Gain * Superclass::GetFunctor()(0,0, inputItVH.Get(), inputItVV.Get()) );
                     ++inputItVH;
@@ -440,11 +440,11 @@ PolarimetricSynthesisFilter<TInputImageHH,TInputImageHV,TInputImageVH,TInputImag
                     progress.CompletedPixel(); // potential exception thrown here
                 }
                 break;
-        }         
+        }
         default :
                 itkExceptionMacro("Unknown architecture : Polarimetric synthesis is impossible !");
-              return;                                              
-  
+              return;
+
   }
 } // end namespace otb
 
diff --git a/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h b/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h
index 2713b07228..6be87ab88f 100644
--- a/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h
+++ b/Code/SARPolarimetry/otbPolarimetricSynthesisFunctor.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@ namespace Functor
     /** \class PolarimetricSynthesisFunctor
      *  \brief This functor calculate the polarimetric synthesis
      *  using the electroMagneticField vectors as follow:
-     *  $$ \sigma(\psi_{i},\chi_{i},\psi_{r},\chi_{r}) = 
+     *  $$ \sigma(\psi_{i},\chi_{i},\psi_{r},\chi_{r}) =
                        \vec(E_{r}}\cdot\left[ S \right] \vec(E_{i}}$$
      *
      *  \ingroup Functor
@@ -36,26 +36,26 @@ namespace Functor
       {
       public:
         /** Some typedefs. */
-        typedef typename     std::complex <double>       ComplexType;        
-        typedef typename     itk::FixedArray<ComplexType,2>    ComplexArrayType;        
-        
+        typedef typename     std::complex <double>       ComplexType;
+        typedef typename     itk::FixedArray<ComplexType,2>    ComplexArrayType;
+
         /** Set the ElectroMagneticField Incident */
         void SetEi( ComplexArrayType ei ){
                 m_Ei = ei;
         }
-        
-        /** Set the ElectroMagneticField Reflected */        
+
+        /** Set the ElectroMagneticField Reflected */
         void SetEr( ComplexArrayType er ){
                 m_Er = er;
         }
-               
-        /** Constructor */                  
-	PolarimetricSynthesisFunctor() 
+
+        /** Constructor */
+	PolarimetricSynthesisFunctor()
         {
                 m_Ei.Fill(1);
                 m_Er.Fill(1);
         };
-        /** Destructor */        
+        /** Destructor */
 	virtual ~PolarimetricSynthesisFunctor() {};
         inline TOutput operator()(const TInput1 &Shh, const TInput2 &Shv, const TInput3 &Svh, const TInput4 &Svv)
 	{
@@ -63,18 +63,18 @@ namespace Functor
                 double scalar;
 
                 tmp = vcl_conj(m_Er[0])*( m_Ei[0]*Shh + m_Ei[1]*Shv ) + vcl_conj(m_Er[1])*( m_Ei[0]*Svh + m_Ei[1]*Svv );
-                
+
                 scalar=(double) ( vcl_pow( std::abs(tmp),2)  );
-                              
+
                 return ( static_cast<TOutput>(scalar) );
         }
-      
+
       private :
         /** Electromagnetic Field Incident */
         ComplexArrayType m_Ei;
         /** Electromagnetic Field Reflected */
-        ComplexArrayType m_Er;         
-        
+        ComplexArrayType m_Er;
+
       };
 
   } // namespace Functor
diff --git a/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.h b/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.h
index 7b9ee3ff0a..00b422e615 100644
--- a/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.h
+++ b/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,7 +20,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 #include "otbRCC8GraphSource.h"
 
-namespace otb 
+namespace otb
 {
 /** \class ImageListToRCC8GraphFilter
  * \brief Base class for filters taking an images list as input to
diff --git a/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.txx b/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.txx
index b5407d9c20..ae0628e97a 100644
--- a/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.txx
+++ b/Code/SpatialReasoning/otbImageListToRCC8GraphFilter.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -32,7 +32,7 @@ ImageListToRCC8GraphFilter<TInputImage,TOutputGraph>
   this->SetNumberOfRequiredInputs(1);
 }
 /**
- * Input Connection 
+ * Input Connection
  * \param image The input image.
  */
 template <class TInputImage, class TOutputGraph>
@@ -44,7 +44,7 @@ ImageListToRCC8GraphFilter<TInputImage,TOutputGraph>
   this->itk::ProcessObject::SetNthInput(0,const_cast<InputImageListType*>(imageList));
 }
 /**
- * Input image retrieval 
+ * Input image retrieval
  * \return The input image.
  */
 template <class TInputImage, class TOutputGraph>
@@ -52,7 +52,7 @@ typename ImageListToRCC8GraphFilter<TInputImage,TOutputGraph>::InputImageListTyp
 ImageListToRCC8GraphFilter<TInputImage,TOutputGraph>
 ::GetInput(void)
 {
-  // If there is no input 
+  // If there is no input
   if (this->GetNumberOfInputs()<1)
     {
     // exit
diff --git a/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.h b/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.h
index 9efb7a5fe9..441f4f6211 100644
--- a/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.h
+++ b/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,11 +24,11 @@ namespace otb
 {
 /**
  * \class ImageMultiSegmentationToRCC8GraphFilter
- * \brief This class takes a list of labelled segmentation images 
+ * \brief This class takes a list of labelled segmentation images
  * and build the RCC8 graph of the set of regions it represents.
  */
 template <class TInputImage, class TOutputGraph>
-class ITK_EXPORT ImageMultiSegmentationToRCC8GraphFilter 
+class ITK_EXPORT ImageMultiSegmentationToRCC8GraphFilter
   : public ImageListToRCC8GraphFilter<TInputImage,TOutputGraph>
 {
 public:
@@ -58,18 +58,18 @@ public:
   /** Knowledge enum typedef */
   typedef typename OutputGraphType::RCC8ValueType RCC8ValueType;
   typedef enum {NO_INFO,LEVEL_1,LEVEL_3,FULL} KnowledgeValueType;
-  typedef std::pair<KnowledgeValueType,RCC8ValueType> KnowledgeStateType; 
+  typedef std::pair<KnowledgeValueType,RCC8ValueType> KnowledgeStateType;
   /** Toogle optimisation flag */
   itkBooleanMacro(Optimisation);
   itkSetMacro(Optimisation,bool);
-  
+
   /**
    * Get the number of occurences of the given value
    * \return The value.
    */
   unsigned int GetRelationsCount(RCC8ValueType val);
 
-  /** 
+  /**
    * Get number of relations
    * \return The number of relations.
    */
diff --git a/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx b/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx
index ba644aa357..584bad13e9 100644
--- a/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx
+++ b/Code/SpatialReasoning/otbImageMultiSegmentationToRCC8GraphFilter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -30,7 +30,7 @@
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 template <class TInputImage, class TOutputGraph>
@@ -84,7 +84,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
   m_Accumulator[5]=0;
   m_Accumulator[6]=0;
   m_Accumulator[7]=0;
-  
+
   // otbMsgDebugMacro(<<"RCC8GraphFilter: entering GetKnowledge method.");
   // This is the RCC8 composition table
  const int knowledge[8][8]
@@ -103,7 +103,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
   int value = knowledge[r1][r2];
   // Each negative case correspond to a level of knowledge
   if(value>=0)
-    { 
+    {
       // otbMsgDebugMacro(<<"RCC8GraphFilter: leaving GetKnowledge method: FULL");
       return KnowledgeStateType(FULL,static_cast<RCC8ValueType>(value));
     }
@@ -117,7 +117,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
       // otbMsgDebugMacro(<<"RCC8GraphFilter: leaving GetKnowledge method.LEVEL_3");
       return KnowledgeStateType(LEVEL_3,OTB_RCC8_DC);
     }
-  else 
+  else
     {
       // otbMsgDebugMacro(<<"RCC8GraphFilter: leaving GetKnowledge method.NO_INFO");
       return KnowledgeStateType(NO_INFO,OTB_RCC8_DC);
@@ -133,8 +133,8 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
 {
   // Input image list pointer
   InputImageListPointerType segList = this->GetInput();
-  
-  // Ouptut graph pointer 
+
+  // Ouptut graph pointer
   OutputGraphPointerType graph = this->GetOutput();
 
 
@@ -151,13 +151,13 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
 
   typedef itk::MinimumMaximumImageCalculator<InputImageType> MinMaxCalculatorType;
   typedef PolygonToPolygonRCC8Calculator<PathType> RCC8CalculatorType;
-  typedef RCC8VertexIterator<OutputGraphType> VertexIteratorType; 
+  typedef RCC8VertexIterator<OutputGraphType> VertexIteratorType;
   typedef RCC8InEdgeIterator<OutputGraphType> InEdgeIteratorType;
   typedef RCC8OutEdgeIterator<OutputGraphType> OutEdgeIteratorType;
 
     // Vector of label
   std::vector<PixelType> maxLabelVector;
-  
+
   // Vertex indexes
   unsigned int vertexIndex = 0;
   unsigned int segmentationImageIndex = 0;
@@ -189,7 +189,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
 	  simplifier->Update();
 
 	  // Create a new vertex
-	  VertexPointerType vertex = VertexType::New(); 
+	  VertexPointerType vertex = VertexType::New();
 	  // Set its properties
 	  vertex->SetPath(simplifier->GetOutput()->GetNthElement(0));
 	  vertex->SetSegmentationLevel(segmentationImageIndex/2);
@@ -215,13 +215,13 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
 	  //We do not examine each couple because of the RCC8 symmetry
 	  if(vIt1.GetIndex()<vIt2.GetIndex())
 	    {
-	      
+
 	      // Compute the RCC8 relation
 	      typename RCC8CalculatorType::Pointer calc = RCC8CalculatorType::New();
 	      calc->SetPolygon1(vIt1.Get()->GetPath());
 	      calc->SetPolygon2(vIt2.Get()->GetPath());
 	      RCC8ValueType value=OTB_RCC8_DC;
-	      
+
 	      // if the optimisations are activated
 	      if(m_Optimisation)
 		{
@@ -253,7 +253,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
 			      calc->SetLevel1APrioriKnowledge(know.first==LEVEL_1);
 			      calc->SetLevel3APrioriKnowledge(know.first==LEVEL_3);
 			     //  otbMsgDebugMacro(<<"Optimisation loop: knowledge: "<<know.first<<","<<know.second);
-			    }  
+			    }
 			  ++inIt2;
 			}
 		      // If no intermediate was found
@@ -298,7 +298,7 @@ ImageMultiSegmentationToRCC8GraphFilter<TInputImage, TOutputGraph>
 		  otbMsgDevMacro(<<"Adding edge: "<<vIt1.GetIndex()<<" -> "<<vIt2.GetIndex()<<": "<<value);
 		  graph->AddEdge(vIt1.GetIndex(),vIt2.GetIndex(),value);
 		}
-	    }	    
+	    }
 	  progress.CompletedPixel();
 	  progress.CompletedPixel();
 	}
diff --git a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.h b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.h
index 7b3e6e248f..6547c34f81 100644
--- a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.h
+++ b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -29,7 +29,7 @@ namespace otb
  * \class ImageToImageRCC8Calculator
  * \brief This class compute the RCC8 relation between the regions from two segmentation images.
  *
- * The RCC8 system comes from qualitative spatial reasoning. 
+ * The RCC8 system comes from qualitative spatial reasoning.
  * It is a set of pairwise disjoint exhaustive relation between two closed region of space.
  * There are 8 possible relations :
  * DC: Disconnected
@@ -42,11 +42,11 @@ namespace otb
  * EQ: Equivalence
  *
  * The goal of this class is to determine which of these 8 relations link the two inputs regions represented
- * by the segmentation images. Since this class will further be used iteratively on a possibly large set 
- * of region, it is optimised : the decision is managed by a decision tree, and the input data size is reduced 
+ * by the segmentation images. Since this class will further be used iteratively on a possibly large set
+ * of region, it is optimised : the decision is managed by a decision tree, and the input data size is reduced
  * to the smallest set needed to determine the relation.
  */
-template <class TInputImage>            
+template <class TInputImage>
   class ITK_EXPORT ImageToImageRCC8Calculator : public itk::ImageToImageFilter<TInputImage,TInputImage>
 {
 public:
@@ -65,7 +65,7 @@ public:
   typedef typename ImageType::ConstPointer ImageConstPointerType;
   typedef typename ImageType::PixelType    PixelType;
   typedef typename ImageType::IndexType    IndexType;
-  typedef typename ImageType::RegionType   RegionType; 
+  typedef typename ImageType::RegionType   RegionType;
   /** Internal bool image type */
   typedef bool BoolPixelType;
   typedef otb::Image<BoolPixelType,ImageType::ImageDimension> BoolImageType;
@@ -153,7 +153,7 @@ public:
    */
   bool ComputeRelation(bool edgeEdgeBool, bool interExterBool, bool exterInterBool);
   /**
-   * Test if the boolean image is totally black or not. This is a based on the lazy operator 
+   * Test if the boolean image is totally black or not. This is a based on the lazy operator
    * paradigm.
    * \param image The image to test.
    * \return True or false.
@@ -166,7 +166,7 @@ public:
    * \param insideValue The inside value.
    * \return The converted image
    */
-  BoolImagePointerType ConvertToBoolImage(ImagePointerType image, PixelType insideValue); 
+  BoolImagePointerType ConvertToBoolImage(ImagePointerType image, PixelType insideValue);
   /** Main computation method */
   void GenerateData(void);
   /** PrintSelf method */
@@ -195,4 +195,4 @@ public:
 #include "otbImageToImageRCC8Calculator.txx"
 #endif
 
-#endif 
+#endif
diff --git a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx
index 6bf4ec3462..19133175e1 100644
--- a/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx
+++ b/Code/SpatialReasoning/otbImageToImageRCC8Calculator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@
 //TODELETE  #include "itkCastImageFilter.h"
 
 namespace otb
-{     
+{
   /**
    * Constructor
    */
@@ -112,7 +112,7 @@ namespace otb
    */
   template <class TInputImage>
   typename ImageToImageRCC8Calculator<TInputImage>
-  ::RegionType 
+  ::RegionType
   ImageToImageRCC8Calculator<TInputImage>
   ::ComputeMinimalRegion(void)
   {
@@ -135,13 +135,13 @@ namespace otb
     region2=rc->GetRegion();
     // otbMsgDebugMacro(<<"RCC8Calculator->ComputeMinimalRegion() Region1: index: "<<region1.GetIndex()<<" size: "<<region1.GetSize());
     // otbMsgDebugMacro(<<"RCC8Calculator->ComputeMinimalRegion() Region2: index: "<<region2.GetIndex()<<" size: "<<region2.GetSize());
-    
+
   //TODELETE     std::cout<<"RCC8Calculator->ComputeMinimalRegion() Region1: index: "<<region1.GetIndex()<<" size: "<<region1.GetSize()<<std::endl;
  //TODELETE      std::cout<<"RCC8Calculator->ComputeMinimalRegion() Region2: index: "<<region2.GetIndex()<<" size: "<<region2.GetSize()<<std::endl;
 
     typename ImageType::SizeType size;
     typename ImageType::IndexType index;
-    
+
     for(int i=0;i<ImageType::ImageDimension;i++)
       {
 	index[i]=std::min(region1.GetIndex()[i],region2.GetIndex()[i]);
@@ -167,7 +167,7 @@ namespace otb
  */
 template<class TInputImage>
 typename ImageToImageRCC8Calculator<TInputImage>
-::BoolImagePointerType 
+::BoolImagePointerType
 ImageToImageRCC8Calculator<TInputImage>
 ::ConvertToBoolImage(ImagePointerType image, PixelType insideValue)
 {
@@ -180,7 +180,7 @@ ImageToImageRCC8Calculator<TInputImage>
   typename BoolImageType::IndexType boolImageIndex;
   boolImageIndex[0]=m_MinimalROI.GetIndex()[0]-1;
   boolImageIndex[1]=m_MinimalROI.GetIndex()[1]-1;
-  //otbMsgDebugMacro(<<"RCC8Calculator->ConvertToBoolImage() size: "<<boolImageSize<<" index: "<<boolImageIndex);  
+  //otbMsgDebugMacro(<<"RCC8Calculator->ConvertToBoolImage() size: "<<boolImageSize<<" index: "<<boolImageIndex);
 
   typename BoolImageType::RegionType boolRegion;
   boolRegion.SetSize(boolImageSize);
@@ -188,7 +188,7 @@ ImageToImageRCC8Calculator<TInputImage>
   output->SetRegions(boolRegion);
   output->Allocate();
   output->FillBuffer(false);
-  
+
   ConstIterator inputIt(image,m_MinimalROI);
   Iterator outputIt(output,m_MinimalROI);
   inputIt.GoToBegin();
@@ -199,7 +199,7 @@ ImageToImageRCC8Calculator<TInputImage>
       ++inputIt;
       ++outputIt;
     }
-  
+
   return output;
 }
   /**
@@ -207,11 +207,11 @@ ImageToImageRCC8Calculator<TInputImage>
    * \return true if the intersection is not empty.
    */
   template<class TInputImage>
-  bool 
+  bool
   ImageToImageRCC8Calculator<TInputImage>
   ::ComputeEdgeEdgeBool(void)
   {
-    
+
   /// Definition of the Filters used to compute the boolean
     typedef itk::SubtractImageFilter<BoolImageType,BoolImageType,BoolImageType> SubtractFilterType;
     typedef itk::BinaryBallStructuringElement<bool,BoolImageType::ImageDimension> BinaryBallStructuringElementType;
@@ -232,14 +232,14 @@ ImageToImageRCC8Calculator<TInputImage>
     dilateFilter1->SetKernel(structElement1);
     dilateFilter2->SetKernel(structElement2);
     /// The erosion is performed to get the surounding edge of this
-    /// region by substraction to the original image 
+    /// region by substraction to the original image
     dilateFilter1->SetInput(m_BoolImage1);
     dilateFilter1->Update();
     subtractFilter1->SetInput2(m_BoolImage1);
     subtractFilter1->SetInput1(dilateFilter1->GetOutput());
     subtractFilter1->Update();
     /// The erosion is performed to get the surounding edge of this
-    /// region by substraction to the original image 
+    /// region by substraction to the original image
     dilateFilter2->SetInput(m_BoolImage2);
     dilateFilter2->Update();
     subtractFilter2->SetInput2(m_BoolImage2);
@@ -258,7 +258,7 @@ ImageToImageRCC8Calculator<TInputImage>
    * \return true if the intersection is not empty.
    */
   template<class TInputImage>
-  bool 
+  bool
   ImageToImageRCC8Calculator<TInputImage>
   ::ComputeExterInterBool(void)
   {
@@ -283,7 +283,7 @@ ImageToImageRCC8Calculator<TInputImage>
    * \return true if the intersection is not empty.
    */
   template<class TInputImage>
-  bool 
+  bool
   ImageToImageRCC8Calculator<TInputImage>
   ::ComputeInterExterBool(void)
   {
@@ -300,14 +300,14 @@ ImageToImageRCC8Calculator<TInputImage>
     /// The exterior is the inverted input image
     invert->SetMaximum(true);
     invert->SetInput(m_BoolImage2);
-    
+
  //TODELETE     typename CastFilterType::Pointer caster = CastFilterType::New();
   //TODELETE    caster->SetInput(invert->GetOutput());
  //TODELETE     typename WriterType::Pointer writer = WriterType::New();
 //TODELETE      writer->SetFileName("invert.tif");
  //TODELETE     writer->SetInput(caster->GetOutput());
 //TODELETE      writer->Update();
-    
+
     andFilter->SetInput1(m_BoolImage1);
     andFilter->SetInput2(invert->GetOutput());
     andFilter->Update();
@@ -327,7 +327,7 @@ ImageToImageRCC8Calculator<TInputImage>
    * \return true if the intersection is not empty.
    */
   template<class TInputImage>
-  bool 
+  bool
   ImageToImageRCC8Calculator<TInputImage>
   ::ComputeInterInterBool(void)
   {
@@ -354,7 +354,7 @@ ImageToImageRCC8Calculator<TInputImage>
    * \return True if the decision process was successful.
    */
   template<class TInputImage>
-  bool 
+  bool
   ImageToImageRCC8Calculator<TInputImage>
   ::ComputeRelation(bool edgeEdgeBool, bool interExterBool, bool exterInterBool)
   {
@@ -391,13 +391,13 @@ ImageToImageRCC8Calculator<TInputImage>
       }
   }
   /**
-   * Test if the boolean image is totally black or not. This is a based on the lazy operator 
+   * Test if the boolean image is totally black or not. This is a based on the lazy operator
    * paradigm.
    * \param The image to test.
    * \return True or false.
    */
   template<class TInputImage>
-  bool 
+  bool
   ImageToImageRCC8Calculator<TInputImage>
   ::IsBoolImageNotEmpty(BoolImagePointerType image)
   {
@@ -481,7 +481,7 @@ ImageToImageRCC8Calculator<TInputImage>
 	    else
 	      {
 		/// Else it must be computed
-		exterInterBool = ComputeExterInterBool();  
+		exterInterBool = ComputeExterInterBool();
 		// otbMsgDebugMacro(<<"RCC8Calculator->GenerateData(): ExterInter "<<exterInterBool);
 	      }
 	//TODELETE      std::cout<<"RCC8Calculator->GenerateData(): ExterInter "<<exterInterBool<<std::endl;
diff --git a/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.h b/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.h
index 26963401ad..78c3c6b678 100644
--- a/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.h
+++ b/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ namespace otb
  * \class PolygonToPolygonRCC8Calculator
  * \brief This class compute the RCC8 relation between the regions from two segmentation images.
  *
- * The RCC8 system comes from qualitative spatial reasoning. 
+ * The RCC8 system comes from qualitative spatial reasoning.
  * It is a set of pairwise disjoint exhaustive relation between two closed region of space.
  * There are 8 possible relations :
  * DC: Disconnected
@@ -41,10 +41,10 @@ namespace otb
  * EQ: Equivalence
  *
  * The goal of this class is to determine which of these 8 relations link the two inputs regions represented
- * by the closed input path. Since this class will further be used iteratively on a possibly large set 
+ * by the closed input path. Since this class will further be used iteratively on a possibly large set
  * of regiosn, it is optimised : the decision is managed by a decision tree.
  */
-template <class TInputPolygon>            
+template <class TInputPolygon>
   class ITK_EXPORT PolygonToPolygonRCC8Calculator : public itk::Object
 {
 public:
@@ -80,24 +80,24 @@ public:
   itkSetMacro(Level3APrioriKnowledge,bool);
   itkGetMacro(Level1APrioriKnowledge,bool);
   itkGetMacro(Level3APrioriKnowledge,bool);
- 
+
   itkSetObjectMacro(Polygon1,PolygonType);
   itkSetObjectMacro(Polygon2,PolygonType);
   itkGetObjectMacro(Polygon1,PolygonType);
   itkGetObjectMacro(Polygon2,PolygonType);
-  
+
   /** Main computation method */
   void Compute(void);
-  
+
   virtual bool ComputeRelation(bool edgeEdgeBool, bool interExterBool, bool exterInterBool);
 
   virtual bool ComputeInterExter(PolygonPointerType path1,PolygonPointerType path2);
 
   virtual bool ComputeEdgeEdge(PolygonPointerType path1, PolygonPointerType path2);
-  
+
   virtual bool ComputeInterInter(PolygonPointerType path1, PolygonPointerType path2);
 
-  
+
   protected:
   /** Constructor */
   PolygonToPolygonRCC8Calculator();
@@ -127,4 +127,4 @@ public:
 #include "otbPolygonToPolygonRCC8Calculator.txx"
 #endif
 
-#endif 
+#endif
diff --git a/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx b/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx
index cabb79f1fd..3578486158 100644
--- a/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx
+++ b/Code/SpatialReasoning/otbPolygonToPolygonRCC8Calculator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@
 #include "otbMacro.h"
 
 namespace otb
-{     
+{
 /**
  * Constructor
  */
@@ -68,9 +68,9 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
       /// Else it must be computed
       interExterBool = ComputeInterExter(m_Polygon1,m_Polygon2);
     }
-  
+
   //std::cout<<"InterExter: "<<interExterBool<<std::endl;
- 
+
   /// At this stage we can determine if the relation is of type NTPP
   if((!interExterBool)&&(!edgeEdgeBool))
     {
@@ -88,7 +88,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
       else
 	{
 	  /// Else it must be computed
-	  exterInterBool = ComputeInterExter(m_Polygon2,m_Polygon1);  
+	  exterInterBool = ComputeInterExter(m_Polygon2,m_Polygon1);
 	}
 
       //std::cout<<"ExterInter: "<<exterInterBool<<std::endl;
@@ -114,7 +114,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
     }
 }
 template<class TInputPolygon>
-bool 
+bool
 PolygonToPolygonRCC8Calculator<TInputPolygon>
 ::ComputeRelation(bool edgeEdgeBool, bool interExterBool, bool exterInterBool)
 {
@@ -158,7 +158,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
   bool resp = false;
   VertexListConstIteratorType it = polygon1->GetVertexList()->Begin();
   VertexListConstIteratorType it_end = polygon1->GetVertexList()->End();
- 
+
   ContinuousIndexType current = it.Value();
   ContinuousIndexType first = current;
   bool isInside = polygon2->IsInside(current);
@@ -237,14 +237,14 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
 	}
        currentIsInside =nextIsInside;
        current = it.Value();
-       
+
        if(currentIsInside)
 	 {
 	   resp = true;
 	 }
       ++it;
     }
-  
+
     if (!resp && !currentIsInside && !firstIsInside && !polygon2->IsOnEdge(current) && !polygon2->IsOnEdge(first))
 	{
 	  unsigned int nbCrossings = polygon2->NbCrossing(current,first);
@@ -265,9 +265,9 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
   ContinuousIndexType current = it.Value();
   resp = polygon2->IsOnEdge(current);
   //std::cout<<"IsOnEdge: "<<current<<": "<<polygon2->IsOnEdge(current)<<std::endl;
-  ContinuousIndexType first = current; 
+  ContinuousIndexType first = current;
   ++it;
-  
+
   while (! resp && it != it_end)
     {
       if(polygon2->NbTouching(current,it.Value())>0)
@@ -281,7 +281,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
 	  //std::cout<<"NbTouching: "<<current<<" -> "<<it.Value()<<": "<<polygon2->NbTouching(current,it.Value())<<std::endl;
 	}
       current = it.Value();
-      
+
       if(polygon2->IsOnEdge(current))
 	{
 	  resp = true;
@@ -299,7 +299,7 @@ PolygonToPolygonRCC8Calculator<TInputPolygon>
       resp = true;
       //std::cout<<"NbTouching: "<<current<<" -> "<<first<<": "<<polygon2->NbTouching(current,first)<<std::endl;
     }
- 
+
   return resp;
 }
 /**
diff --git a/Code/SpatialReasoning/otbRCC8Edge.cxx b/Code/SpatialReasoning/otbRCC8Edge.cxx
index 7874fe0eb6..c226a2ee0c 100644
--- a/Code/SpatialReasoning/otbRCC8Edge.cxx
+++ b/Code/SpatialReasoning/otbRCC8Edge.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
diff --git a/Code/SpatialReasoning/otbRCC8Edge.h b/Code/SpatialReasoning/otbRCC8Edge.h
index 89be39e2b1..1d8db9010a 100644
--- a/Code/SpatialReasoning/otbRCC8Edge.h
+++ b/Code/SpatialReasoning/otbRCC8Edge.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
diff --git a/Code/SpatialReasoning/otbRCC8EdgeIterator.h b/Code/SpatialReasoning/otbRCC8EdgeIterator.h
index c7189f908d..3ee3fdb5f5 100644
--- a/Code/SpatialReasoning/otbRCC8EdgeIterator.h
+++ b/Code/SpatialReasoning/otbRCC8EdgeIterator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
  * \brief Iterates on the graph edges.
  */
 template <class TGraph>
-class ITK_EXPORT RCC8EdgeIterator 
+class ITK_EXPORT RCC8EdgeIterator
 {
  public:
   /** self typedef */
@@ -47,7 +47,7 @@ class ITK_EXPORT RCC8EdgeIterator
   typedef typename boost::property_map<InternalGraphType, boost::vertex_index_t>::type IndexMapType;
 
   /** Constructor */
-  RCC8EdgeIterator();  
+  RCC8EdgeIterator();
    /** Copy constructor */
    RCC8EdgeIterator(const Self& iter);
    /**  Constructor with input graph */
@@ -77,8 +77,8 @@ class ITK_EXPORT RCC8EdgeIterator
    * \return The target vertex index.
    */
   VertexDescriptorType GetTargetIndex(void);
- 
-   /** 
+
+   /**
     * Return true if the iterator is at the end.
     * \return True if the iterator is at the end.
     */
diff --git a/Code/SpatialReasoning/otbRCC8EdgeIterator.txx b/Code/SpatialReasoning/otbRCC8EdgeIterator.txx
index ab6315ad2b..249c47ad67 100644
--- a/Code/SpatialReasoning/otbRCC8EdgeIterator.txx
+++ b/Code/SpatialReasoning/otbRCC8EdgeIterator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -41,12 +41,12 @@ namespace otb
     m_Graph=iter.m_Graph;
     m_End=iter.m_End;
   }
-  /**  
-   *Constructor with input graph 
+  /**
+   *Constructor with input graph
    */
   template <class TGraph>
   RCC8EdgeIterator<TGraph>
-  ::RCC8EdgeIterator(TGraph * graph) 
+  ::RCC8EdgeIterator(TGraph * graph)
   {
     m_Graph=graph;
     tie(m_Iter,m_End)=edges(*m_Graph->GetGraph());
@@ -57,7 +57,7 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8EdgeIterator<TGraph>
-  ::RCC8ValueType 
+  ::RCC8ValueType
   RCC8EdgeIterator<TGraph>
   ::GetValue(void)
   {
@@ -69,11 +69,11 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8EdgeIterator<TGraph>
-  ::VertexPointerType 
+  ::VertexPointerType
   RCC8EdgeIterator<TGraph>
   ::GetSourceVertex(void)
   {
-    return (*m_Graph->GetGraph())[source(*m_Iter,(*m_Graph->GetGraph()))]; 
+    return (*m_Graph->GetGraph())[source(*m_Iter,(*m_Graph->GetGraph()))];
   }
   /**
    * Return the target vertex of the current edge.
@@ -81,11 +81,11 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8EdgeIterator<TGraph>
-  ::VertexPointerType 
+  ::VertexPointerType
   RCC8EdgeIterator<TGraph>
   ::GetTargetVertex(void)
   {
-    return (*m_Graph->GetGraph())[target(*m_Iter,(*m_Graph->GetGraph()))];    
+    return (*m_Graph->GetGraph())[target(*m_Iter,(*m_Graph->GetGraph()))];
   }
   /**
    * Return the source vertex index of the current edge.
@@ -93,12 +93,12 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8EdgeIterator<TGraph>
-  ::VertexDescriptorType 
+  ::VertexDescriptorType
   RCC8EdgeIterator<TGraph>
   ::GetSourceIndex(void)
   {
     IndexMapType index = get(boost::vertex_index, (*m_Graph->GetGraph()));
-    return index[source(*m_Iter,(*m_Graph->GetGraph()))]; 
+    return index[source(*m_Iter,(*m_Graph->GetGraph()))];
   }
   /**
    * Return the target vertex index of the current edge.
@@ -106,14 +106,14 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8EdgeIterator<TGraph>
-  ::VertexDescriptorType 
+  ::VertexDescriptorType
   RCC8EdgeIterator<TGraph>
   ::GetTargetIndex(void)
   {
     IndexMapType index = get(boost::vertex_index,(*m_Graph->GetGraph()));
-    return index[target(*m_Iter,(*m_Graph->GetGraph()))];    
+    return index[target(*m_Iter,(*m_Graph->GetGraph()))];
   }
-  /** 
+  /**
    * Return true if the iterator is at the end.
    * \return True if the iterator is at the end.
    */
@@ -128,7 +128,7 @@ namespace otb
    * Go to the beginning.
    */
   template <class TGraph>
-  void 
+  void
   RCC8EdgeIterator<TGraph>
   ::GoToBegin(void)
   {
@@ -138,11 +138,11 @@ namespace otb
    * Increment.
    */
   template <class TGraph>
-  typename RCC8EdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8EdgeIterator<TGraph>
+  ::Self&
   RCC8EdgeIterator<TGraph>
   ::operator++()
-  { 
+  {
     ++m_Iter;
     return *this;
   }
@@ -150,20 +150,20 @@ namespace otb
    * Decrement.
    */
   template <class TGraph>
-  typename RCC8EdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8EdgeIterator<TGraph>
+  ::Self&
   RCC8EdgeIterator<TGraph>
   ::operator--()
   {
     --m_Iter;
     return *this;
-  } 
+  }
   /**
    * Add
    */
   template <class TGraph>
-  typename RCC8EdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8EdgeIterator<TGraph>
+  ::Self&
   RCC8EdgeIterator<TGraph>
   ::operator+(int i)
   {
@@ -174,8 +174,8 @@ namespace otb
    * Remove
    */
   template <class TGraph>
-  typename RCC8EdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8EdgeIterator<TGraph>
+  ::Self&
   RCC8EdgeIterator<TGraph>
   ::operator-(int i)
   {
@@ -186,7 +186,7 @@ namespace otb
    * Difference comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8EdgeIterator<TGraph>
   ::operator!=(const Self& iter)
   {
@@ -196,7 +196,7 @@ namespace otb
    * Equality comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8EdgeIterator<TGraph>
   ::operator==(const Self& iter)
   {
@@ -206,8 +206,8 @@ namespace otb
    * Instantiation operator.
    */
   template <class TGraph>
-  typename RCC8EdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8EdgeIterator<TGraph>
+  ::Self&
   RCC8EdgeIterator<TGraph>
   ::operator=(const Self& iter)
   {
diff --git a/Code/SpatialReasoning/otbRCC8Graph.h b/Code/SpatialReasoning/otbRCC8Graph.h
index 15b1dd659f..2bbdb1153f 100644
--- a/Code/SpatialReasoning/otbRCC8Graph.h
+++ b/Code/SpatialReasoning/otbRCC8Graph.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -40,7 +40,7 @@ namespace otb
  * applications, one should provide a patch for this class including
  * the new functionnalities, for consistency reason.
  */
-template <class TVertex>  
+template <class TVertex>
 class ITK_EXPORT RCC8Graph  :
     public itk::DataObject
 {
@@ -72,7 +72,7 @@ class ITK_EXPORT RCC8Graph  :
   /** Getters and Setters for the number of vertices */
   itkSetMacro(NumberOfVertices,unsigned int);
   itkGetConstReferenceMacro(NumberOfVertices,unsigned int);
-  
+
   /**
    *  Return the internal boost graph object.
    *  \return The internal boost graph object
@@ -98,7 +98,7 @@ class ITK_EXPORT RCC8Graph  :
   VertexPointerType GetVertex(unsigned int index);
   /**
    * Add an edge in the graph.
-   * \param index1 The index of the source vertex. 
+   * \param index1 The index of the source vertex.
    * \param index2 The index of the target vertex.
    * \param r The RCC8 value.
    */
@@ -121,9 +121,9 @@ protected:
      * \param num The index of the last vertices to intialize.
      */
     void Initialize( unsigned int num);
-    
+
 private:
-  
+
   /** Defines the number of vertices (ie total number of segmentation regions)*/
   unsigned int m_NumberOfVertices;
   /** Internal representation using the boost graph library */
diff --git a/Code/SpatialReasoning/otbRCC8Graph.txx b/Code/SpatialReasoning/otbRCC8Graph.txx
index 2a8b50faaa..1fb078fb80 100644
--- a/Code/SpatialReasoning/otbRCC8Graph.txx
+++ b/Code/SpatialReasoning/otbRCC8Graph.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -20,8 +20,8 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  /** 
-   * Constructor 
+  /**
+   * Constructor
    */
   template <class TVertex>
   RCC8Graph<TVertex>
@@ -35,7 +35,7 @@ namespace otb
    * once this parameter is set.
    */
   template <class TVertex>
-  void 
+  void
   RCC8Graph<TVertex>
   ::Build(void)
   {
@@ -46,7 +46,7 @@ namespace otb
    * \param num The index of the last vertices to intialize.
    */
   template <class TVertex>
-  void 
+  void
   RCC8Graph<TVertex>
   ::Initialize( unsigned int num)
   {
@@ -91,7 +91,7 @@ namespace otb
   }
   /**
    * Add an edge in the graph.
-   * \param index1 The index of the source vertex. 
+   * \param index1 The index of the source vertex.
    * \param index2 The index of the target vertex.
    * \param r The rcc8 value associated to the edge.
    */
diff --git a/Code/SpatialReasoning/otbRCC8GraphFileReader.h b/Code/SpatialReasoning/otbRCC8GraphFileReader.h
index 047252695d..6aa2864e35 100644
--- a/Code/SpatialReasoning/otbRCC8GraphFileReader.h
+++ b/Code/SpatialReasoning/otbRCC8GraphFileReader.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,23 +24,23 @@
 namespace otb
 {
 /** \class RCC8GraphFileReaderException
- * \brief Base exception class for IO problems during reading. 
- */ 
-class ITK_EXPORT RCC8GraphFileReaderException 
-  : public itk::ExceptionObject 
+ * \brief Base exception class for IO problems during reading.
+ */
+class ITK_EXPORT RCC8GraphFileReaderException
+  : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro( RCC8GraphFileReaderException, ExceptionObject );
 
   /** Constructor. */
-  RCC8GraphFileReaderException(const char *file, unsigned int line, 
+  RCC8GraphFileReaderException(const char *file, unsigned int line,
                            const char* message = "Error in IO",
-                           const char* loc = "Unknown" ) : 
+                           const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {}
   /** Constructor. */
-  RCC8GraphFileReaderException(const std::string &file, unsigned int line, 
+  RCC8GraphFileReaderException(const std::string &file, unsigned int line,
                            const char* message = "Error in IO",
                            const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
@@ -50,8 +50,8 @@ public:
  * \class RCC8GraphFileReader
  * \brief This class reads a RCC8 graph from a .dot file (graphviz format).
  *
- * The parsing algorithm reads the lines from the file, deciding if the line is 
- * a vertex or edge line. It then call the correct parse method between ParseEdge 
+ * The parsing algorithm reads the lines from the file, deciding if the line is
+ * a vertex or edge line. It then call the correct parse method between ParseEdge
  * and ParseVertex. The ParseVertex use builds an AttributesMap and pass it to a new
  * vertex.
  *
@@ -100,10 +100,10 @@ protected:
    * \param line The line to parse.
    */
   void  ParseVertex(std::string line);
-  
+
   /** PrintSelf method */
   virtual void PrintSelf(std::ostream& os, itk::Indent indent) const;
-  
+
  private:
   /** File name */
   std::string m_FileName;
@@ -113,4 +113,4 @@ protected:
 #include "otbRCC8GraphFileReader.txx"
 #endif
 
-#endif 
+#endif
diff --git a/Code/SpatialReasoning/otbRCC8GraphFileReader.txx b/Code/SpatialReasoning/otbRCC8GraphFileReader.txx
index fb58d49ccc..b16aebb264 100644
--- a/Code/SpatialReasoning/otbRCC8GraphFileReader.txx
+++ b/Code/SpatialReasoning/otbRCC8GraphFileReader.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -104,13 +104,13 @@ template <class TOutputGraph>
 void
 RCC8GraphFileReader<TOutputGraph>
 ::GenerateData()
-{  
+{
   std::ifstream fin;
   std::string line;
-  
+
   // open file input stream
   fin.open(m_FileName.c_str());
-  
+
   // Test if the file has been opened correctly
   if(!fin)
     {
diff --git a/Code/SpatialReasoning/otbRCC8GraphFileWriter.h b/Code/SpatialReasoning/otbRCC8GraphFileWriter.h
index 6d074f7572..606536691c 100644
--- a/Code/SpatialReasoning/otbRCC8GraphFileWriter.h
+++ b/Code/SpatialReasoning/otbRCC8GraphFileWriter.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,43 +25,43 @@
 namespace otb
 {
 /** \class RCC8GraphFileWriterException
- * \brief Base exception class for IO problems during writing. 
- */ 
-class ITK_EXPORT RCC8GraphFileWriterException 
-  : public itk::ExceptionObject 
+ * \brief Base exception class for IO problems during writing.
+ */
+class ITK_EXPORT RCC8GraphFileWriterException
+  : public itk::ExceptionObject
 {
 public:
   /** Run-time information. */
   itkTypeMacro( RCC8GraphFileWriterException, ExceptionObject );
 
   /** Constructor. */
-  RCC8GraphFileWriterException(const char *file, unsigned int line, 
+  RCC8GraphFileWriterException(const char *file, unsigned int line,
                            const char* message = "Error in IO",
-                           const char* loc = "Unknown" ) : 
+                           const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {}
   /** Constructor. */
-  RCC8GraphFileWriterException(const std::string &file, unsigned int line, 
+  RCC8GraphFileWriterException(const std::string &file, unsigned int line,
                            const char* message = "Error in IO",
                            const char* loc = "Unknown" ) :
     ExceptionObject(file, line, message, loc)
   {}
 };
 /**
- * \class RCC8GraphFileWriter 
+ * \class RCC8GraphFileWriter
  * \brief This class writes a RCC8 Graph to a dot file (graphviz file format).
- * 
- * The writer first loops on the vertices of the graph, getting the property map 
+ *
+ * The writer first loops on the vertices of the graph, getting the property map
  * from each vertex and printing it in a line.
  *
- * It then iterates on the edges of the graphs, printing source index, target index, 
- * and RCC8 value in a line for each of them. 
+ * It then iterates on the edges of the graphs, printing source index, target index,
+ * and RCC8 value in a line for each of them.
  *
  * \sa RCC8GraphFileReader
  * \sa RCC8Graph
  */
-template <class TInputGraph> 
-class ITK_EXPORT RCC8GraphFileWriter 
+template <class TInputGraph>
+class ITK_EXPORT RCC8GraphFileWriter
   : public itk::ProcessObject
 {
 public:
@@ -115,7 +115,7 @@ protected:
   * Write Method.
   * Performs checkings and invoke GenerateData().
   */
-  virtual void Write(void);  
+  virtual void Write(void);
   /**
    * Write an edge to file.
    * \param of The output file stream.
@@ -148,4 +148,4 @@ private:
 #include "otbRCC8GraphFileWriter.txx"
 #endif
 
-#endif 
+#endif
diff --git a/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx b/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx
index 597ab592f9..d2c61e0bca 100644
--- a/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx
+++ b/Code/SpatialReasoning/otbRCC8GraphFileWriter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -49,7 +49,7 @@ RCC8GraphFileWriter<TInputGraph>
  * \param inputGraph The graph to write.
  */
 template <class TInputGraph>
-void 
+void
 RCC8GraphFileWriter<TInputGraph>
 ::SetInput(const InputGraphType * graph)
 {
@@ -61,7 +61,7 @@ RCC8GraphFileWriter<TInputGraph>
  */
 template <class TInputGraph>
 typename RCC8GraphFileWriter<TInputGraph>
-::InputGraphPointerType 
+::InputGraphPointerType
 RCC8GraphFileWriter<TInputGraph>
 ::GetInput(void)
 {
@@ -114,14 +114,14 @@ RCC8GraphFileWriter<TInputGraph>
  * Main computation method.
  */
 template <class TInputGraph>
-void 
+void
 RCC8GraphFileWriter<TInputGraph>
 ::GenerateData()
-{ 
+{
   otbMsgDevMacro(<<"RCC8GraphFileWriter: GenerateData call");
   // input graph pointer
   InputGraphPointerType input = this->GetInput();
-  
+
   // iterators typedefs
   typedef otb::RCC8VertexIterator<InputGraphType> VertexIteratorType;
   typedef otb::RCC8EdgeIterator<InputGraphType> EdgeIteratorType;
@@ -143,7 +143,7 @@ RCC8GraphFileWriter<TInputGraph>
       throw e;
       return;
     }
-  
+
   // Start writing the graph to file
   out<<"digraph G {"<<std::endl;
 
@@ -217,7 +217,7 @@ RCC8GraphFileWriter<TInputGraph>
       else
 	{
 	  of<<",";
-	} 
+	}
     }
 }
 /**
diff --git a/Code/SpatialReasoning/otbRCC8GraphSource.h b/Code/SpatialReasoning/otbRCC8GraphSource.h
index 235a833614..f28a414be9 100644
--- a/Code/SpatialReasoning/otbRCC8GraphSource.h
+++ b/Code/SpatialReasoning/otbRCC8GraphSource.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -43,7 +43,7 @@ public:
   itkTypeMacro(RCC8GraphSource,itk::ProcessObject);
   /** Data object pointer type */
   typedef itk::DataObject::Pointer DataObjectPointer;
-  /** Template parameter typedef*/ 
+  /** Template parameter typedef*/
   typedef TOutputGraph                               OutputGraphType;
   typedef typename OutputGraphType::Pointer          OutputGraphPointerType;
    /** Overiding of the GetOutput() method */
@@ -59,7 +59,7 @@ protected:
 
 private:
   RCC8GraphSource(const Self&);//purposely not implemented
-  void operator=(const Self&); //purposely not implemented 
+  void operator=(const Self&); //purposely not implemented
 };
 } // End namespace otb
 
diff --git a/Code/SpatialReasoning/otbRCC8GraphSource.txx b/Code/SpatialReasoning/otbRCC8GraphSource.txx
index c0f4070fbb..3db37c9f2a 100644
--- a/Code/SpatialReasoning/otbRCC8GraphSource.txx
+++ b/Code/SpatialReasoning/otbRCC8GraphSource.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
diff --git a/Code/SpatialReasoning/otbRCC8InEdgeIterator.h b/Code/SpatialReasoning/otbRCC8InEdgeIterator.h
index 3409507c97..95dbacae86 100644
--- a/Code/SpatialReasoning/otbRCC8InEdgeIterator.h
+++ b/Code/SpatialReasoning/otbRCC8InEdgeIterator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
  * \brief Iterates on the graph in edges from a vertex.
  */
 template <class TGraph>
-class ITK_EXPORT RCC8InEdgeIterator 
+class ITK_EXPORT RCC8InEdgeIterator
 {
  public:
   /** self typedef */
@@ -47,7 +47,7 @@ class ITK_EXPORT RCC8InEdgeIterator
   typedef typename boost::property_map<InternalGraphType, boost::vertex_index_t>::type IndexMapType;
 
   /** Constructor */
-  RCC8InEdgeIterator();  
+  RCC8InEdgeIterator();
    /** Copy constructor */
    RCC8InEdgeIterator(const Self& iter);
    /**  Constructor with input graph */
@@ -66,8 +66,8 @@ class ITK_EXPORT RCC8InEdgeIterator
    * Return the source vertex index of the current edge.
    * \return The souce vertex index.
    */
-  VertexDescriptorType GetSourceIndex(void); 
-   /** 
+  VertexDescriptorType GetSourceIndex(void);
+   /**
     * Return true if the iterator is at the end.
     * \return True if the iterator is at the end.
     */
diff --git a/Code/SpatialReasoning/otbRCC8InEdgeIterator.txx b/Code/SpatialReasoning/otbRCC8InEdgeIterator.txx
index 29de019d32..502b1a4286 100644
--- a/Code/SpatialReasoning/otbRCC8InEdgeIterator.txx
+++ b/Code/SpatialReasoning/otbRCC8InEdgeIterator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -42,12 +42,12 @@ namespace otb
     m_VertexIndex = iter.m_VertexIndex;
     m_End=iter.m_End;
   }
-  /**  
-   *Constructor with input graph 
+  /**
+   *Constructor with input graph
    */
   template <class TGraph>
   RCC8InEdgeIterator<TGraph>
-  ::RCC8InEdgeIterator(VertexDescriptorType vertex,GraphType * graph) 
+  ::RCC8InEdgeIterator(VertexDescriptorType vertex,GraphType * graph)
   {
     m_Graph=graph;
     m_VertexIndex=vertex;
@@ -59,7 +59,7 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8InEdgeIterator<TGraph>
-  ::RCC8ValueType 
+  ::RCC8ValueType
   RCC8InEdgeIterator<TGraph>
   ::GetValue(void)
   {
@@ -71,11 +71,11 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8InEdgeIterator<TGraph>
-  ::VertexPointerType 
+  ::VertexPointerType
   RCC8InEdgeIterator<TGraph>
   ::GetSourceVertex(void)
   {
-    return (*m_Graph->GetGraph())[source(*m_Iter,(*m_Graph->GetGraph()))]; 
+    return (*m_Graph->GetGraph())[source(*m_Iter,(*m_Graph->GetGraph()))];
   }
   /**
    * Return the source vertex index of the current edge.
@@ -83,14 +83,14 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8InEdgeIterator<TGraph>
-  ::VertexDescriptorType 
+  ::VertexDescriptorType
   RCC8InEdgeIterator<TGraph>
   ::GetSourceIndex(void)
   {
     IndexMapType index = get(boost::vertex_index, (*m_Graph->GetGraph()));
-    return index[source(*m_Iter,(*m_Graph->GetGraph()))]; 
+    return index[source(*m_Iter,(*m_Graph->GetGraph()))];
   }
-  /** 
+  /**
    * Return true if the iterator is at the end.
    * \return True if the iterator is at the end.
    */
@@ -105,7 +105,7 @@ namespace otb
    * Go to the beginning.
    */
   template <class TGraph>
-  void 
+  void
   RCC8InEdgeIterator<TGraph>
   ::GoToBegin(void)
   {
@@ -115,11 +115,11 @@ namespace otb
    * Increment.
    */
   template <class TGraph>
-  typename RCC8InEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8InEdgeIterator<TGraph>
+  ::Self&
   RCC8InEdgeIterator<TGraph>
   ::operator++()
-  { 
+  {
     ++m_Iter;
     return *this;
   }
@@ -127,20 +127,20 @@ namespace otb
    * Decrement.
    */
   template <class TGraph>
-  typename RCC8InEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8InEdgeIterator<TGraph>
+  ::Self&
   RCC8InEdgeIterator<TGraph>
   ::operator--()
   {
     --m_Iter;
     return *this;
-  } 
+  }
   /**
    * Add
    */
   template <class TGraph>
-  typename RCC8InEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8InEdgeIterator<TGraph>
+  ::Self&
   RCC8InEdgeIterator<TGraph>
   ::operator+(int i)
   {
@@ -151,8 +151,8 @@ namespace otb
    * Remove
    */
   template <class TGraph>
-  typename RCC8InEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8InEdgeIterator<TGraph>
+  ::Self&
   RCC8InEdgeIterator<TGraph>
   ::operator-(int i)
   {
@@ -163,7 +163,7 @@ namespace otb
    * Difference comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8InEdgeIterator<TGraph>
   ::operator!=(const Self& iter)
   {
@@ -173,7 +173,7 @@ namespace otb
    * Equality comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8InEdgeIterator<TGraph>
   ::operator==(const Self& iter)
   {
@@ -183,8 +183,8 @@ namespace otb
    * Instantiation operator.
    */
   template <class TGraph>
-  typename RCC8InEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8InEdgeIterator<TGraph>
+  ::Self&
   RCC8InEdgeIterator<TGraph>
   ::operator=(const Self& iter)
   {
diff --git a/Code/SpatialReasoning/otbRCC8OutEdgeIterator.h b/Code/SpatialReasoning/otbRCC8OutEdgeIterator.h
index a8defa7178..4e6323f431 100644
--- a/Code/SpatialReasoning/otbRCC8OutEdgeIterator.h
+++ b/Code/SpatialReasoning/otbRCC8OutEdgeIterator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
  * \brief Iterates on the graph out edges from a vertex.
  */
 template <class TGraph>
-class ITK_EXPORT RCC8OutEdgeIterator 
+class ITK_EXPORT RCC8OutEdgeIterator
 {
  public:
   /** self typedef */
@@ -47,7 +47,7 @@ class ITK_EXPORT RCC8OutEdgeIterator
   typedef typename boost::property_map<InternalGraphType, boost::vertex_index_t>::type IndexMapType;
 
   /** Constructor */
-  RCC8OutEdgeIterator();  
+  RCC8OutEdgeIterator();
    /** Copy constructor */
    RCC8OutEdgeIterator(const Self& iter);
    /**  Constructor with input graph */
@@ -67,8 +67,8 @@ class ITK_EXPORT RCC8OutEdgeIterator
    * \return The target vertex index.
    */
   VertexDescriptorType GetTargetIndex(void);
- 
-   /** 
+
+   /**
     * Return true if the iterator is at the end.
     * \return True if the iterator is at the end.
     */
diff --git a/Code/SpatialReasoning/otbRCC8OutEdgeIterator.txx b/Code/SpatialReasoning/otbRCC8OutEdgeIterator.txx
index 078e947a87..7cf88c3f91 100644
--- a/Code/SpatialReasoning/otbRCC8OutEdgeIterator.txx
+++ b/Code/SpatialReasoning/otbRCC8OutEdgeIterator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -42,12 +42,12 @@ namespace otb
     m_VertexIndex = iter.m_VertexIndex;
     m_End=iter.m_End;
   }
-  /**  
-   *Constructor with input graph 
+  /**
+   *Constructor with input graph
    */
   template <class TGraph>
   RCC8OutEdgeIterator<TGraph>
-  ::RCC8OutEdgeIterator(VertexDescriptorType vertex,TGraph * graph) 
+  ::RCC8OutEdgeIterator(VertexDescriptorType vertex,TGraph * graph)
   {
     m_Graph=graph;
     m_VertexIndex = vertex;
@@ -59,7 +59,7 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8OutEdgeIterator<TGraph>
-  ::RCC8ValueType 
+  ::RCC8ValueType
   RCC8OutEdgeIterator<TGraph>
   ::GetValue(void)
   {
@@ -71,11 +71,11 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8OutEdgeIterator<TGraph>
-  ::VertexPointerType 
+  ::VertexPointerType
   RCC8OutEdgeIterator<TGraph>
   ::GetTargetVertex(void)
   {
-    return (*m_Graph->GetGraph())[target(*m_Iter,(*m_Graph->GetGraph()))];    
+    return (*m_Graph->GetGraph())[target(*m_Iter,(*m_Graph->GetGraph()))];
   }
   /**
    * Return the target vertex index of the current edge.
@@ -83,14 +83,14 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8OutEdgeIterator<TGraph>
-  ::VertexDescriptorType 
+  ::VertexDescriptorType
   RCC8OutEdgeIterator<TGraph>
   ::GetTargetIndex(void)
   {
     IndexMapType index = get(boost::vertex_index,(*m_Graph->GetGraph()));
-    return index[target(*m_Iter,(*m_Graph->GetGraph()))];    
+    return index[target(*m_Iter,(*m_Graph->GetGraph()))];
   }
-  /** 
+  /**
    * Return true if the iterator is at the end.
    * \return True if the iterator is at the end.
    */
@@ -105,7 +105,7 @@ namespace otb
    * Go to the beginning.
    */
   template <class TGraph>
-  void 
+  void
   RCC8OutEdgeIterator<TGraph>
   ::GoToBegin(void)
   {
@@ -115,11 +115,11 @@ namespace otb
    * Increment.
    */
   template <class TGraph>
-  typename RCC8OutEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8OutEdgeIterator<TGraph>
+  ::Self&
   RCC8OutEdgeIterator<TGraph>
   ::operator++()
-  { 
+  {
     ++m_Iter;
     return *this;
   }
@@ -127,20 +127,20 @@ namespace otb
    * Decrement.
    */
   template <class TGraph>
-  typename RCC8OutEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8OutEdgeIterator<TGraph>
+  ::Self&
   RCC8OutEdgeIterator<TGraph>
   ::operator--()
   {
     --m_Iter;
     return *this;
-  } 
+  }
   /**
    * Add
    */
   template <class TGraph>
-  typename RCC8OutEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8OutEdgeIterator<TGraph>
+  ::Self&
   RCC8OutEdgeIterator<TGraph>
   ::operator+(int i)
   {
@@ -151,8 +151,8 @@ namespace otb
    * Remove
    */
   template <class TGraph>
-  typename RCC8OutEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8OutEdgeIterator<TGraph>
+  ::Self&
   RCC8OutEdgeIterator<TGraph>
   ::operator-(int i)
   {
@@ -163,7 +163,7 @@ namespace otb
    * Difference comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8OutEdgeIterator<TGraph>
   ::operator!=(const Self& iter)
   {
@@ -173,7 +173,7 @@ namespace otb
    * Equality comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8OutEdgeIterator<TGraph>
   ::operator==(const Self& iter)
   {
@@ -183,8 +183,8 @@ namespace otb
    * Instantiation operator.
    */
   template <class TGraph>
-  typename RCC8OutEdgeIterator<TGraph> 
-  ::Self& 
+  typename RCC8OutEdgeIterator<TGraph>
+  ::Self&
   RCC8OutEdgeIterator<TGraph>
   ::operator=(const Self& iter)
   {
diff --git a/Code/SpatialReasoning/otbRCC8Value.h b/Code/SpatialReasoning/otbRCC8Value.h
index c306fc0962..70e4d49946 100644
--- a/Code/SpatialReasoning/otbRCC8Value.h
+++ b/Code/SpatialReasoning/otbRCC8Value.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,12 +25,12 @@ typedef enum {
 OTB_RCC8_DC,
 OTB_RCC8_EC,
 OTB_RCC8_PO,
-OTB_RCC8_TPP,       
+OTB_RCC8_TPP,
 OTB_RCC8_TPPI,
 OTB_RCC8_NTPP,
 OTB_RCC8_NTPPI,
 OTB_RCC8_EQ
-} 
-RCC8Value; 
-}// End namespace otb 
+}
+RCC8Value;
+}// End namespace otb
 #endif
diff --git a/Code/SpatialReasoning/otbRCC8VertexBase.h b/Code/SpatialReasoning/otbRCC8VertexBase.h
index b7db068a1b..db59eb6965 100644
--- a/Code/SpatialReasoning/otbRCC8VertexBase.h
+++ b/Code/SpatialReasoning/otbRCC8VertexBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,14 +26,14 @@ namespace otb
 {
 /** \class RCC8VertexBase
  *  \brief Base class to represent a vertex in a RCC8 Graph.
- *  
+ *
  *  This class can be derived to add attributes to the vertices of the
  *  RCC8 graph.
  *
  * \sa RCC8Graph, RCC8Edge
  */
 template <class TPath>
-class ITK_EXPORT RCC8VertexBase 
+class ITK_EXPORT RCC8VertexBase
 : public itk::DataObject
 {
  public:
@@ -50,10 +50,10 @@ class ITK_EXPORT RCC8VertexBase
   typedef TPath PathType;
   typedef typename PathType::Pointer PathPointerType;
   typedef typename PathType::ContinuousIndexType ContinuousIndexType;
-  
+
   /** char* vector attributes */
   typedef std::map<std::string,std::string> AttributesMapType;
- 
+
   /** Segmentation image index accessors */
   itkGetMacro(SegmentationLevel,unsigned int);
   itkSetMacro(SegmentationLevel,unsigned int);
diff --git a/Code/SpatialReasoning/otbRCC8VertexBase.txx b/Code/SpatialReasoning/otbRCC8VertexBase.txx
index 131ca6e5ce..eb945317ef 100644
--- a/Code/SpatialReasoning/otbRCC8VertexBase.txx
+++ b/Code/SpatialReasoning/otbRCC8VertexBase.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -59,7 +59,7 @@ RCC8VertexBase<TPath>
       newPoint[0]=atof(attributes[oss.str()].c_str());
       oss.str("");
       oss<<"P"<<i<<"y";
-      newPoint[1]=atof(attributes[oss.str()].c_str());      
+      newPoint[1]=atof(attributes[oss.str()].c_str());
       oss.str("");
       m_Path->AddVertex(newPoint);
     }
@@ -72,7 +72,7 @@ template <class TPath>
 typename RCC8VertexBase<TPath>::AttributesMapType
 RCC8VertexBase<TPath>
 ::GetAttributesMap(void)
-{  
+{
   itk::OStringStream oss;
   AttributesMapType results;
   oss<<m_SegmentationLevel;
@@ -103,7 +103,7 @@ RCC8VertexBase<TPath>
       oss<<point[1];
       results[key]=oss.str();
       oss.str("");
-    } 
+    }
   return results;
 }
 /**
diff --git a/Code/SpatialReasoning/otbRCC8VertexIterator.h b/Code/SpatialReasoning/otbRCC8VertexIterator.h
index e1c3bad638..7dd4cace53 100644
--- a/Code/SpatialReasoning/otbRCC8VertexIterator.h
+++ b/Code/SpatialReasoning/otbRCC8VertexIterator.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ namespace otb
  * \brief Iterates on the graph vertices
  */
 template <class TGraph>
-class ITK_EXPORT RCC8VertexIterator 
+class ITK_EXPORT RCC8VertexIterator
 {
  public:
   /** self typedef */
@@ -44,7 +44,7 @@ class ITK_EXPORT RCC8VertexIterator
 /** Typedef of the index map */
   typedef typename boost::property_map<InternalGraphType, boost::vertex_index_t>::type IndexMapType;
   /** Constructor */
-  RCC8VertexIterator();  
+  RCC8VertexIterator();
    /** Copy constructor */
    RCC8VertexIterator(const Self& iter);
    /**  Constructor with input graph */
@@ -64,7 +64,7 @@ class ITK_EXPORT RCC8VertexIterator
    * \return The current vertex index.
    */
   VertexDescriptorType GetIndex(void);
-   /** 
+   /**
     * Return true if the iterator is at the end.
     * \return True if the iterator is at the end.
     */
diff --git a/Code/SpatialReasoning/otbRCC8VertexIterator.txx b/Code/SpatialReasoning/otbRCC8VertexIterator.txx
index 53e1b6e1af..cbf9eaf729 100644
--- a/Code/SpatialReasoning/otbRCC8VertexIterator.txx
+++ b/Code/SpatialReasoning/otbRCC8VertexIterator.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -22,7 +22,7 @@
 
 namespace otb
 {
- /** 
+ /**
   * Constructor
   */
   template <class TGraph>
@@ -43,12 +43,12 @@ namespace otb
     m_Graph=iter.m_Graph;
     m_End=iter.m_End;
   }
-  /**  
-   *Constructor with input graph 
+  /**
+   *Constructor with input graph
    */
   template <class TGraph>
   RCC8VertexIterator<TGraph>
-  ::RCC8VertexIterator(TGraph * graph) 
+  ::RCC8VertexIterator(TGraph * graph)
   {
     m_Graph=graph;
     tie(m_Iter,m_End)=vertices(*(m_Graph->GetGraph()));
@@ -59,7 +59,7 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8VertexIterator<TGraph>
-  ::VertexPointerType 
+  ::VertexPointerType
   RCC8VertexIterator<TGraph>
   ::Get(void)
   {
@@ -82,14 +82,14 @@ namespace otb
    */
   template <class TGraph>
   typename  RCC8VertexIterator<TGraph>
-  ::VertexDescriptorType 
+  ::VertexDescriptorType
   RCC8VertexIterator<TGraph>
   ::GetIndex(void)
   {
     IndexMapType index = get(boost::vertex_index,(*m_Graph->GetGraph()));
     return index[*m_Iter];
   }
-  /** 
+  /**
     * Return true if the iterator is at the end.
     * \return True if the iterator is at the end.
     */
@@ -104,7 +104,7 @@ namespace otb
    * Go to the beginning.
    */
   template <class TGraph>
-  void 
+  void
   RCC8VertexIterator<TGraph>
   ::GoToBegin(void)
   {
@@ -114,8 +114,8 @@ namespace otb
    * Increment.
    */
   template <class TGraph>
-  typename RCC8VertexIterator<TGraph> 
-  ::Self& 
+  typename RCC8VertexIterator<TGraph>
+  ::Self&
   RCC8VertexIterator<TGraph>
   ::operator++()
   {
@@ -126,20 +126,20 @@ namespace otb
    * Decrement.
    */
   template <class TGraph>
-  typename RCC8VertexIterator<TGraph> 
-  ::Self& 
+  typename RCC8VertexIterator<TGraph>
+  ::Self&
   RCC8VertexIterator<TGraph>
   ::operator--()
   {
     --m_Iter;
     return *this;
-  } 
+  }
   /**
    * Add
    */
   template <class TGraph>
-  typename RCC8VertexIterator<TGraph> 
-  ::Self& 
+  typename RCC8VertexIterator<TGraph>
+  ::Self&
   RCC8VertexIterator<TGraph>
   ::operator+(int i)
   {
@@ -150,8 +150,8 @@ namespace otb
    * Remove
    */
   template <class TGraph>
-  typename RCC8VertexIterator<TGraph> 
-  ::Self& 
+  typename RCC8VertexIterator<TGraph>
+  ::Self&
   RCC8VertexIterator<TGraph>
   ::operator-(int i)
   {
@@ -162,7 +162,7 @@ namespace otb
    * Difference comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8VertexIterator<TGraph>
   ::operator!=(const Self& iter)
   {
@@ -172,7 +172,7 @@ namespace otb
    * Equality comparison operator.
    */
   template <class TGraph>
-  bool 
+  bool
   RCC8VertexIterator<TGraph>
   ::operator==(const Self& iter)
   {
@@ -182,8 +182,8 @@ namespace otb
    * Instantiation operator.
    */
   template <class TGraph>
-  typename RCC8VertexIterator<TGraph> 
-  ::Self& 
+  typename RCC8VertexIterator<TGraph>
+  ::Self&
   RCC8VertexIterator<TGraph>
   ::operator=(const Self& iter)
   {
diff --git a/Code/SpatialReasoning/otbRCC8VertexWithCompacity.h b/Code/SpatialReasoning/otbRCC8VertexWithCompacity.h
index c430739e71..ff4b7c6494 100644
--- a/Code/SpatialReasoning/otbRCC8VertexWithCompacity.h
+++ b/Code/SpatialReasoning/otbRCC8VertexWithCompacity.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,11 +26,11 @@ namespace otb
   /** \class RCC8VertexWithCompacity
    *  \brief Class to represent a vertex in a RCC8 Graph with the compacity value of
    *  the represented region.
-   *  
+   *
    * \sa RCC8Graph, RCC8Edge, RCC8VertexBase
    */
   template <class TPath, class TPrecision = float>
-    class ITK_EXPORT RCC8VertexWithCompacity 
+    class ITK_EXPORT RCC8VertexWithCompacity
 		: public RCC8VertexBase<TPath>
     {
       public:
@@ -49,7 +49,7 @@ namespace otb
       typedef TPrecision PrecisionType;
       /** char* vector attributes */
       typedef  typename Superclass::AttributesMapType  AttributesMapType;
- 
+
       /** Segmentation image index accessors */
       itkGetMacro(Compacity,PrecisionType);
       itkSetMacro(Compacity,PrecisionType);
diff --git a/Code/SpatialReasoning/otbRCC8VertexWithCompacity.txx b/Code/SpatialReasoning/otbRCC8VertexWithCompacity.txx
index 117ccf6a2d..8ba8146c31 100644
--- a/Code/SpatialReasoning/otbRCC8VertexWithCompacity.txx
+++ b/Code/SpatialReasoning/otbRCC8VertexWithCompacity.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -51,7 +51,7 @@ template <class TPath,class TPrecision>
 typename RCC8VertexWithCompacity<TPath,TPrecision>::AttributesMapType
 RCC8VertexWithCompacity<TPath,TPrecision>
 ::GetAttributesMap(void)
-{  
+{
   std::stringstream oss;
   AttributesMapType results;
   results=this->Superclass::GetAttributesMap();
diff --git a/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.h b/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.h
index 552b7332d7..3f1d5f86c8 100644
--- a/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.h
+++ b/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -26,11 +26,11 @@ namespace otb
   /** \class RCC8VertexWithRegionCenter
    *  \brief Class to represent a vertex in a RCC8 Graph with the compacity value of
    *  the represented region.
-   *  
+   *
    * \sa RCC8Graph, RCC8Edge, RCC8VertexBase
    */
   template <class TLabel, class TPrecision = float>
-    class ITK_EXPORT RCC8VertexWithRegionCenter 
+    class ITK_EXPORT RCC8VertexWithRegionCenter
 		: public RCC8VertexBase<TLabel>
     {
       public:
@@ -49,7 +49,7 @@ namespace otb
       typedef TPrecision PrecisionType;
       /** char* vector attributes */
       typedef  typename Superclass::AttributesMapType  AttributesMapType;
- 
+
 
       itkGetMacro(RegionCenterXCoordinate,PrecisionType);
       itkSetMacro(RegionCenterXCoordinate,PrecisionType);
diff --git a/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.txx b/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.txx
index 999e12b082..e4f6782048 100644
--- a/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.txx
+++ b/Code/SpatialReasoning/otbRCC8VertexWithRegionCenter.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -53,7 +53,7 @@ template <class TLabel,class TPrecision>
 typename RCC8VertexWithRegionCenter<TLabel,TPrecision>::AttributesMapType
 RCC8VertexWithRegionCenter<TLabel,TPrecision>
 ::GetAttributesMap(void)
-{  
+{
   std::stringstream oss;
   AttributesMapType results;
   results=this->Superclass::GetAttributesMap();
diff --git a/Code/Visu/otbFixedSizeFullImageWidget.h b/Code/Visu/otbFixedSizeFullImageWidget.h
index a22b33a30f..ef4eafb78f 100644
--- a/Code/Visu/otbFixedSizeFullImageWidget.h
+++ b/Code/Visu/otbFixedSizeFullImageWidget.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,10 +36,10 @@ class FixedSizeFullImageWidget
   typedef ImageWidgetBase<TPixel> Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(FixedSizeFullImageWidget,ImageWidgetBase);
 
diff --git a/Code/Visu/otbFixedSizeFullImageWidget.txx b/Code/Visu/otbFixedSizeFullImageWidget.txx
index dc3a4dd799..b71035e18c 100644
--- a/Code/Visu/otbFixedSizeFullImageWidget.txx
+++ b/Code/Visu/otbFixedSizeFullImageWidget.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 template <class TPixel>
@@ -42,18 +42,18 @@ FixedSizeFullImageWidget<TPixel>
   m_ImageOverlayLoaded=false;
 }
 
-/** 
+/**
  * Destructor.
  */
 template <class TPixel>
 FixedSizeFullImageWidget<TPixel>
 ::~FixedSizeFullImageWidget()
 {}
-/** 
+/**
  * Initialize the widget.
  */
 template <class TPixel>
-void 
+void
 FixedSizeFullImageWidget<TPixel>
 ::Init(int x, int y, int w, int h, const char * l)
 {
@@ -72,11 +72,11 @@ FixedSizeFullImageWidget<TPixel>
     }
 }
 
-/** 
+/**
  * Resize the widget.
  */
 template <class TPixel>
-void 
+void
 FixedSizeFullImageWidget<TPixel>
 ::resize(int x, int y, int w, int h)
 {
@@ -85,7 +85,7 @@ FixedSizeFullImageWidget<TPixel>
   m_WindowSize[1]=h;
 
   SizeType viewedSize = this->GetViewedRegion().GetSize();
-  
+
   double zoom1 = (double)w/(double)viewedSize[0];
   double zoom2 = (double)h/(double)viewedSize[1];
 
@@ -94,11 +94,11 @@ FixedSizeFullImageWidget<TPixel>
   this->Fl_Gl_Window::resize(x,y,w,h);
   this->redraw();
 }
-/** 
+/**
  * Test if the buffer has to be updated.
  */
 template <class TPixel>
-bool 
+bool
 FixedSizeFullImageWidget<TPixel>
 ::UpdateOpenGlBufferedRegionRequested(void)
 {
@@ -112,11 +112,11 @@ FixedSizeFullImageWidget<TPixel>
       return true;
     }
 }
-/** 
- * Update OpenGlBuffer. 
+/**
+ * Update OpenGlBuffer.
  */
 template <class TPixel>
-void 
+void
 FixedSizeFullImageWidget<TPixel>
 ::UpdateOpenGlBufferedRegion(void)
 {
diff --git a/Code/Visu/otbFullResolutionImageWidget.h b/Code/Visu/otbFullResolutionImageWidget.h
index 036e168b7e..f7e3f6597a 100644
--- a/Code/Visu/otbFullResolutionImageWidget.h
+++ b/Code/Visu/otbFullResolutionImageWidget.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,10 +36,10 @@ class FullResolutionImageWidget
   typedef ImageWidgetBase<TPixel> Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(FullResolutionImageWidget,ImageWidgetBase);
 
diff --git a/Code/Visu/otbFullResolutionImageWidget.txx b/Code/Visu/otbFullResolutionImageWidget.txx
index 90620c3a16..7792f1b105 100644
--- a/Code/Visu/otbFullResolutionImageWidget.txx
+++ b/Code/Visu/otbFullResolutionImageWidget.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 template <class TPixel>
@@ -40,18 +40,18 @@ FullResolutionImageWidget<TPixel>
   this->SetViewedRegion(region);
 }
 
-/** 
+/**
  * Destructor.
  */
 template <class TPixel>
 FullResolutionImageWidget<TPixel>
 ::~FullResolutionImageWidget()
 {}
-/** 
+/**
  * Initialize the widget.
  */
 template <class TPixel>
-void 
+void
 FullResolutionImageWidget<TPixel>
 ::Init(int x, int y, int w, int h, const char * l)
 {
@@ -74,11 +74,11 @@ FullResolutionImageWidget<TPixel>
       this->resize(x, y, w, h);
     }
 }
-/** 
+/**
  * Resize the widget.
  */
 template <class TPixel>
-void 
+void
 FullResolutionImageWidget<TPixel>
 ::resize(int x, int y, int w, int h)
 {
@@ -94,16 +94,16 @@ FullResolutionImageWidget<TPixel>
   this->SetViewedRegion(region);
   this->redraw();
   this->Fl_Gl_Window::resize(x,
-	       y, 
+	       y,
 	       region.GetSize()[0],
 	       region.GetSize()[1]);
-  
+
 }
-/** 
+/**
  * Test if the buffer has to be updated.
  */
 template <class TPixel>
-bool 
+bool
 FullResolutionImageWidget<TPixel>
 ::UpdateOpenGlBufferedRegionRequested(void)
 {
@@ -119,11 +119,11 @@ FullResolutionImageWidget<TPixel>
 	   ||viewedRDCorner[1]>bufferedRDCorner[1]);
 }
 
-/** 
- * Update OpenGlBuffer. 
+/**
+ * Update OpenGlBuffer.
  */
 template <class TPixel>
-void 
+void
 FullResolutionImageWidget<TPixel>
 ::UpdateOpenGlBufferedRegion(void)
 {
@@ -135,7 +135,7 @@ FullResolutionImageWidget<TPixel>
  * \param index the upper right corner index.
  */
 template <class TPixel>
-void 
+void
 FullResolutionImageWidget<TPixel>
 ::SetUpperLeftCorner(IndexType index)
 {
diff --git a/Code/Visu/otbGluPolygonDrawingHelper.cxx b/Code/Visu/otbGluPolygonDrawingHelper.cxx
index 07800da02e..14fb4d1eaf 100644
--- a/Code/Visu/otbGluPolygonDrawingHelper.cxx
+++ b/Code/Visu/otbGluPolygonDrawingHelper.cxx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,9 +23,9 @@ PURPOSE.  See the above copyright notices for more information.
 // This is defined in windows only, and it is needed for FunctionPointerType
 // to be properly defined.
 
-// There are function prototype conflits under cygwin between standard w32 API 
+// There are function prototype conflits under cygwin between standard w32 API
 // and standard C ones
-#ifndef CALLBACK 
+#ifndef CALLBACK
 	#if defined(__CYGWIN__)
 		#define CALLBACK __stdcall
         #else
@@ -142,10 +142,10 @@ void GluPolygonDrawingHelper::RenderPolygon()
   glColor4d(m_Color[0],m_Color[1],m_Color[2],m_Color[3]);
   gluTessBeginPolygon(m_GluTesselator, NULL);
   gluTessBeginContour(m_GluTesselator);
-    
+
   for(i=0;i<m_PointVector.size();++i)
     {
-      gluTessVertex(m_GluTesselator,data[i],data[i]); 
+      gluTessVertex(m_GluTesselator,data[i],data[i]);
     }
   gluTessEndContour(m_GluTesselator);
   gluTessEndPolygon(m_GluTesselator);
@@ -155,7 +155,7 @@ void GluPolygonDrawingHelper::RenderPolygon()
       delete []data[i];
     }
   delete []data;
-  
+
   m_PointVector.clear();
 }
 } // end namespace otb
diff --git a/Code/Visu/otbGluPolygonDrawingHelper.h b/Code/Visu/otbGluPolygonDrawingHelper.h
index 884143407f..a290bcad30 100644
--- a/Code/Visu/otbGluPolygonDrawingHelper.h
+++ b/Code/Visu/otbGluPolygonDrawingHelper.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -50,9 +50,9 @@ class ITK_EXPORT GluPolygonDrawingHelper
     typedef std::vector<PointType> PointVectorType;
 
      itkTypeMacro(GluPolygonDrawingHelper,Object);
-    
+
     itkNewMacro(Self);
-   
+
 
     /**
      * Set the current color.
@@ -104,8 +104,8 @@ class ITK_EXPORT GluPolygonDrawingHelper
      */
     void RenderPolygon();
 
-  protected:    
-    
+  protected:
+
     /**
      * Constructor.
      */
@@ -117,7 +117,7 @@ class ITK_EXPORT GluPolygonDrawingHelper
 
     GluPolygonDrawingHelper(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-    
+
 
   private:
     /** Store the point of the polygon */
diff --git a/Code/Visu/otbHistogramAndTransferFunctionWidget.h b/Code/Visu/otbHistogramAndTransferFunctionWidget.h
index 7a4ea10922..5eddebc0d2 100644
--- a/Code/Visu/otbHistogramAndTransferFunctionWidget.h
+++ b/Code/Visu/otbHistogramAndTransferFunctionWidget.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class HistogramAndTransferFunctionWidget
- *  \brief 
+ *  \brief
  *
  * \ingroup Visu
  */
@@ -42,13 +42,13 @@ class ITK_EXPORT HistogramAndTransferFunctionWidget
   typedef itk::ProcessObject                  Superclass;
   typedef itk::SmartPointer<Self>             Pointer;
   typedef itk::SmartPointer<const Self>       ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(HistogramAndTransferFunctionWidget,ProcessObject);
-  
+
   /** Template parameters typedefs */
   typedef TPixel PixelType;
   typedef THistogram HistogramType;
@@ -66,7 +66,7 @@ class ITK_EXPORT HistogramAndTransferFunctionWidget
   itkSetMacro(Histogram,HistogramConstPointerType);
   itkGetMacro(Histogram,HistogramConstPointerType);
   itkGetMacro(TransferFunction,TransferFunctionPointerType);
-  
+
   virtual void SetTransferFunction(TransferFunctionType * function)
     {
       m_TransferFunction = function;
@@ -83,7 +83,7 @@ class ITK_EXPORT HistogramAndTransferFunctionWidget
   itkGetMacro(TextColor,ColorType);
   itkSetMacro(TransferFunctionColor,ColorType);
   itkGetMacro(TransferFunctionColor,ColorType);
-  
+
   itkSetMacro(Label,std::string);
   itkGetMacro(Label,std::string);
   itkSetMacro(TransferFunctionLabel,std::string);
@@ -100,7 +100,7 @@ class ITK_EXPORT HistogramAndTransferFunctionWidget
   itkGetMacro(GridSizeX,unsigned int);
   itkSetMacro(GridSizeY,unsigned int);
   itkGetMacro(GridSizeY,unsigned int);
-  
+
 protected:
   /** Constructor */
   HistogramAndTransferFunctionWidget();
@@ -121,7 +121,7 @@ protected:
   virtual void HistogramRendering(double binWidth, double binHeightRatio, double maxFrequency);
 
   virtual void LegendRendering(double gridXSpacing, double gridYSpacing, double maxFrequency);
-  
+
   virtual void TransferFunctionRendering(void);
 
   virtual void OutputHistogramRendering(void);
@@ -163,7 +163,7 @@ private:
   std::string m_Label;
 /** Label of the histogram */
   std::string m_TransferFunctionLabel;
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Visu/otbHistogramAndTransferFunctionWidget.txx b/Code/Visu/otbHistogramAndTransferFunctionWidget.txx
index aeb5e34246..0d80726cd1 100644
--- a/Code/Visu/otbHistogramAndTransferFunctionWidget.txx
+++ b/Code/Visu/otbHistogramAndTransferFunctionWidget.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -78,8 +78,8 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
       glClearColor(m_BackgroundColor[0],
 		   m_BackgroundColor[1],
 		   m_BackgroundColor[2],
-		   1);     
-    }     
+		   1);
+    }
   glShadeModel(GL_FLAT);
   glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
   glClear(GL_COLOR_BUFFER_BIT);    //this clears and paints to black
@@ -97,7 +97,7 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
 {
   double x,y;
   // Rendering grid
-  glBegin(GL_LINES);  
+  glBegin(GL_LINES);
   glColor3d(m_GridColor[0],m_GridColor[1],m_GridColor[2]);
   for(unsigned int i=1;i<m_GridSizeX;++i)
     {
@@ -107,7 +107,7 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
       y = static_cast<double>(this->h())-m_MarginY;
       glVertex2d(x,y);
     }
-  
+
   for(unsigned int i=1;i<m_GridSizeY;++i)
     {
       y=static_cast<double>(i)*gridYSpacing+m_MarginY;
@@ -139,16 +139,16 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
 ::HistogramRendering(double binWidth, double binHeightRatio, double maxFrequency)
 {
   HistogramIteratorType it;
-  double startx = m_MarginX;  
+  double startx = m_MarginX;
   // Temporary vertex coordinates
   double x,y;
   // Rendering histogram
   for(it=m_Histogram->Begin();it!=m_Histogram->End();++it,startx+=binWidth)
     {
-      
+
       glBegin(GL_POLYGON);
       glColor3d(m_HistogramColor[0],m_HistogramColor[1],m_HistogramColor[2]);
-      
+
       x =startx;
       y = m_MarginY;
       glVertex2d(x,y);
@@ -159,7 +159,7 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
       y=m_MarginY;
       glVertex2d(x,y);
       glEnd();
-    } 
+    }
 
 }
 
@@ -171,13 +171,13 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
   double x,y;
   // Rendering bounds
   glColor3d(m_BoundColor[0],m_BoundColor[1],m_BoundColor[2]);
-  glBegin(GL_LINES);  
-  
+  glBegin(GL_LINES);
+
   double factor = (m_Histogram->Quantile(0,1.)-m_Histogram->Quantile(0,0.))
     /(static_cast<double>(this->w())-2*m_MarginX-m_OutputHistogramMargin*static_cast<double>(this->w()));
 
   x = m_MarginX + static_cast<double>(m_TransferFunction->GetLowerBound()-m_Histogram->Quantile(0,0.))/factor;
-  
+
   y = m_MarginY;
   glVertex2d(x,y);
   y = static_cast<double>(this->h())-m_MarginY;
@@ -259,7 +259,7 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
 ::OutputHistogramRendering()
 {
   std::vector<unsigned int> outputHistogram(256,0);
-  
+
   HistogramIteratorType it;
   for(it=m_Histogram->Begin();it!=m_Histogram->End();++it)
     {
@@ -280,20 +280,20 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
     }
 
   // Temporary vertex coordinates
-  double x,y; 
+  double x,y;
  if(maxFrequency>0)
-   {      
+   {
      double binWidth = (static_cast<double>(this->h())-2*m_MarginY)/255.;
      double binLengthRatio = m_HistogramClamping*m_OutputHistogramMargin*static_cast<double>(this->w())/static_cast<double>(maxFrequency);
      double starty = m_MarginY;
 
-     
+
      // Rendering histogram
      for(vit=outputHistogram.begin();vit!=outputHistogram.end();++vit,starty+=binWidth)
        {
 	 glBegin(GL_POLYGON);
 	 glColor3d(m_TransferFunctionColor[0],m_TransferFunctionColor[1],m_TransferFunctionColor[2]);
-	 
+
 	 x =static_cast<double>(this->w())-m_OutputHistogramMargin*static_cast<double>(this->w())-m_MarginX/2;
 	 y = starty;
 	 glVertex2d(x,y);
@@ -340,16 +340,16 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
   if(!m_Histogram)
     {
       return;
-    } 
+    }
 
   if(m_Updating)
     return;
 
   m_Updating = true;
-  
+
   double maxFrequency = 0;
   HistogramIteratorType it;
-  
+
   // Computing histogram max frequency
   for(it=m_Histogram->Begin();it!=m_Histogram->End();++it)
     {
@@ -358,18 +358,18 @@ HistogramAndTransferFunctionWidget<THistogram,TPixel>
 	  maxFrequency = it.GetFrequency();
 	}
     }
-  
+
   double binWidth = static_cast<double>(this->w()-2*m_MarginX-m_OutputHistogramMargin*static_cast<double>(this->w()))/static_cast<double>(m_Histogram->GetSize()[0]);
   double binHeightRatio = m_HistogramClamping*static_cast<double>(this->h()-2*m_MarginY)/static_cast<double>(maxFrequency);
   double gridXSpacing = (static_cast<double>(this->w())-2*m_MarginX-m_OutputHistogramMargin*static_cast<double>(this->w()))/static_cast<double>(m_GridSizeX);
   double gridYSpacing = (static_cast<double>(this->h())-2*m_MarginY)/static_cast<double>(m_GridSizeY);
-  
+
   OpenGlSetup();
   GridRendering(gridXSpacing,gridYSpacing);
   AxisRendering();
   HistogramRendering(binWidth,binHeightRatio,maxFrequency);
   LegendRendering(gridXSpacing,gridYSpacing,maxFrequency);
- 
+
 
   if(m_TransferFunction)
     {
diff --git a/Code/Visu/otbImageAlternateViewer.h b/Code/Visu/otbImageAlternateViewer.h
index f168e7f872..bc89c7076b 100644
--- a/Code/Visu/otbImageAlternateViewer.h
+++ b/Code/Visu/otbImageAlternateViewer.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -34,7 +34,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 /** \class ImageAlternateViewer
- *  \brief 
+ *  \brief
  *
  * \ingroup Visu
  */
@@ -48,13 +48,13 @@ class ITK_EXPORT ImageAlternateViewer
   typedef itk::Object                     Superclass;
   typedef itk::SmartPointer<Self>         Pointer;
   typedef itk::SmartPointer<const Self>   ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageAlternateViewer,Object);
-  
+
   /** Template related typedef */
     typedef TPixel     PixelType;
     typedef otb::VectorImage<PixelType,2> ImageType;
@@ -70,7 +70,7 @@ class ITK_EXPORT ImageAlternateViewer
     typedef otb::ImageList<SingleImageType> ImageListType;
     typedef otb::VectorImageToImageListFilter<ImageType,ImageListType> VectorImageDecompositionFilterType;
     typedef typename VectorImageDecompositionFilterType::Pointer VectorImageDecompositionFilterPointerType;
-    
+
     typedef itk::InterpolateImageFunction<SingleImageType,double> InterpolatorType;
     typedef typename InterpolatorType::Pointer InterpolatorPointerType;
     typedef itk::LinearInterpolateImageFunction<SingleImageType,double> DefaultInterpolatorType;
@@ -80,7 +80,7 @@ class ITK_EXPORT ImageAlternateViewer
 
     itkSetMacro(RedChannelIndex,unsigned int);
     itkGetMacro(RedChannelIndex,unsigned int);
-    
+
     itkSetMacro(GreenChannelIndex,unsigned int);
     itkGetMacro(GreenChannelIndex,unsigned int);
 
@@ -104,7 +104,7 @@ class ITK_EXPORT ImageAlternateViewer
 
     itkSetObjectMacro(Image,ImageType);
     itkGetObjectMacro(Image,ImageType);
-    
+
     itkSetObjectMacro(SecondImage,ImageType);
     itkGetObjectMacro(SecondImage,ImageType);
 
@@ -131,7 +131,7 @@ class ITK_EXPORT ImageAlternateViewer
      */
     void SetInsightViewModelToRGB(void);
 
-    /** 
+    /**
      * Set insight view model to grayscale
      */
     void SetInsightViewModelToGrayscale(void);
@@ -140,12 +140,12 @@ class ITK_EXPORT ImageAlternateViewer
     unsigned char Normalize(PixelType value, unsigned int channelIndex);
 
     void Show(void);
-    
+
     void Reset(void);
 
     /** Initialize the widget */
     virtual void Init(int x, int y, int w, int h, const char * l);
-  
+
   /** Resize the widget */
   virtual void resize(int x, int y, int w, int h);
 
@@ -154,13 +154,13 @@ protected:
   ImageAlternateViewer();
   /** Destructor */
   virtual ~ImageAlternateViewer();
-  
+
   /** Draw the widget */
   virtual void draw(void);
-  
+
   /** Partial draw routine */
   virtual void Draw(unsigned char * buffer,RegionType& region);
-  
+
   /** Reset opengl context */
   virtual void ResetOpenGlContext(void);
 
@@ -171,20 +171,20 @@ protected:
 /*   virtual void RebuildOpenGlBuffer(void); */
 
 
-  
+
   virtual void IncrementalOpenGlBufferUpdate(void);
 
   RegionType GetAdditionalBufferRegion(unsigned int i);
-  
+
   unsigned char * CreateAdditionalBuffer(RegionType region,ImagePointerType image,bool rgb);
-  
-  virtual void MergeBuffersAndFreeMemory(std::vector<unsigned char *> bufferList, 
+
+  virtual void MergeBuffersAndFreeMemory(std::vector<unsigned char *> bufferList,
 					 std::vector<RegionType> bufferRegionList);
 
   virtual void AdditionalRedraw(void);
 
   virtual void DecorationRedraw(void);
-  
+
   virtual void DrawRegionBoundary(RegionType& region);
 
   virtual long IndexInOldGrid(PointType point, PointType oldUpperLeft, SpacingType spacing, SizeType size);
@@ -236,7 +236,7 @@ private:
   VectorImageDecompositionFilterPointerType m_DecompositionFilter;
   /** Region requested for decomposition */
   RegionType m_RequestedRegion;
-  
+
   /** buffered region */
   RegionType m_BufferedRegion;
 
@@ -271,7 +271,7 @@ private:
   bool m_SubWindowMode;
 /** subwindow mode switch */
   bool m_SubWindowMove;
-  
+
 };
 }// End namespace otb
 #ifndef OTB_MANUAL_INSTANTIATION
diff --git a/Code/Visu/otbImageAlternateViewer.txx b/Code/Visu/otbImageAlternateViewer.txx
index b4be5d5cd8..bbff0f1b1f 100644
--- a/Code/Visu/otbImageAlternateViewer.txx
+++ b/Code/Visu/otbImageAlternateViewer.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -98,13 +98,13 @@ namespace otb
     Init(this->x(),this->y(),this->w(),this->h(),label);
   }
 
-  
+
   template <class TPixel>
   void
   ImageAlternateViewer<TPixel>
   ::Init(int x, int y, int w, int h, const char * l)
-  {    
-    IndexType index; 
+  {
+    IndexType index;
     SizeType size;
 
     index[0]=0;
@@ -124,11 +124,11 @@ namespace otb
     m_DisplayExtent.SetIndex(index);
     m_DisplayExtent.SetSize(size);
     m_OldDisplayExtent=m_DisplayExtent;
-    
+
     m_OldSpacingZoomFactor=m_SpacingZoomFactor;
 
     m_Splitter=SplitterType::New();
-   
+
     m_SubWindowRegion.SetIndex(index);
     m_SubWindowRegion.SetSize(nullSize);
 
@@ -139,7 +139,7 @@ namespace otb
     typename ImageListType::Pointer bandList = m_DecompositionFilter->GetOutput() ;
     bandList->UpdateOutputInformation();
     bandList->GetNthElement(m_RedChannelIndex)->SetRequestedRegion(m_RequestedRegion);
-    
+
     if(m_ViewModelIsRGB)
       {
 	bandList->GetNthElement(m_GreenChannelIndex)->SetRequestedRegion(m_RequestedRegion);
@@ -152,9 +152,9 @@ namespace otb
 	itkExceptionMacro("No input image!");
       }
     this->label(l);
-    this->resize(x, 
-		 y, 
-		 m_DisplayExtent.GetSize()[0], 
+    this->resize(x,
+		 y,
+		 m_DisplayExtent.GetSize()[0],
 		 m_DisplayExtent.GetSize()[1]);
   }
   template <class TPixel>
@@ -176,7 +176,7 @@ namespace otb
     index[0]=0;
     index[1]=0;
     size[0]=w;
-    size[1]=h; 
+    size[1]=h;
 
     m_DisplayExtent.SetIndex(index);
     m_DisplayExtent.SetSize(size);
@@ -226,14 +226,14 @@ namespace otb
     m_InsightViewModelIsRGB=false;
   }
 
-  /** 
-   * Show The widget. 
+  /**
+   * Show The widget.
    */
   template <class TPixel>
   void
   ImageAlternateViewer<TPixel>
   ::Show(void)
-  { 
+  {
     if(!m_Image)
       {
 	itkExceptionMacro(<<"No input image !");
@@ -245,8 +245,8 @@ namespace otb
       }
   }
 
-  /** 
-   * Draw the widget 
+  /**
+   * Draw the widget
    */
   template <class TPixel>
   void
@@ -259,7 +259,7 @@ namespace otb
 	IncrementalOpenGlBufferUpdate();
 	ResetOpenGlContext();
 	this->Draw(m_OpenGlBuffer,m_BufferedRegion);
-	
+
 	if(!m_Drag)
 	  {
 	    AdditionalRedraw();
@@ -276,7 +276,7 @@ namespace otb
   {
     std::vector<unsigned char *> bufferList;
     std::vector<RegionType> bufferRegionList;
-     
+
     if(m_BufferedRegion!=m_DisplayExtent)
       {
 	for(unsigned int i = 0;i<8;++i)
@@ -314,14 +314,14 @@ namespace otb
   }
 
   template <class TPixel>
-  long 
+  long
   ImageAlternateViewer<TPixel>
   ::IndexInOldGrid(PointType point, PointType oldUpperLeft, SpacingType spacing, SizeType size)
   {
     long resp;
     double x = (point[0]-oldUpperLeft[0])/spacing[0];
     double y = (point[1]-oldUpperLeft[1])/spacing[1];
-    
+
     if ((vcl_floor(x)!=x)||(vcl_floor(y)!=y))
       {
 	resp=-1;
@@ -330,7 +330,7 @@ namespace otb
       {
 	resp = -1;
       }
-    else 
+    else
       {
 	resp = 3*(static_cast<long>(y)*size[0]+static_cast<long>(x));
       }
@@ -347,7 +347,7 @@ namespace otb
     IndexType focusOffset;
     focusOffset[0]=static_cast<long>(static_cast<double>(m_ViewedRegionCenter[0]-m_OldViewedRegionCenter[0])/m_SpacingZoomFactor);
     focusOffset[1]=static_cast<long>(static_cast<double>(m_ViewedRegionCenter[1]-m_OldViewedRegionCenter[1])/m_SpacingZoomFactor);
-    
+
     IndexType newBufferedRegionIndex;
 
     SizeType newBufferedRegionSize;
@@ -366,7 +366,7 @@ namespace otb
     newBufferedRegionIndex[0]-=focusOffset[0];
     newBufferedRegionIndex[1]-=focusOffset[1];
     m_BufferedRegion.SetIndex(newBufferedRegionIndex);
-    
+
     PointType center;
     m_Image->TransformIndexToPhysicalPoint(m_ViewedRegionCenter,center);
 
@@ -376,15 +376,15 @@ namespace otb
 
 	SpacingType spacing = m_Image->GetSpacing()*m_SpacingZoomFactor;
 	SpacingType oldSpacing = m_Image->GetSpacing()*m_OldSpacingZoomFactor;
-	
+
 	PointType origin;
 	origin[0]=center[0]-(static_cast<double>(this->m_DisplayExtent.GetSize()[0])/2-1)*spacing[0];
 	origin[1]=center[1]-(static_cast<double>(this->m_DisplayExtent.GetSize()[1])/2-1)*spacing[1];
-	
+
 	PointType oldOrigin;
 	oldOrigin[0]=center[0]-(static_cast<double>(this->m_DisplayExtent.GetSize()[0])/2-1)*oldSpacing[0];
 	oldOrigin[1]=center[1]-(static_cast<double>(this->m_DisplayExtent.GetSize()[1])/2-1)*oldSpacing[1];
-		
+
 	PointType oldBufferedUpperLeft;
 	oldBufferedUpperLeft[0]=oldOrigin[0]+static_cast<double>(m_OldBufferedRegion.GetIndex()[0])*oldSpacing[0];
 	oldBufferedUpperLeft[1]=oldOrigin[1]+static_cast<double>(m_OldBufferedRegion.GetIndex()[1])*oldSpacing[1];
@@ -395,7 +395,7 @@ namespace otb
 
 	unsigned char *  newBuffer = NULL;
 	unsigned int bufferLenght = 3*m_BufferedRegion.GetSize()[0]*m_BufferedRegion.GetSize()[1];
-   
+
 	newBuffer = new unsigned char[bufferLenght];
 	typename ImageListType::Pointer bandList;
 	unsigned int index = 0;
@@ -403,7 +403,7 @@ namespace otb
 	PointType interpolatedPos;
 	interpolatedPos.Fill(0);
 	unsigned int numberOfSplits=1;
-	
+
 	unsigned int optiCount = 0;
 	InterpolatorPointerType interpolator;
 	if(m_SpacingZoomFactor>1)
@@ -415,9 +415,9 @@ namespace otb
 	  {
 	    interpolator = m_ZoomInInterpolator;
 	  }
-	
+
 	unsigned int splitterNumberOfSplits = m_Splitter->GetNumberOfSplits(m_BufferedRegion,numberOfSplits);
-	
+
 	for(unsigned int splitIndex = 0;splitIndex<splitterNumberOfSplits;++splitIndex)
 	  {
 	    RegionType splitRegion = m_Splitter->GetSplit(splitIndex,splitterNumberOfSplits,m_BufferedRegion);
@@ -430,7 +430,7 @@ namespace otb
 		nullIndex.Fill(0);
 		m_RequestedRegion.SetSize(nullSize);
 		m_RequestedRegion.SetIndex(nullIndex);
-	      }	    
+	      }
 	    m_DecompositionFilter = VectorImageDecompositionFilterType::New();
 	    m_DecompositionFilter->SetInput(m_Image);
 	    bandList = m_DecompositionFilter->GetOutput();
@@ -443,7 +443,7 @@ namespace otb
 	      }
 	    bandList->PropagateRequestedRegion();
 	    bandList->UpdateOutputData();
-	    
+
 
 	    PointType upperLeft;
 	    upperLeft[0]=origin[0]+static_cast<double>(splitRegion.GetIndex()[0])*spacing[0];
@@ -456,7 +456,7 @@ namespace otb
 		interpolatedPos[0]=upperLeft[0];
 		for(unsigned int i = 0;i<splitRegion.GetSize()[0];++i)
 		  {
-		    
+
 		    long indexInOldBuffer = IndexInOldGrid(interpolatedPos,oldBufferedUpperLeft,oldSpacing,m_OldBufferedRegion.GetSize());
 		    if(indexInOldBuffer>0)
 		      {
@@ -506,7 +506,7 @@ namespace otb
 			  {
 			    newBuffer[index+1] = Normalize(interpolatedValue,m_RedChannelIndex);
 			    newBuffer[index+2] = Normalize(interpolatedValue,m_RedChannelIndex);
-			    index+=3; 
+			    index+=3;
 			  }
  		      }
 		    interpolatedPos[0] +=spacing[0];
@@ -523,7 +523,7 @@ namespace otb
 	m_OldSpacingZoomFactor = m_SpacingZoomFactor;
   }
 }
-  
+
   template <class TPixel>
   typename ImageAlternateViewer<TPixel>
   ::RegionType
@@ -536,7 +536,7 @@ namespace otb
 
     size.Fill(0);
     index.Fill(0);
-    
+
     SizeType deSize = m_DisplayExtent.GetSize();
     IndexType deUL =m_DisplayExtent.GetIndex();
     IndexType deLR;
@@ -577,7 +577,7 @@ namespace otb
 	size[0]  = max(bufUL[0]-deUL[0],0L);
 	size[1]  = min(bufLR[1]-max(bufUL[1],0L),deLR[1]-index[1]);
 	break;
-	
+
       case 4:
 	index[0] = min(bufLR[0],deLR[0]);
 	index[1] = max(bufUL[1],deUL[0]);
@@ -617,9 +617,9 @@ namespace otb
   ::ComputeRequestedRegion(RegionType &region)
   {
     RegionType outputRegion;
-    
+
     SpacingType spacing = m_Image->GetSpacing()*m_SpacingZoomFactor;
-    
+
     PointType center;
     m_Image->TransformIndexToPhysicalPoint(m_ViewedRegionCenter,center);
     PointType origin;
@@ -674,7 +674,7 @@ namespace otb
     unsigned char *  result = NULL;
 
     unsigned int bufferLenght = 3*region.GetSize()[0]*region.GetSize()[1];
-   
+
     if(bufferLenght == 0)
       {
 	return result;
@@ -702,9 +702,9 @@ namespace otb
       {
 	interpolator = m_ZoomInInterpolator;
       }
-    
+
     unsigned int splitterNumberOfSplits = m_Splitter->GetNumberOfSplits(region,numberOfSplits);
-    
+
     SpacingType spacing = image->GetSpacing()*m_SpacingZoomFactor;
 
     PointType center;
@@ -733,7 +733,7 @@ namespace otb
 	m_DecompositionFilter = VectorImageDecompositionFilterType::New();
 	m_DecompositionFilter->SetInput(image);
 	bandList = m_DecompositionFilter->GetOutput();
-	
+
 	bandList->UpdateOutputInformation();
 	bandList->GetNthElement(m_RedChannelIndex)->SetRequestedRegion(m_RequestedRegion);
 	if(rgb)
@@ -791,7 +791,7 @@ namespace otb
 		  {
 		    result[index+1] = Normalize(interpolatedValue,m_RedChannelIndex);
 		    result[index+2] = Normalize(interpolatedValue,m_RedChannelIndex);
-		    index+=3; 
+		    index+=3;
 		  }
 		interpolatedPos[0] +=spacing[0];
 	      }
@@ -806,9 +806,9 @@ namespace otb
     total.Stop();
     return result;
   }
-  
+
   template <class TPixel>
-  int  
+  int
   ImageAlternateViewer<TPixel>
   ::handle(int event)
   {
@@ -826,7 +826,7 @@ namespace otb
 						      +(static_cast<double>(Fl::event_y())-static_cast<double>(m_DisplayExtent.GetSize()[1]/2))/m_OpenGlIsotropicZoom);
   	      m_Drag=true;
 	      m_DragEventCounter=0;
-	      
+
 	      if(m_SubWindowRegion.IsInside(m_OldMousePos))
 		{
 		  m_SubWindowMove = true;
@@ -836,13 +836,13 @@ namespace otb
 		  m_OldViewedRegionCenter = m_ViewedRegionCenter;
 		}
 	    }
- 	  return 1;  
+ 	  return 1;
  	}
 
       case FL_DRAG:
 	{
  	  m_Drag=true;
-	  
+
 	  int x =static_cast<int>(static_cast<double>(m_DisplayExtent.GetSize()[0]/2)
 				  +(Fl::event_x()-static_cast<double>(m_DisplayExtent.GetSize()[0]/2))/m_OpenGlIsotropicZoom);
 	  int y = static_cast<long int>(static_cast<double>(m_DisplayExtent.GetSize()[1]/2)
@@ -874,7 +874,7 @@ namespace otb
 	      this->redraw();
 	      m_DragEventCounter++;
 	    }
-	  
+
 	  else
 	    {
 	      SpacingType spacing = m_Image->GetSpacing()*m_SpacingZoomFactor;
@@ -888,7 +888,7 @@ namespace otb
 	      this->redraw();
 	      m_DragEventCounter++;
 	    }
-	  
+
 	  DecorationRedraw();
 	  return 1;
 	}
@@ -944,14 +944,14 @@ namespace otb
 	return;
       }
 
-      
-    // malloc new buffer 
+
+    // malloc new buffer
     unsigned char * newBuffer = new unsigned char[3*m_DisplayExtent.GetNumberOfPixels()];
 
     // fill the new buffer
     unsigned int indexInNewBuffer = 0;
 
-    
+
     unsigned int indexInBuffer1=0;
     unsigned int indexInBuffer2=0;
     unsigned int indexInBuffer3=0;
@@ -1034,7 +1034,7 @@ namespace otb
 	if(m_OpenGlBuffer!=NULL)
 	  {
 
-	    indexInCentralBuffer+=offsetx;	    
+	    indexInCentralBuffer+=offsetx;
 	    for(unsigned int i = 0;i<3*bufferRegionList[1].GetSize()[0];++i)
 	      {
 		newBuffer[indexInNewBuffer]=m_OpenGlBuffer[indexInCentralBuffer];
@@ -1055,7 +1055,7 @@ namespace otb
 	  }
       }
 
-   
+
 
     if(bufferRegionList[5].GetSize()[1]!=bufferRegionList[6].GetSize()[1]
        ||bufferRegionList[6].GetSize()[1]!=bufferRegionList[7].GetSize()[1]
@@ -1105,7 +1105,7 @@ namespace otb
       }
 
     // Free all intermediate buffers
-    typename std::vector<unsigned char *>::iterator it;    
+    typename std::vector<unsigned char *>::iterator it;
     for(it=bufferList.begin();it!=bufferList.end();++it)
       {
 	if((*it)!=NULL)
@@ -1125,10 +1125,10 @@ namespace otb
     // replace by current buffer
     m_OpenGlBuffer = newBuffer;
 
-    
+
     //std::cout<<"Buffers merged and freed"<<std::endl;
   }
-  
+
   template <class TPixel>
   void
   ImageAlternateViewer<TPixel>
@@ -1140,33 +1140,33 @@ namespace otb
     {
 	// This enable negative raster pos
       glRasterPos3d(0,0,0);
-	
+
       double zoomOffsetX = 0;
       double zoomOffsetY = 0;
 
       zoomOffsetX = (1-m_OpenGlIsotropicZoom)*(static_cast<double>(m_DisplayExtent.GetSize()[0]/2)-static_cast<double>(region.GetIndex()[0]));
       zoomOffsetY = (1-m_OpenGlIsotropicZoom)*( static_cast<double>(m_DisplayExtent.GetSize()[1]/2)-static_cast<double>(region.GetIndex()[1]));
-	
+
 //      double movex = static_cast<double>(region.GetIndex()[0])+zoomOffsetX;
 //      double movey = static_cast<double>(m_DisplayExtent.GetSize()[1])-static_cast<double>(region.GetIndex()[1])-zoomOffsetY;
 //       glBitmap(0,0,0,0,movex,movey,NULL);
 //       glPixelZoom(m_OpenGlIsotropicZoom,-m_OpenGlIsotropicZoom);
-// 
-// 
+//
+//
 // 	// display the image
 //       glDrawPixels(region.GetSize()[0],
-//                    region.GetSize()[1], 
+//                    region.GetSize()[1],
 //                                   GL_RGB,
-//                                   GL_UNSIGNED_BYTE, 
+//                                   GL_UNSIGNED_BYTE,
 //                                   buffer);
 //       glEnd();
-      
+
 //       std::cout << "Region size: " << region.GetSize() << std::endl;
 //       std::cout << "DisplayExtent size: " << m_DisplayExtent.GetSize() << std::endl;
 //       std::cout << "zoomOffset: " << zoomOffsetX << " " << zoomOffsetY << std::endl;
 //       std::cout << "move: " << movex << " " << movey << std::endl;
-      
-      
+
+
       glEnable(GL_TEXTURE_2D);
       glColor4f(1.0,1.0,1.0,0.0);
       GLuint texture;
@@ -1175,7 +1175,7 @@ namespace otb
       glTexImage2D(GL_TEXTURE_2D, 0, 3, region.GetSize()[0], region.GetSize()[1], 0, GL_RGB, GL_UNSIGNED_BYTE, buffer);
       glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);  // Nearest Filtering
       glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);  // Nearest Filtering
-  
+
       glBindTexture (GL_TEXTURE_2D, texture);
       glBegin (GL_QUADS);
 //       glTexCoord2f (0.0, 1.0);  glVertex3f (-movex, -movey, 0.0);
@@ -1189,8 +1189,8 @@ namespace otb
       glEnd ();
 
       glDisable(GL_TEXTURE_2D);
-      
-      
+
+
 //       swap_buffers();
 //       glFlush();
     }
@@ -1205,16 +1205,16 @@ namespace otb
   {
     double zoomOffsetX = 0;
     double zoomOffsetY = 0;
-    
+
     zoomOffsetX = (1-m_OpenGlIsotropicZoom)*(static_cast<double>(m_DisplayExtent.GetSize()[0]/2)-static_cast<double>(region.GetIndex()[0]));
     zoomOffsetY = (1-m_OpenGlIsotropicZoom)*( static_cast<double>(m_DisplayExtent.GetSize()[1]/2)-static_cast<double>(region.GetIndex()[1]));
     double minx,maxx,miny,maxy;
-    
+
     minx = static_cast<double>(region.GetIndex()[0])/**m_OpenGlIsotropicZoom*/+zoomOffsetX;
     maxx = minx + static_cast<double>(region.GetSize()[0])*m_OpenGlIsotropicZoom;
     miny = static_cast<double>(m_DisplayExtent.GetSize()[1])-static_cast<double>(region.GetIndex()[1])/**m_OpenGlIsotropicZoom*/-zoomOffsetY;
     maxy = miny-static_cast<double>(region.GetSize()[1])*m_OpenGlIsotropicZoom;
-    
+
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     glColor3f(1,0,0);
@@ -1237,11 +1237,11 @@ namespace otb
 	valid(1);
  	glLoadIdentity();
  	glViewport(0,0,m_DisplayExtent.GetSize()[0],m_DisplayExtent.GetSize()[1]);
-	glClearColor((float)0.0, (float)0.0, (float)0.0, (float)0.0);          
+	glClearColor((float)0.0, (float)0.0, (float)0.0, (float)0.0);
 	glShadeModel(GL_SMOOTH);
 	glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
       }
-    
+
     glClear(GL_COLOR_BUFFER_BIT);    //this clears and paints to black
     glMatrixMode(GL_PROJECTION);
     this->ortho();
diff --git a/Code/Visu/otbImageToGrayscaleAnaglyphImageFilter.h b/Code/Visu/otbImageToGrayscaleAnaglyphImageFilter.h
index 1c9ceef688..f73e2b7cf6 100644
--- a/Code/Visu/otbImageToGrayscaleAnaglyphImageFilter.h
+++ b/Code/Visu/otbImageToGrayscaleAnaglyphImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,7 +37,7 @@ namespace Functor
       public:
 	/// Constructor
 	GrayscaleAnaglyphFunctor(){};
-	/// Destructor 
+	/// Destructor
 	~GrayscaleAnaglyphFunctor(){};
 
 
@@ -52,7 +52,7 @@ namespace Functor
       };
   }
  /** \class ImageToGrayscaleAnaglyphImageFilter
-  *  \brief This filter implements the synthesis of a grayscale anaglyph image from 
+  *  \brief This filter implements the synthesis of a grayscale anaglyph image from
   *  a pair of stereoscopic images.
   *  The output image is a VectorImage with 3 channels, where the first channel is the first
   *  input image, and the two last channels are the second input image.
@@ -62,7 +62,7 @@ template <class TInputImage1, class TInputImage2, class TOutputImage>
 class ITK_EXPORT ImageToGrayscaleAnaglyphImageFilter
   : public itk::BinaryFunctorImageFilter
   <  TInputImage1,TInputImage2,TOutputImage,
-  Functor::GrayscaleAnaglyphFunctor< 
+  Functor::GrayscaleAnaglyphFunctor<
   typename TInputImage1::PixelType,
   typename TInputImage2::PixelType,
   typename TOutputImage::PixelType
@@ -74,20 +74,20 @@ class ITK_EXPORT ImageToGrayscaleAnaglyphImageFilter
 
   typedef itk::BinaryFunctorImageFilter
   <  TInputImage1,TInputImage2,TOutputImage,
-    Functor::GrayscaleAnaglyphFunctor< 
+    Functor::GrayscaleAnaglyphFunctor<
     typename TInputImage1::PixelType,
     typename TInputImage2::PixelType,
     typename TOutputImage::PixelType
     >  > Superclass;
   typedef itk::SmartPointer<Self>              Pointer;
   typedef itk::SmartPointer<const Self>        ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageToGrayscaleAnaglyphImageFilter, BinaryFunctorImageFilter);
-  
+
   virtual void GenerateOutputInformation(void)
     {
       Superclass::GenerateOutputInformation();
diff --git a/Code/Visu/otbImageViewer.h b/Code/Visu/otbImageViewer.h
index 3d628b0627..20299bca5b 100644
--- a/Code/Visu/otbImageViewer.h
+++ b/Code/Visu/otbImageViewer.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,7 +23,7 @@ PURPOSE.  See the above copyright notices for more information.
 
 namespace otb
 {
-  /** 
+  /**
    * \brief Simple image viewer.
    *
    * This class is a simple image viewer using fltk gui and opengl drawing.
@@ -37,7 +37,7 @@ namespace otb
    * without flooding the memory.
    *
    * Channel index and other various parameters can be set.
-   * 
+   *
    * To use the viewer, setup it with all your parameters, then call the Build(), Show() and the Update() methods.
    * A call to Fl::run() is mandatory to hang the program execution until the viewer is closed.
    *
@@ -47,7 +47,7 @@ namespace otb
    * \sa ImageViewerFullWidget, ImageViewerScrollWidget, ImageViewerZoomWidget
    */
 template <class TPixel, class TLabel = double>
-class ITK_EXPORT ImageViewer 
+class ITK_EXPORT ImageViewer
   : public ImageViewerBase<TPixel,TLabel>
 {
  public:
@@ -63,26 +63,26 @@ class ITK_EXPORT ImageViewer
   itkNewMacro(Self);
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageViewer,ImageViewerBase);
-  
+
   /** Show the viewer */
   virtual void Show(void);
    /** Hide all Image View Windows */
   virtual void Hide(void);
   /** Build the interfaces */
-  virtual void Build(void);  
+  virtual void Build(void);
   /** Update */
   virtual void Update(void);
- 
+
   protected:
   /**Constructor */
-  ImageViewer(); 
+  ImageViewer();
   /** Destructor */
   ~ImageViewer();
-  
+
   private:
   ImageViewer(const Self&); //purposely not implemented
   void operator=(const Self&); //purposely not implemented
-  
+
   /// Fltk surrounding windows
   Fl_Window * m_FullWindow;
   Fl_Window * m_ScrollWindow;
diff --git a/Code/Visu/otbImageViewer.txx b/Code/Visu/otbImageViewer.txx
index 4ee1079bec..81066e763b 100644
--- a/Code/Visu/otbImageViewer.txx
+++ b/Code/Visu/otbImageViewer.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -68,7 +68,7 @@ namespace otb
 	delete m_ScrollWindow;
 	m_ScrollWindow = NULL;
       }
-    
+
     if(m_PixLocWindow!=NULL)
       {
 	m_PixLocWindow->remove(m_PixLocOutput);
@@ -81,7 +81,7 @@ namespace otb
 	m_PixLocOutput = NULL;
       }
   }
- 
+
   /// Build the HMI
   template <class TPixel, class TLabel>
   void
@@ -90,10 +90,10 @@ namespace otb
   {
     Superclass::Build();
     itk::OStringStream oss;
-  
+
   int wfull = this->GetFullWidget()->w();
   int hfull = this->GetFullWidget()->h();
-    
+
   oss.str("");
   oss<<this->GetLabel()<<" - Full Window";
   m_FullWindow = new Fl_Window(0,0,wfull,hfull,"");
@@ -101,10 +101,10 @@ namespace otb
   m_FullWindow->add(this->GetFullWidget());
   m_FullWindow->resizable(this->GetFullWidget());
   m_FullWindow->end();
-    
+
 
   oss.str("");
-  oss<<this->GetLabel()<<" - Histograms and transfer functions"; 
+  oss<<this->GetLabel()<<" - Histograms and transfer functions";
   if(this->GetViewModel() == Superclass::ScrollWidgetType::RGB)
   {
     m_HistogramWindow = new Fl_Window(0,hfull,3*this->GetRedHistogramWidget()->w(),this->GetRedHistogramWidget()->h());
@@ -119,9 +119,9 @@ namespace otb
 					   0,
 					   this->GetBlueHistogramWidget()->w(),
 					   this->GetBlueHistogramWidget()->h());
-    m_HistogramWindow->resizable(m_HistogramWindow);	
+    m_HistogramWindow->resizable(m_HistogramWindow);
     m_HistogramWindow->end();
-	
+
   }
   else
   {
@@ -138,20 +138,20 @@ namespace otb
 
   if(this->GetUseScroll())
   {
-    
-    // Create the scroll windows   
+
+    // Create the scroll windows
     wscroll = this->GetScrollWidget()->w();
-    hscroll = this->GetScrollWidget()->h();   
-     
+    hscroll = this->GetScrollWidget()->h();
+
     oss.str("");
     oss<<this->GetLabel()<<" - Scroll Window";
     m_ScrollWindow = new Fl_Window(wfull+15,0,wscroll,hscroll,"");
     m_ScrollWindow->copy_label(oss.str().c_str());
     m_ScrollWindow->add(this->GetScrollWidget());
     m_ScrollWindow->resizable(this->GetScrollWidget());
-    m_ScrollWindow->end();  
+    m_ScrollWindow->end();
   }
-        
+
   // Create the zoom window
   std::string zoomLabel=this->GetLabel();
   zoomLabel.append(" - Zoom Window (X4)");
@@ -160,7 +160,7 @@ namespace otb
   m_ZoomWindow->add(this->GetZoomWidget());
   m_ZoomWindow->resizable(this->GetZoomWidget());
   m_ZoomWindow->end();
-    
+
   std::string pixLocLabel=this->GetLabel();
   pixLocLabel.append("Pixel location & values");
   m_PixLocWindow= new Fl_Window(wfull+15,hscroll+50,(wscroll<100 ? 100 : wscroll),40,"");
@@ -172,17 +172,17 @@ namespace otb
   m_PixLocWindow->end();
   this->SetPixLocOutput(m_PixLocOutput);
   }
-  
+
 /// Show the app
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewer<TPixel,TLabel>
 ::Show(void)
 {
   if(!this->GetBuilt())
     {
       this->Build();
-    } 
+    }
   if(this->GetUseScroll())
     {
       m_ScrollWindow->show();
@@ -193,12 +193,12 @@ ImageViewer<TPixel,TLabel>
   m_PixLocOutput->show();
   m_HistogramWindow->show();
   Superclass::Show();
- 
+
   Fl::check();
 }
 /// Hide the app
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewer<TPixel,TLabel>
 ::Hide(void)
 {
@@ -207,16 +207,16 @@ ImageViewer<TPixel,TLabel>
     {
       m_ScrollWindow->hide();
     }
-  m_FullWindow->hide();   
+  m_FullWindow->hide();
   m_ZoomWindow->hide();
   m_PixLocWindow->hide();
   m_PixLocOutput->hide();
   m_HistogramWindow->hide();
   Fl::check();
-} 
-  
+}
+
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewer<TPixel,TLabel>
 ::Update(void)
 {
@@ -228,7 +228,7 @@ ImageViewer<TPixel,TLabel>
     }
   m_ZoomWindow->redraw();
   Superclass::Update();
-} 
-  
+}
+
 } // end namespace otb
 #endif
diff --git a/Code/Visu/otbImageViewerBase.h b/Code/Visu/otbImageViewerBase.h
index 8cf31240ad..6cfafffeb4 100644
--- a/Code/Visu/otbImageViewerBase.h
+++ b/Code/Visu/otbImageViewerBase.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -56,7 +56,7 @@ namespace otb
    * without flooding the memory.
    *
    * Channel index and other various parameters can be set.
-   * 
+   *
    * To use the viewer, setup it with all your parameters, then call the Build(), Show() and the Update() methods.
    * A call to Fl::run() is mandatory to hang the program execution until the viewer is closed.
    *
@@ -66,8 +66,8 @@ namespace otb
    * \sa ImageViewerFullWidget, ImageViewerScrollWidget, ImageViewerZoomWidget
    */
   template <class TPixel, class TLabel = double>
-    class ITK_EXPORT ImageViewerBase 
-    : public itk::ProcessObject            
+    class ITK_EXPORT ImageViewerBase
+    : public itk::ProcessObject
     {
       public:
       /** Standard class typedefs */
@@ -81,7 +81,7 @@ namespace otb
 
       /** Run-time type information (and related methods). */
       itkTypeMacro(ImageViewerBase,itk::ProcessObject);
-  
+
       /// Template pixel type
       typedef TPixel InputPixelType;
       typedef TLabel LabelType;
@@ -140,7 +140,7 @@ namespace otb
       /// Definition of box form to represent displayed regions.
       typedef otb::ImageWidgetBoxForm BoxType;
       typedef typename BoxType::Pointer BoxPointerType;
-  
+
       /// List of linked viewer typedef
       typedef otb::ObjectList<Self> ViewerListType;
       typedef typename ViewerListType::Pointer ViewerListPointerType;
@@ -173,7 +173,7 @@ namespace otb
       typedef typename PathListType::Iterator PathListIteratorType;
       typedef ImageWidgetPolylineForm<double> ImageWidgetPolylineFormType;
       typedef typename ImageWidgetPolylineFormType::Pointer ImageWidgetPolylineFormPointerType;
-          
+
       /// Accessors
       itkGetMacro(Built,bool);
       itkGetMacro(ShrinkFactor,unsigned int);
@@ -246,7 +246,7 @@ namespace otb
 
       /** Set the input image overlay (VectorImage of unsigned char image with at least 3 channels) */
       virtual void SetImageOverlay(OverlayImageType * img);
-  
+
       /** Get the shrinked image if scroll is activated and else the input image */
       virtual ImageType * GetShrinkedImage(void);
 
@@ -260,25 +260,25 @@ namespace otb
 
       /** Build the interfaces */
       virtual void Build(void);
-  
+
       /** Update the widgets */
       virtual void Update(void);
 
       /** Update the full widget */
       virtual void UpdateFullWidget(void);
-  
+
       /** Update the scroll widget */
       virtual void UpdateScrollWidget(void);
 
       /** Update the ZoomWidget */
       virtual void UpdateZoomWidget(void);
 
-      /** Change the ZoomViewedRegion 
+      /** Change the ZoomViewedRegion
        * \param clickedIndex The new center of the region
        **/
       virtual void ChangeZoomViewedRegion(IndexType clickedIndex);
-      /** 
-       * Change the Full Viewed region 
+      /**
+       * Change the Full Viewed region
        * \param clickedIndex The new center of the region
        */
       virtual void ChangeFullViewedRegion(IndexType clickedIndex);
@@ -295,11 +295,11 @@ namespace otb
       /** Generate overlay list */
       virtual void GenerateOverlayList(void);
 
-      /** This is a helper class that performs a Show() and Fl::run() in order to ease 
+      /** This is a helper class that performs a Show() and Fl::run() in order to ease
        *  the use of the class for example in wrappings.
        * \return The return code from fltk.
        */
-      int FlRun(void);  
+      int FlRun(void);
       /**
        * Link this viewer with the given viewer.
        * \param viewer The viewer to link with.
@@ -382,13 +382,13 @@ namespace otb
        * true if the entry exists, and false otherwise.
        * \param label The label
        * \param color The color
-       * \return true if the label was found. 
+       * \return true if the label was found.
        */
       virtual bool GetROIColorMapEntry(const LabelType &label, ColorType &color);
 
 
       /**
-       * Clear the ROI color map. 
+       * Clear the ROI color map.
        */
       virtual void ClearROIColorMap(void);
 
@@ -415,12 +415,12 @@ namespace otb
        * \param viewer The viewer to link with.
        * \param backwardLinkFlag Link back to this viewer.
        */
-      virtual void Unlink(Self * viewer,bool backwardLinkFlag);  
+      virtual void Unlink(Self * viewer,bool backwardLinkFlag);
 
       // Constructor and destructor
       ImageViewerBase();
       ~ImageViewerBase();
- 
+
       private:
       ImageViewerBase(const Self&); //purposely not implemented
       void operator=(const Self&); //purposely not implemented
@@ -447,7 +447,7 @@ namespace otb
       bool m_UseScroll;
       /// Show the histograms
       bool m_ShowHistograms;
-      
+
       /// Intial sizes
       unsigned int m_ScrollMaxInitialSize;
       unsigned int m_FullMaxInitialSize;
@@ -460,22 +460,22 @@ namespace otb
       /// Pointer to the shrink filters
       ShrinkFilterPointerType m_Shrink;
       OverlayShrinkFilterPointerType m_ShrinkOverlay;
- 
-      /// The shrink factor 
+
+      /// The shrink factor
       unsigned int m_ShrinkFactor;
       /// true if the Gui has been built.
       bool m_Built;
       /// Channel indices
       unsigned int m_RedChannelIndex;
       unsigned int m_GreenChannelIndex;
-      unsigned int m_BlueChannelIndex;  
+      unsigned int m_BlueChannelIndex;
       /// Quicklook quality factor
       double       m_QuicklookRatioCoef;
       /// Normalization quality factor
       double       m_NormalizationFactor;
       /// Converter from otb::Image to otb::VectorImage
       VectorCastFilterPointerType m_VectorCastFilter;
-      VectorCastFilterPointerType m_VectorCastFilterOverlay; 
+      VectorCastFilterPointerType m_VectorCastFilterOverlay;
       /// Wether the viewer is updating or not
       bool m_Updating;
       /// The list of viewer with which this viewer is linked
@@ -488,7 +488,7 @@ namespace otb
       PathListPointerType m_PathList;
       /// Interface boxes
       FormListPointerType m_InterfaceBoxesList;
-      /// Next ROI color 
+      /// Next ROI color
       ColorType m_DefaultROIColor;
       /// Interfaces box color
       ColorType m_InterfaceBoxesColor;
@@ -511,7 +511,7 @@ namespace otb
       HistogramWidgetPointerType m_RedHistogramWidget;
       HistogramWidgetPointerType m_BlueHistogramWidget;
       HistogramWidgetPointerType m_GreenHistogramWidget;
-      
+
     };
 
 
diff --git a/Code/Visu/otbImageViewerBase.txx b/Code/Visu/otbImageViewerBase.txx
index 9e45489278..975e2b9a4e 100644
--- a/Code/Visu/otbImageViewerBase.txx
+++ b/Code/Visu/otbImageViewerBase.txx
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -51,15 +51,15 @@ namespace otb
     m_RedChannelIndex = 0;
     m_GreenChannelIndex = 1;
     m_BlueChannelIndex = 2;
-    m_Built=false;   
-    m_Shrink = ShrinkFilterType::New();  
+    m_Built=false;
+    m_Shrink = ShrinkFilterType::New();
     m_PixLocOutput=NULL;
     m_NormalizationFactor = 0.02;
     m_QuicklookRatioCoef = 2;
     m_VectorCastFilter = NULL;
     m_LinkedViewerList = ViewerListType::New();
     m_Updating = false;
-    m_PolygonROIList = PolygonListType::New(); 
+    m_PolygonROIList = PolygonListType::New();
     m_PathList = PathListType::New();
     m_InterfaceBoxesList = FormListType::New();
     m_ShowFullWidget = true;
@@ -76,7 +76,7 @@ namespace otb
     m_BlueHistogramWidget = HistogramWidgetType::New();
     m_ShowHistograms = true;
   }
-  
+
   /// Destructor
   template <class TPixel, class TLabel>
   ImageViewerBase<TPixel,TLabel>
@@ -89,12 +89,12 @@ namespace otb
    ImageViewerBase<TPixel,TLabel>
   ::ComputeNormalizationFactors(void)
   {
- 
+
   typename ListSampleListType::Pointer sl =  ListSampleListType::New();
-  
+
   sl->Reserve(m_InputImage->GetNumberOfComponentsPerPixel());
 
-  
+
   InputIteratorType it;
   // if scroll is activated, compute the factors from the quicklook
   if(m_UseScroll)
@@ -111,7 +111,7 @@ namespace otb
     it = InputIteratorType(m_InputImage,m_InputImage->GetRequestedRegion());
     it.GoToBegin();
   }
-  
+
   if(this->GetViewModel() == ScrollWidgetType::COMPLEX_MODULUS)
   {
     sl->PushBack(ListSampleType::New());
@@ -161,7 +161,7 @@ namespace otb
   m_HistogramGeneratorList->Clear();
   m_TransferFunctionList->Clear();
   otbMsgDebugMacro(<<"Nb bands: "<<m_InputImage->GetNumberOfComponentsPerPixel());
-  
+
   for(unsigned int i = 0;i<sl->Size();++i)
     {
       typename HistogramGeneratorType::Pointer generator = HistogramGeneratorType::New();
@@ -186,7 +186,7 @@ namespace otb
   m_ZoomWidget->SetTransferFunctionList(m_TransferFunctionList);
   m_FullWidget->SetTransferFunctionList(m_TransferFunctionList);
   }
-  
+
   /// Build the HMI
   template <class TPixel, class TLabel>
   void
@@ -197,7 +197,7 @@ namespace otb
     if(!m_InputImage)
       {
 	itkExceptionMacro(<<"No input image !");
-      } 
+      }
 
     if(m_UseImageOverlay && !m_InputImageOverlay)
       {
@@ -215,7 +215,7 @@ namespace otb
     // Get the image dimension
     typename ImageType::SizeType size = m_InputImage->GetLargestPossibleRegion().GetSize();
     m_ImageGeometry = static_cast<double>(size[0])/static_cast<double>(size[1]);
-    
+
     // initiate windows dimensions
     int wscroll=200;
     int hscroll=0;
@@ -227,7 +227,7 @@ namespace otb
       {
 	m_UseScroll=false;
       }
-    else 
+    else
       {
 	m_UseScroll=true;
 	// Compute scroll size :
@@ -260,10 +260,10 @@ namespace otb
 	WatcherType watcher(m_Shrink,wfull-200,hfull/2,200,20, "Generating Quicklook ...");
 	m_Shrink->Update();
       }
-    
 
 
-    // Create full windows    
+
+    // Create full windows
     m_FullWidget = FullWidgetType::New();
     m_FullWidget->SetParent(this);
     m_FullWidget->SetInput(m_InputImage);
@@ -289,7 +289,7 @@ namespace otb
     m_ZoomWidget->Init(0,0,m_ZoomMaxInitialSize,m_ZoomMaxInitialSize,"");
     m_ZoomWidget->box( FL_EMBOSSED_BOX );
     m_ZoomWidget->SetFormOverlayVisible(true);
-    
+
     // Create the zoom selection mode
     if(m_ShowZoomWidget)
       {
@@ -305,7 +305,7 @@ namespace otb
 	zoomBox->SetColor(m_InterfaceBoxesColor);
 	m_InterfaceBoxesList->PushBack(zoomBox);
       }
-    
+
     if(m_UseScroll)
       {
 	// Create the scroll window
@@ -358,7 +358,7 @@ namespace otb
     m_GreenHistogramWidget->resize(0,0,m_FullMaxInitialSize/2,m_ZoomMaxInitialSize);
 
     GenerateOverlayList();
-    
+
     m_Built=true;
   }
   /// Set the image (VectorImage version)
@@ -368,7 +368,7 @@ namespace otb
   ::SetImage(ImageType * img)
   {
     m_InputImage = dynamic_cast<ImageType *>( img );
-  } 
+  }
 /// Set the image overlay (VectorImage version)
   template <class TPixel, class TLabel>
   void
@@ -376,7 +376,7 @@ namespace otb
   ::SetImageOverlay(OverlayImageType * img)
   {
     m_InputImageOverlay = dynamic_cast<OverlayImageType *>( img );
-  } 
+  }
 
 
    template <class TPixel, class TLabel>
@@ -404,11 +404,11 @@ namespace otb
     m_VectorCastFilter->SetInput(img);
     m_VectorCastFilter->UpdateOutputInformation();
     m_InputImage = m_VectorCastFilter->GetOutput();
-  } 
+  }
 
   /// Show the app
   template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::Show(void)
   {
@@ -422,12 +422,12 @@ namespace otb
       {
  	m_ScrollWidget->Show();
       }
-   
+
       if(m_ShowFullWidget)
       {
         m_FullWidget->Show();
       }
-      
+
     if(m_ShowZoomWidget)
     {
       m_ZoomWidget->Show();
@@ -435,7 +435,7 @@ namespace otb
     if(m_ShowHistograms)
       {
 	m_RedHistogramWidget->show();
-	
+
 	if(this->GetViewModel()== ScrollWidgetType::RGB)
 	  {
 	    m_GreenHistogramWidget->show();
@@ -446,7 +446,7 @@ namespace otb
     Fl::check();
     //comment: std::cout<<"Leaving show method"<<std::endl;
   }
-  /** This is a helper class that performs a Show() and Fl::run() in order to ease 
+  /** This is a helper class that performs a Show() and Fl::run() in order to ease
       the use of the class for example in wrappings.*/
   template <class TPixel, class TLabel>
   int
@@ -460,7 +460,7 @@ namespace otb
 
   /// Hide the app
   template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::Hide(void)
   {
@@ -483,7 +483,7 @@ namespace otb
 
     Fl::check();
 
-  } 
+  }
 
   template <class TPixel, class TLabel>
   void
@@ -505,7 +505,7 @@ namespace otb
 	zoomBox->SetColor(m_InterfaceBoxesColor);
 	m_InterfaceBoxesList->SetNthElement(0,zoomBox);
       }
-    
+
     if(m_UseScroll)
     {
       BoxPointerType box = BoxType::New();
@@ -529,13 +529,13 @@ namespace otb
 	}
       m_InterfaceBoxesList->SetNthElement(idx,box);
     }
-    
+
     for(FormListIteratorType it1 = m_InterfaceBoxesList->Begin();
         it1!=m_InterfaceBoxesList->End();++it1)
         {
             new_list->PushBack(it1.Get());
         }
-        
+
     for(PolygonListIteratorType it2 = m_PolygonROIList->Begin();
         it2!=m_PolygonROIList->End();++it2)
         {
@@ -552,22 +552,22 @@ namespace otb
 	      {
 		new_poly->SetColor(m_DefaultROIColor);
 	      }
-            
+
             for(PolygonIteratorType pIt = it2.Get()->GetVertexList()->Begin();
               pIt != it2.Get()->GetVertexList()->End();++pIt)
               {
               ImageWidgetCircleFormPointerType new_circle = ImageWidgetCircleFormType::New();
-              
+
               new_circle->SetCenter(pIt.Value());
               new_circle->SetRadius(2);
               new_circle->SetSolid(false);
               new_circle->SetColor(m_InterfaceBoxesColor);
               new_list->PushBack(new_circle);
-              
+
               }
               new_list->PushBack(new_poly);
         }
-        
+
         for(PathListIteratorType it2 = m_PathList->Begin();
             it2!=m_PathList->End();++it2)
         {
@@ -579,13 +579,13 @@ namespace otb
 
           new_list->PushBack(new_line);
         }
-        
-        
+
+
         if(m_UseScroll)
         {
             m_ScrollWidget->SetFormListOverlay(new_list);
         }
-     
+
     m_FullWidget->SetFormListOverlay(new_list);
     m_ZoomWidget->SetFormListOverlay(new_list);
   }
@@ -594,7 +594,7 @@ namespace otb
 
   /// Update the display
   template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::Update(void)
   {
@@ -616,11 +616,11 @@ namespace otb
 	m_BlueHistogramWidget->redraw();
       }
 
-    
+
     // update the linked viewer
     typename ViewerListType::Iterator linkedIt = m_LinkedViewerList->Begin();
     typename OffsetListType::iterator offIt = m_LinkedViewerOffsetList.begin();
-  
+
     while(linkedIt!=m_LinkedViewerList->End()&&offIt!=m_LinkedViewerOffsetList.end())
     {
       if(!linkedIt.Get()->GetUpdating() && linkedIt.Get()->GetBuilt())
@@ -636,7 +636,7 @@ namespace otb
   }
 
   template <class TPixel, class TLabel>
-      void 
+      void
           ImageViewerBase<TPixel,TLabel>
   ::ReportPixel(IndexType index)
   {
@@ -651,7 +651,7 @@ namespace otb
     PointType point;
     m_InputImage->TransformIndexToPhysicalPoint(index,point);
     oss << std::setprecision(15) << point<<" (physical coordinates)"<<std::endl;
-    
+
     if(m_InputImage->GetBufferedRegion().IsInside(index))
     {
 	  //comment: std::cout<<"Index: "<<index<<std::endl;
@@ -683,20 +683,20 @@ namespace otb
       IndexType shrinkIndex;
       shrinkIndex[0]=index[0]/m_ShrinkFactor;
       shrinkIndex[1]=index[1]/m_ShrinkFactor;
-	
+
       if(m_Shrink->GetOutput()->GetBufferedRegion().IsInside(shrinkIndex))
       {
         typename ImageType::PixelType newPixel = m_Shrink->GetOutput()->GetPixel(shrinkIndex);
         oss<<newPixel<<" ("<<m_Label<<" pixel values)"<<std::endl;
       }
     }
-      
+
     typename ViewerListType::Iterator linkedIt = m_LinkedViewerList->Begin();
     typename OffsetListType::iterator offIt = m_LinkedViewerOffsetList.begin();
-  
+
     while(linkedIt!=m_LinkedViewerList->End()&&offIt!=m_LinkedViewerOffsetList.end())
     {
-      IndexType currentIndex = index + (*offIt); 
+      IndexType currentIndex = index + (*offIt);
       //comment: std::cout<<"CurrentIndex: "<<currentIndex<<std::endl;
       if(linkedIt.Get()->GetInputImage()->GetBufferedRegion().IsInside(currentIndex))
       {
@@ -708,7 +708,7 @@ namespace otb
         IndexType shrinkIndex;
         shrinkIndex[0]=currentIndex[0]/m_ShrinkFactor;
         shrinkIndex[1]=currentIndex[1]/m_ShrinkFactor;
-	
+
         if(linkedIt.Get()->GetShrinkedImage()->GetBufferedRegion().IsInside(shrinkIndex))
         {
           typename ImageType::PixelType newPixel = linkedIt.Get()->GetShrinkedImage()->GetPixel(shrinkIndex);
@@ -728,10 +728,10 @@ namespace otb
   }
 
  template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::ClearPixLocVal(void)
-  { 
+  {
     if(m_PixLocOutput == NULL)
     {
       //comment: std::cout<<"PixLocOutput == NULL, returning ..."<<std::endl;
@@ -741,9 +741,9 @@ namespace otb
     m_PixLocOutput->redraw();
     Fl::check();
   }
-  
+
   template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::SetImageOverlayOpacity(unsigned char opacity)
   {
@@ -751,7 +751,7 @@ namespace otb
       {
 	m_FullWidget->SetImageOverlayOpacity(opacity);
 	m_ZoomWidget->SetImageOverlayOpacity(opacity);
-	
+
 	if(m_UseScroll)
 	  {
 	    m_ScrollWidget->SetImageOverlayOpacity(opacity);
@@ -760,7 +760,7 @@ namespace otb
   }
 
  template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::UpdateZoomWidget(void)
   {
@@ -768,7 +768,7 @@ namespace otb
   }
 
  template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::UpdateFullWidget(void)
   {
@@ -776,12 +776,12 @@ namespace otb
   }
 
    template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
   ::UpdateScrollWidget(void)
   {
     if(m_UseScroll)
-      {	
+      {
 	m_ScrollWidget->redraw();
       }
   }
@@ -803,7 +803,7 @@ ImageViewerBase<TPixel,TLabel>
       RegionType resp;
       IndexType index = smallRegion.GetIndex();
       SizeType size = smallRegion.GetSize();
-      
+
       if(smallRegion.GetIndex()[0]<bigRegion.GetIndex()[0])
 	{
 	  index[0]=bigRegion.GetIndex()[0];
@@ -827,7 +827,7 @@ ImageViewerBase<TPixel,TLabel>
 }
 
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::ChangeFullViewedRegion(IndexType clickedIndex)
 {
@@ -845,7 +845,7 @@ ImageViewerBase<TPixel,TLabel>
 
   typename ViewerListType::Iterator linkedIt = m_LinkedViewerList->Begin();
   typename OffsetListType::iterator offIt = m_LinkedViewerOffsetList.begin();
-  
+
   while(linkedIt!=m_LinkedViewerList->End()&&offIt!=m_LinkedViewerOffsetList.end())
     {
       if(!linkedIt.Get()->GetUpdating())
@@ -856,17 +856,17 @@ ImageViewerBase<TPixel,TLabel>
 	  linkedIt.Get()->ChangeFullViewedRegion(linkedIndex);
 	}
       ++offIt;
-      ++linkedIt;			    
+      ++linkedIt;
     }
 //comment: std::cout<<"ChangeFullViewedRegion: "<<m_Label<<" Updating flag off"<<std::endl;
   m_Updating = false;
 }
 
 template <class TPixel, class TLabel>
-  void 
+  void
   ImageViewerBase<TPixel,TLabel>
 ::ChangeZoomViewedRegion(IndexType clickedIndex)
-{ 
+{
 
   m_Updating = true;
   //comment: std::cout<<"ChangeZoomViewedRegion: "<<m_Label<<" Updating flag on"<<std::endl;
@@ -876,14 +876,14 @@ template <class TPixel, class TLabel>
       IndexType newIndex;
       newIndex[0]=clickedIndex[0]-region.GetSize()[0]/2;
       newIndex[1]=clickedIndex[1]-region.GetSize()[1]/2;
-      
+
       region.SetIndex(newIndex);
       RegionType newRegion = ComputeConstrainedRegion(region,m_FullWidget->GetViewedRegion());
       m_ZoomWidget->SetZoomUpperLeftCorner(newRegion.GetIndex());
-      
+
       typename ViewerListType::Iterator linkedIt = m_LinkedViewerList->Begin();
       typename OffsetListType::iterator offIt = m_LinkedViewerOffsetList.begin();
-      
+
       while(linkedIt!=m_LinkedViewerList->End()&&offIt!=m_LinkedViewerOffsetList.end())
 	{
 	  if(!linkedIt.Get()->GetUpdating())
@@ -894,15 +894,15 @@ template <class TPixel, class TLabel>
 	      linkedIt.Get()->ChangeZoomViewedRegion(linkedIndex);
 	    }
 	  ++offIt;
-	  ++linkedIt;			    
+	  ++linkedIt;
 	}
     }
   //comment: std::cout<<"ChangeZoomViewedRegion: "<<m_Label<<" Updating flag off"<<std::endl;
-  m_Updating = false; 
+  m_Updating = false;
 }
 
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::Link(Self * viewer, OffsetType offset, bool backwardLinkFlag)
 {
@@ -921,7 +921,7 @@ ImageViewerBase<TPixel,TLabel>
   // If not, add it with its offset
   m_LinkedViewerList->PushBack(viewer);
   m_LinkedViewerOffsetList.push_back(offset);
-  
+
   // If backward link flag is set, add the backward link
   if(backwardLinkFlag)
     {
@@ -934,7 +934,7 @@ ImageViewerBase<TPixel,TLabel>
 }
 
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::Link(Self * viewer, OffsetType offset)
 {
@@ -942,7 +942,7 @@ ImageViewerBase<TPixel,TLabel>
 }
 
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::Link(Self * viewer)
 {
@@ -952,7 +952,7 @@ ImageViewerBase<TPixel,TLabel>
 }
 
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::Unlink(Self * viewer,bool backwardLinkFlag)
 {
@@ -972,7 +972,7 @@ ImageViewerBase<TPixel,TLabel>
 	}
       ++it;
     }
-  
+
   // If found, erase
   m_LinkedViewerList->Erase(counter);
   m_LinkedViewerOffsetList.erase(m_LinkedViewerOffsetList.begin()+counter);
@@ -984,7 +984,7 @@ ImageViewerBase<TPixel,TLabel>
     }
 }
 template <class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::Unlink(Self * viewer)
 {
@@ -1072,11 +1072,11 @@ ImageViewerBase<TPixel,TLabel>
 	  m_FullWidget->SetRedChannelIndex(m_RedChannelIndex);
 	  m_FullWidget->SetGreenChannelIndex(m_GreenChannelIndex);
 	  m_FullWidget->SetBlueChannelIndex(m_BlueChannelIndex);
-	  
+
 	  ComputeNormalizationFactors();
 
 	  typename HistogramWidgetType::ColorType blue,red,green;
-	  
+
 	  red[0]=0.5;
 	  red[1]=0;
 	  red[2]=0;
@@ -1095,7 +1095,7 @@ ImageViewerBase<TPixel,TLabel>
 	  m_RedHistogramWidget->SetTransferFunctionLabel("Affine");
 	  m_RedHistogramWidget->SetHistogramColor(red);
 	  m_RedHistogramWidget->SetTextColor(red);
-	  
+
 	  m_BlueHistogramWidget->SetHistogram(m_HistogramGeneratorList->GetNthElement(m_BlueChannelIndex)->GetOutput());
 	  m_BlueHistogramWidget->SetTransferFunction(m_TransferFunctionList->GetNthElement(m_BlueChannelIndex));
 	  m_BlueHistogramWidget->SetLabel("Blue channel");
@@ -1124,10 +1124,10 @@ ImageViewerBase<TPixel,TLabel>
       m_FullWidget->SetRedChannelIndex(m_RedChannelIndex);
 
       ComputeNormalizationFactors();
-      
+
       typename HistogramWidgetType::ColorType gray;
       gray.Fill(0.5);
-      
+
       m_RedHistogramWidget->SetHistogram(m_HistogramGeneratorList->GetNthElement(m_RedChannelIndex)->GetOutput());
       m_RedHistogramWidget->SetTransferFunction(m_TransferFunctionList->GetNthElement(m_RedChannelIndex));
       m_RedHistogramWidget->SetLabel("Grayscale channel");
@@ -1152,10 +1152,10 @@ ImageViewerBase<TPixel,TLabel>
       m_FullWidget->SetGreenChannelIndex(m_GreenChannelIndex);
 
       ComputeNormalizationFactors();
-      
+
       typename HistogramWidgetType::ColorType gray;
       gray.Fill(0.5);
-      
+
       m_RedHistogramWidget->SetHistogram(m_HistogramGeneratorList->GetNthElement(0)->GetOutput());
       m_RedHistogramWidget->SetTransferFunction(m_TransferFunctionList->GetNthElement(0));
       m_RedHistogramWidget->SetLabel("Modulus");
@@ -1180,10 +1180,10 @@ ImageViewerBase<TPixel,TLabel>
       m_FullWidget->SetGreenChannelIndex(m_GreenChannelIndex);
 
       ComputeNormalizationFactors();
-      
+
       typename HistogramWidgetType::ColorType gray;
       gray.Fill(0.5);
-      
+
       m_RedHistogramWidget->SetHistogram(m_HistogramGeneratorList->GetNthElement(0)->GetOutput());
       m_RedHistogramWidget->SetTransferFunction(m_TransferFunctionList->GetNthElement(0));
       m_RedHistogramWidget->SetLabel("Phase");
@@ -1277,7 +1277,7 @@ ImageViewerBase<TPixel,TLabel>
 }
 
 template<class TPixel, class TLabel>
-void 
+void
 ImageViewerBase<TPixel,TLabel>
 ::ClearROIColorMap(void)
 {
diff --git a/Code/Visu/otbImageViewerFullResolutionEventsInterface.h b/Code/Visu/otbImageViewerFullResolutionEventsInterface.h
index f2feb9eb8b..6c3671dbe3 100644
--- a/Code/Visu/otbImageViewerFullResolutionEventsInterface.h
+++ b/Code/Visu/otbImageViewerFullResolutionEventsInterface.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -33,7 +33,7 @@ class ImageViewerFullResolutionEventsInterface
   typedef itk::Object                      Superclass;
   typedef itk::SmartPointer<Self>          Pointer;
   typedef itk::SmartPointer<const Self>    ConstPointer;
- 
+
   /** Standard type macros */
   itkTypeMacro(ImageViewerFullResolutionEventsInterface,Superclass);
 
diff --git a/Code/Visu/otbImageViewerFullWidget.h b/Code/Visu/otbImageViewerFullWidget.h
index e344ede2c6..0601d003b9 100644
--- a/Code/Visu/otbImageViewerFullWidget.h
+++ b/Code/Visu/otbImageViewerFullWidget.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 template <class TPixel, class TLabel> class ImageViewerBase;
-/** 
+/**
  * \brief Custom full image widget.
  *
  * This class derives from otb::FullResolutionImageWidget, and implements behaviours specific to the image viewer.
@@ -49,7 +49,7 @@ class ITK_EXPORT ImageViewerFullWidget
 
   /** Method for creation through the object factory. */
   itkNewMacro(Self);
-  
+
   /** Run-time type information (and related methods). */
   itkTypeMacro(ImageViewerFullWidget, FullResolutionImageWidget);
 
@@ -57,7 +57,7 @@ class ITK_EXPORT ImageViewerFullWidget
  typedef ImageViewerFullResolutionEventsInterface EventsInterfaceType;
  typedef EventsInterfaceType::Pointer             EventsInterfacePointerType;
 
-  
+
   typedef TPixel PixelType;
   typedef TLabel LabelType;
   typedef typename Superclass::IndexType IndexType;
@@ -65,10 +65,10 @@ class ITK_EXPORT ImageViewerFullWidget
  typedef typename Superclass::ImageType ImageType;
  typedef typename Superclass::RegionType RegionType;
  typedef typename Superclass::OverlayImageType OverlayImageType;
-  
+
   typedef ImageViewerBase<PixelType, LabelType>  ParentType;
   typedef ParentType*                    ParentPointerType;
-  
+
   typedef ImageWidgetBoxForm             BoxType;
   typedef ImageWidgetRectangleForm       RectangleType;
   typedef RectangleType::ColorType       ColorType;
@@ -77,12 +77,12 @@ class ITK_EXPORT ImageViewerFullWidget
   typedef typename PolygonType::ContinuousIndexType ContinuousIndexType;
   typedef typename PolygonType::Superclass::VertexListPointer VertexListPointerType;
   typedef typename PolygonType::Superclass::VertexListType VertexListType;
-  
+
   itkSetMacro(Parent,ParentPointerType);
   itkGetMacro(Parent,ParentPointerType);
   itkGetObjectMacro(EventsInterface,EventsInterfaceType);
   itkSetObjectMacro(EventsInterface,EventsInterfaceType);
- 
+
  virtual void SetUpperLeftCorner(IndexType index)
  {
    Superclass::SetUpperLeftCorner(index);
@@ -91,10 +91,10 @@ class ITK_EXPORT ImageViewerFullWidget
        m_EventsInterface->ViewedRegionChanged();
      }
  }
- 
+
  /** Handle method */
-  
-  
+
+
   /** Default mode handling, without ROI selection */
   virtual int DefaultHandle(int event)
   {
@@ -167,13 +167,13 @@ class ITK_EXPORT ImageViewerFullWidget
                   m_Parent->Update();
                 }
               }
-                return 1;   
+                return 1;
             }
           }
     return 0;
   }
-  
-  
+
+
   virtual int RectangleROISelectionHandle(int event)
   {
     switch(event)
@@ -228,17 +228,17 @@ class ITK_EXPORT ImageViewerFullWidget
 	box->SetSize(boxSize);
 	if(m_Drag)
 	   {
-	     m_Parent->GetInterfaceBoxesList()->PopBack(); 
-	     
+	     m_Parent->GetInterfaceBoxesList()->PopBack();
+
 	   }
 	 m_Parent->GetInterfaceBoxesList()->PushBack(box);
 	 m_Drag=true;
 	m_Parent->Update();
-	 return 1; 
+	 return 1;
       }
-         
+
       case FL_RELEASE:
-      { 
+      {
 	int x = Fl::event_x();
 	int y = Fl::event_y();
 	IndexType clickedIndex;
@@ -247,7 +247,7 @@ class ITK_EXPORT ImageViewerFullWidget
 	clickedIndex=this->WindowToImageCoordinates(clickedIndex);
 	if(m_Drag)
 	{
-	  m_Parent->GetInterfaceBoxesList()->PopBack();          
+	  m_Parent->GetInterfaceBoxesList()->PopBack();
 	}
 	if(m_EventsInterface.IsNull() || m_EventsInterface->GetForwardEvents())
 	{
@@ -302,19 +302,19 @@ class ITK_EXPORT ImageViewerFullWidget
 	  m_Parent->GetPolygonROIList()->Back()->AddVertex(newVertex);
 	  // Down Left corner
 	  newVertex[0]= boxIndex[0];
-	  m_Parent->GetPolygonROIList()->Back()->AddVertex(newVertex);     
+	  m_Parent->GetPolygonROIList()->Back()->AddVertex(newVertex);
 	  m_Parent->GetPolygonROIList()->PushBack(PolygonType::New());
 	  m_Parent->GetPolygonROIList()->Back()->SetValue(m_Parent->GetNextROILabel());
-	  
+
 	  m_Parent->Update();
 	}
 	m_Drag=false;
 	return 1;
-      } 
+      }
     }
     return 0;
   }
-  
+
   virtual int PolygonROISelectionHandle(int event)
   {
     switch(event)
@@ -336,14 +336,14 @@ class ITK_EXPORT ImageViewerFullWidget
 		m_Parent->GetPolygonROIList()->PushBack(PolygonType::New());
 		m_Parent->GetPolygonROIList()->Back()->SetValue(m_Parent->GetNextROILabel());
 	      }
-	    m_Parent->GetPolygonROIList()->Back()->AddVertex(clickedIndex); 
+	    m_Parent->GetPolygonROIList()->Back()->AddVertex(clickedIndex);
 	    m_Parent->Update();
           }
           else if(Fl::event_button()==FL_RIGHT_MOUSE)
           {
 	    m_Parent->GetPolygonROIList()->PushBack(PolygonType::New());
 	    m_Parent->GetPolygonROIList()->Back()->SetValue(m_Parent->GetNextROILabel());
-	    
+
           }
           return 1;
         }
@@ -364,12 +364,12 @@ class ITK_EXPORT ImageViewerFullWidget
 	      }
 	    }
           }
-        return 1;        
+        return 1;
         }
       }
     return 0;
 }
-  
+
   virtual int handle(int event)
   {
   // Handle the mode selection to call the specific handle methods */
@@ -385,7 +385,7 @@ class ITK_EXPORT ImageViewerFullWidget
 //       {
 //         m_ShortCutRectangle = !m_ShortCutRectangle;
 //         m_ShortCutPolygon = false;
-//         
+//
 //         if(m_ShortCutRectangle)
 //         {
 //           std::cout<<"Rectangle ROI selection mode ON"<<std::endl;
@@ -399,7 +399,7 @@ class ITK_EXPORT ImageViewerFullWidget
 //       {
 //         m_ShortCutPolygon = !m_ShortCutPolygon;
 //         m_ShortCutRectangle = false;
-//         
+//
 //         if(m_ShortCutPolygon)
 //         {
 //           std::cout<<"Polygon ROI selection mode ON"<<std::endl;
@@ -410,7 +410,7 @@ class ITK_EXPORT ImageViewerFullWidget
 //           std::cout<<"Polygon ROI selection mode OFF"<<std::endl;
 //         }
 //       }
-    }  
+    }
     // handle the pixel value reporting
     switch(event)
     {
@@ -452,7 +452,7 @@ class ITK_EXPORT ImageViewerFullWidget
 	  {
 	    m_Parent->Hide();
 	    return 0;
-	  } 
+	  }
     }
     // If the current mode is rectangle selection, call the right handle method
     if(m_Parent->GetRectangularROISelectionMode())
@@ -470,11 +470,11 @@ class ITK_EXPORT ImageViewerFullWidget
       return DefaultHandle(event);
     }
   }
-  
+
   virtual void resize(int x,int y, int w, int h)
    {
      Superclass::resize(x,y,w,h);
-      if(m_Parent->GetBuilt()) 
+      if(m_Parent->GetBuilt())
 	m_Parent->Update();
     }
 
@@ -492,7 +492,7 @@ class ITK_EXPORT ImageViewerFullWidget
       m_ShortCutPolygon = false;
       m_Drag = false;
       m_ValueUpdateFrequency = 5;
-      
+
     };
   /**
    * Destructor.
diff --git a/Code/Visu/otbImageViewerHistogramAndTransferFunctionWidget.h b/Code/Visu/otbImageViewerHistogramAndTransferFunctionWidget.h
index cdd1101900..389870498d 100644
--- a/Code/Visu/otbImageViewerHistogramAndTransferFunctionWidget.h
+++ b/Code/Visu/otbImageViewerHistogramAndTransferFunctionWidget.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -23,10 +23,10 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 template <class TPixel, class TLabel> class ImageViewerBase;
-/** 
+/**
  * \brief Custom histogram widget for the image viewer.
  *
- * This class derives from otb::HistogramAndTransferFunctionWidget, 
+ * This class derives from otb::HistogramAndTransferFunctionWidget,
  * and implements behaviours specific to the image viewer.
  *
  * \sa ImageViewer, HistogramAndTransferFunctionWidget
@@ -42,10 +42,10 @@ class ITK_EXPORT ImageViewerHistogramAndTransferFunctionWidget
   typedef HistogramAndTransferFunctionWidget<THistogram,TPixel> Superclass;
   typedef itk::SmartPointer<Self>                                Pointer;
   typedef itk::SmartPointer<const Self>                          ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageViewerHistogramAndTransferFunctionWidget,HistogramAndTransferFunctionWidget);
 
@@ -64,7 +64,7 @@ class ITK_EXPORT ImageViewerHistogramAndTransferFunctionWidget
   typedef typename LogTransferFunctionType::Pointer LogTransferFunctionPointerType;
   typedef ImageWidgetSquareTransferFunction<PixelType> SquareonentialTransferFunctionType;
   typedef typename SquareonentialTransferFunctionType::Pointer SquareonentialTransferFunctionPointerType;
-    
+
   /** Set the parent application */
   itkSetMacro(Parent,ParentPointerType);
   itkGetMacro(Parent,ParentPointerType);
@@ -106,7 +106,7 @@ class ITK_EXPORT ImageViewerHistogramAndTransferFunctionWidget
 	case FL_DRAG:
 	  {
 	    double x = Fl::event_x();
-	    
+
 	    if(m_ModifyLower && (x>this->GetMarginX()) && (x<static_cast<double>(this->w())-this->GetMarginX()-this->GetOutputHistogramMargin()*static_cast<double>(this->w())))
 	      {
 		x = (x>xupper ? xupper : x);
@@ -172,7 +172,7 @@ class ITK_EXPORT ImageViewerHistogramAndTransferFunctionWidget
       m_TransferFunctionCode = 0;
     }
   /** Destructor */
-  virtual ~ImageViewerHistogramAndTransferFunctionWidget() 
+  virtual ~ImageViewerHistogramAndTransferFunctionWidget()
     {
       m_Parent = NULL;
     }
diff --git a/Code/Visu/otbImageViewerScrollWidget.h b/Code/Visu/otbImageViewerScrollWidget.h
index 3b62e74a1b..a2ba7e848e 100644
--- a/Code/Visu/otbImageViewerScrollWidget.h
+++ b/Code/Visu/otbImageViewerScrollWidget.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -63,7 +63,7 @@ class ITK_EXPORT ImageViewerScrollWidget
 
   typedef otb::ImageWidgetBoxForm BoxType;
   typedef BoxType::ColorType ColorType;
-  
+
   itkSetMacro(Parent,ParentPointerType);
   itkGetMacro(Parent,ParentPointerType);
 
@@ -71,7 +71,7 @@ class ITK_EXPORT ImageViewerScrollWidget
    /** Return the width and heigh of the displayed image (overloaded for scroll)*/
    int wDisplayed()
    {
-    if (this->GetViewedRegion().GetSize()[0] / static_cast<float>(this->GetViewedRegion().GetSize()[1]) 
+    if (this->GetViewedRegion().GetSize()[0] / static_cast<float>(this->GetViewedRegion().GetSize()[1])
           > this->w() / static_cast<float>(this->h()))
     {
       return this->w();
@@ -84,7 +84,7 @@ class ITK_EXPORT ImageViewerScrollWidget
 
    int hDisplayed()
    {
-    if (this->GetViewedRegion().GetSize()[0] / static_cast<float>(this->GetViewedRegion().GetSize()[1]) 
+    if (this->GetViewedRegion().GetSize()[0] / static_cast<float>(this->GetViewedRegion().GetSize()[1])
            > this->w() / static_cast<float>(this->h()))
     {
       return this->w()*this->GetViewedRegion().GetSize()[1] / this->GetViewedRegion().GetSize()[0];
@@ -151,10 +151,10 @@ class ITK_EXPORT ImageViewerScrollWidget
 	    m_Parent->Hide();
 	    return 0;
 	  }
-	}	
-      return 0; 
+	}
+      return 0;
     }
-    
+
  protected:
   /**
    * Constructor.
diff --git a/Code/Visu/otbImageViewerZoomWidget.h b/Code/Visu/otbImageViewerZoomWidget.h
index 3691f20034..ea69f2accc 100644
--- a/Code/Visu/otbImageViewerZoomWidget.h
+++ b/Code/Visu/otbImageViewerZoomWidget.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -27,7 +27,7 @@ PURPOSE.  See the above copyright notices for more information.
 namespace otb
 {
 template <class TPixel, class TLabel> class ImageViewerBase;
-/** 
+/**
  * \brief Custom scroll image widget.
  *
  * This class derives from otb::ZoomableImageWidget, and implements behaviours specific to the image viewer.
@@ -59,7 +59,7 @@ class ITK_EXPORT ImageViewerZoomWidget
 
   typedef ImageViewerBase<PixelType, LabelType> ParentType;
   typedef ParentType* ParentPointerType;
- 
+
   itkSetMacro(Parent,ParentPointerType);
   itkGetMacro(Parent,ParentPointerType);
   /** Handle method */
@@ -154,20 +154,20 @@ case FL_FOCUS:
 	    m_Parent->ChangeZoomViewedRegion(newIndex);
 	    return 1;
 	  }
-	} 
-      return 0; 
+	}
+      return 0;
     }
-  
 
-  virtual void resize(int x,int y, int w, int h) 
-     { 
-       Superclass::resize(x,y,w,h); 
-       if(m_Parent->GetBuilt()) 
-	 m_Parent->Update(); 
-     } 
+
+  virtual void resize(int x,int y, int w, int h)
+     {
+       Superclass::resize(x,y,w,h);
+       if(m_Parent->GetBuilt())
+	 m_Parent->Update();
+     }
+
 
 
-  
  protected:
   /**
    * Constructor.
diff --git a/Code/Visu/otbImageWidgetBase.h b/Code/Visu/otbImageWidgetBase.h
index 550cbbc021..504a397a95 100644
--- a/Code/Visu/otbImageWidgetBase.h
+++ b/Code/Visu/otbImageWidgetBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -42,10 +42,10 @@ class ImageWidgetBase
     typedef itk::Object Superclass;
     typedef itk::SmartPointer<Self> Pointer;
     typedef itk::SmartPointer<const Self> ConstPointer;
-    
+
     /** Method for creation through the object factory */
     itkNewMacro(Self);
-    
+
     /** Runtime information */
     itkTypeMacro(ImageWidgetBase,Object);
 
@@ -77,7 +77,7 @@ class ImageWidgetBase
     typedef otb::ImageWidgetAffineTransferFunction<PixelType> AffineTransferFunctionType;
     typedef List<TransferFunctionType> TransferFunctionListType;
     typedef typename TransferFunctionListType::Pointer TransferFunctionListPointerType;
-    
+
     itkSetMacro(BufferedRegion,RegionType);
     itkGetMacro(BufferedRegion,RegionType);
 
@@ -95,10 +95,10 @@ class ImageWidgetBase
 
     itkSetMacro(FormOverlayVisible,bool);
     itkGetMacro(FormOverlayVisible,bool);
-    
+
     itkSetMacro(ImageOverlayVisible,bool);
     itkGetMacro(ImageOverlayVisible,bool);
-    
+
     itkSetMacro(BlackTransparency,bool);
     itkGetMacro(BlackTransparency,bool);
 
@@ -107,7 +107,7 @@ class ImageWidgetBase
 
     itkSetMacro(ViewModel,ViewModelType);
     itkGetMacro(ViewModel,ViewModelType);
-    
+
     itkGetMacro(ImageOverlayOpacity,unsigned char);
     itkSetMacro(ImageOverlayOpacity,unsigned char);
 
@@ -115,7 +115,7 @@ class ImageWidgetBase
     itkGetObjectMacro(TransferFunctionList,TransferFunctionListType);
 
     itkGetMacro(OpenGlIsotropicZoom,double);
-    
+
     /** Set the input image.
      * \param image The image to view.
      */
@@ -124,7 +124,7 @@ class ImageWidgetBase
      * \return The image to view.
      */
     ImageType * GetInput(void);
-    
+
     /** Set the input overlay image.
      * \param image The image to view.
      */
@@ -157,10 +157,10 @@ class ImageWidgetBase
      * \return The image coordinate.
      */
     virtual IndexType WindowToImageCoordinates(IndexType index);
-        
+
     /** Initialize the widget */
     virtual void Init(int x, int y, int w, int h, const char * l);
-    
+
   protected:
     /** Constructor */
     ImageWidgetBase();
@@ -173,7 +173,7 @@ class ImageWidgetBase
     virtual void RebuildOpenGlBuffer(void);
     /** Rebuild opengl image overlay buffer */
     virtual void RebuildOpenGlImageOverlayBuffer(void);
-   
+
     /** Normalization function */
     unsigned char Normalize(PixelType value, unsigned int channelIndex);
 
@@ -188,11 +188,11 @@ class ImageWidgetBase
     return this->h();
    }
 
-    // PURE VIRTUAL METHODS 
+    // PURE VIRTUAL METHODS
 
     // User is not supposed to be allowed to move the zoom in the generic implementation
     itkSetMacro(OpenGlIsotropicZoom,double);
-    
+
 
     /** Unlarge OpenGlBuffer */
     virtual void UpdateOpenGlBufferedRegion(void){};
diff --git a/Code/Visu/otbImageWidgetBase.txx b/Code/Visu/otbImageWidgetBase.txx
index 4b45dd2d7f..c233d446e8 100644
--- a/Code/Visu/otbImageWidgetBase.txx
+++ b/Code/Visu/otbImageWidgetBase.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -76,11 +76,11 @@ ImageWidgetBase<TPixel>
       delete [] m_OpenGlImageOverlayBuffer;
     }
 }
-/** 
+/**
  * Reset the widget.
  */
 template <class TPixel>
-void 
+void
 ImageWidgetBase<TPixel>
 ::Reset(void)
 {
@@ -94,7 +94,7 @@ ImageWidgetBase<TPixel>
 }
 
 template <class TPixel>
-void 
+void
 ImageWidgetBase<TPixel>
 ::ClearBufferedRegion(void)
 {
@@ -105,7 +105,7 @@ ImageWidgetBase<TPixel>
 
 
 template <class TPixel>
-    void 
+    void
     ImageWidgetBase<TPixel>
   ::Init(int x, int y, int w, int h, const char * l)
 {
@@ -152,11 +152,11 @@ ImageWidgetBase<TPixel>
   {
     resp[0]=static_cast<int>(x);
   }
-  
+
   if(y<maxIndex[1])
   {
     resp[1]=maxIndex[1];
-      
+
   }
   else if(y>maxIndex[1]+maxSize[1])
   {
@@ -245,21 +245,21 @@ ImageWidgetBase<TPixel>
   return m_ImageOverlay;
 }
 
-/** 
- * Show The widget. 
+/**
+ * Show The widget.
  */
 template <class TPixel>
 void
 ImageWidgetBase<TPixel>
 ::Show(void)
-{ 
+{
   if(!m_Image)
   {
     itkExceptionMacro(<<"No input image !");
   }
   else
   {
-      //otbMsgDebugMacro(<<"Zoomable widget Show");       
+      //otbMsgDebugMacro(<<"Zoomable widget Show");
     this->show();
       //otbMsgDebugMacro(<<"Before redraw.");
     this->redraw();
@@ -275,8 +275,8 @@ ImageWidgetBase<TPixel>
   return m_TransferFunctionList->GetNthElement(channelIndex)->Map(value);
 }
 
-/** 
- * Draw the widget 
+/**
+ * Draw the widget
  */
 template <class TPixel>
 void
@@ -292,7 +292,7 @@ ImageWidgetBase<TPixel>
     m_Image->SetRequestedRegion(m_BufferedRegion);
     m_Image->PropagateRequestedRegion();
     m_Image->UpdateOutputData();
-    RebuildOpenGlBuffer(); 
+    RebuildOpenGlBuffer();
     if(m_ImageOverlayVisible)
     {
       m_ImageOverlay->SetRequestedRegion(m_BufferedRegion);
@@ -300,7 +300,7 @@ ImageWidgetBase<TPixel>
       m_ImageOverlay->UpdateOutputData();
     }
   }
- 
+
   if(m_ImageOverlayVisible)
   {
     RebuildOpenGlImageOverlayBuffer();
@@ -311,11 +311,11 @@ ImageWidgetBase<TPixel>
     valid(1);
     glLoadIdentity();
     glViewport(0,0,w(),h());
-    glClearColor((float)0.0, (float)0.0, (float)0.0, (float)0.0);          
+    glClearColor((float)0.0, (float)0.0, (float)0.0, (float)0.0);
     glShadeModel(GL_FLAT);
     glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
   }
- 
+
   glClear(GL_COLOR_BUFFER_BIT);    //this clears and paints to black
   glMatrixMode(GL_MODELVIEW);    //clear previous 3D draw params
   glLoadIdentity();
@@ -328,7 +328,7 @@ ImageWidgetBase<TPixel>
 
   // To be consistent with old method
   int displayHeight = static_cast<int>(vcl_ceil(m_BufferedRegion.GetSize()[1]*m_OpenGlIsotropicZoom));
-  int viewPortOffset = 0;  
+  int viewPortOffset = 0;
   viewPortOffset = h()-displayHeight;
   glRasterPos2i(0,viewPortOffset);
 
@@ -336,9 +336,9 @@ ImageWidgetBase<TPixel>
 
   // display the image
   glDrawPixels(m_BufferedRegion.GetSize()[0],
-	       m_BufferedRegion.GetSize()[1], 
+	       m_BufferedRegion.GetSize()[1],
 	       GL_RGBA,
-	       GL_UNSIGNED_BYTE, 
+	       GL_UNSIGNED_BYTE,
 	       m_OpenGlBuffer);
 #else
   glEnable(GL_TEXTURE_2D);
@@ -363,7 +363,7 @@ ImageWidgetBase<TPixel>
 
   glDisable(GL_TEXTURE_2D);
 #endif
-  
+
  // if image overlay is activated, display image overlay
   if(m_ImageOverlayVisible)
     {
@@ -371,9 +371,9 @@ ImageWidgetBase<TPixel>
     glEnable(GL_BLEND);
     glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
     glDrawPixels(m_BufferedRegion.GetSize()[0],
-                 m_BufferedRegion.GetSize()[1], 
+                 m_BufferedRegion.GetSize()[1],
 		 GL_RGBA,
-		 GL_UNSIGNED_BYTE, 
+		 GL_UNSIGNED_BYTE,
 		 m_OpenGlImageOverlayBuffer);
 
     glDisable(GL_BLEND);
@@ -389,7 +389,7 @@ ImageWidgetBase<TPixel>
     glTexImage2D(GL_TEXTURE_2D, 0, 4, m_BufferedRegion.GetSize()[0], m_BufferedRegion.GetSize()[1], 0, GL_RGBA, GL_UNSIGNED_BYTE, m_OpenGlImageOverlayBuffer);
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);  // Nearest Filtering
     glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_NEAREST);  // Nearest Filtering
-    
+
     glBindTexture (GL_TEXTURE_2D, textureOverlay);
     glBegin (GL_QUADS);
     int hOffset = this->h() - this->hDisplayed();
@@ -402,7 +402,7 @@ ImageWidgetBase<TPixel>
     glDisable(GL_BLEND);
 #endif
 
-    } 
+    }
 
   if(m_FormOverlayVisible)
   {
@@ -419,8 +419,8 @@ ImageWidgetBase<TPixel>
 
 }
 
-/** 
- * Rebuild opengl buffer. 
+/**
+ * Rebuild opengl buffer.
  */
 template <class TPixel>
 void
@@ -433,7 +433,7 @@ ImageWidgetBase<TPixel>
       //otbMsgDebugMacro(<<"Deleting previous buffer ...");
     delete [] m_OpenGlBuffer;
   }
-  //otbMsgDebugMacro(<<"Buffered region: "<<m_BufferedRegion); 
+  //otbMsgDebugMacro(<<"Buffered region: "<<m_BufferedRegion);
   unsigned int bufferLenght = 4*m_BufferedRegion.GetNumberOfPixels();
   //otbMsgDebugMacro(<<"New buffer lenght: "<<bufferLenght);
   m_OpenGlBuffer = new unsigned char[bufferLenght];
@@ -489,8 +489,8 @@ ImageWidgetBase<TPixel>
     }
   }
 }
-/** 
- * Rebuild opengl image overlay buffer. 
+/**
+ * Rebuild opengl image overlay buffer.
  */
 template <class TPixel>
 void
@@ -503,7 +503,7 @@ ImageWidgetBase<TPixel>
       //otbMsgDebugMacro(<<"Deleting previous buffer ...");
     delete [] m_OpenGlImageOverlayBuffer;
   }
-  //otbMsgDebugMacro(<<"Buffered region: "<<m_BufferedRegion); 
+  //otbMsgDebugMacro(<<"Buffered region: "<<m_BufferedRegion);
   unsigned int bufferLenght = 4*m_BufferedRegion.GetNumberOfPixels();
   //otbMsgDebugMacro(<<"New buffer lenght: "<<bufferLenght);
   m_OpenGlImageOverlayBuffer = new unsigned char[bufferLenght];
@@ -515,7 +515,7 @@ ImageWidgetBase<TPixel>
   {
     for(it.GoToBegin();!it.IsAtEnd();++it)
     {
-	  index = (m_BufferedRegion.GetSize()[1]-1+m_BufferedRegion.GetIndex()[1]-it.GetIndex()[1])*4*m_BufferedRegion.GetSize()[0] 
+	  index = (m_BufferedRegion.GetSize()[1]-1+m_BufferedRegion.GetIndex()[1]-it.GetIndex()[1])*4*m_BufferedRegion.GetSize()[0]
 	  + 4*(it.GetIndex()[0]-m_BufferedRegion.GetIndex()[0]);
       if ((it.Get()[0]==0)&&(it.Get()[1]==0)&&(it.Get()[2]==0))
       {
@@ -530,14 +530,14 @@ ImageWidgetBase<TPixel>
         m_OpenGlImageOverlayBuffer[index+1] = static_cast<unsigned char>( it.Get()[1]);
         m_OpenGlImageOverlayBuffer[index+2] = static_cast<unsigned char>(it.Get()[2]);
         m_OpenGlImageOverlayBuffer[index+3] = m_ImageOverlayOpacity;
-      } 
-    }     
+      }
+    }
   }
-  else 
+  else
   {
     for(it.GoToBegin();!it.IsAtEnd();++it)
     {
-	  index = (m_BufferedRegion.GetSize()[1]-1+m_BufferedRegion.GetIndex()[1]-it.GetIndex()[1])*4*m_BufferedRegion.GetSize()[0] 
+	  index = (m_BufferedRegion.GetSize()[1]-1+m_BufferedRegion.GetIndex()[1]-it.GetIndex()[1])*4*m_BufferedRegion.GetSize()[0]
 	  + 4*(it.GetIndex()[0]-m_BufferedRegion.GetIndex()[0]);
       m_OpenGlImageOverlayBuffer[index] =  static_cast<unsigned char>(it.Get()[0]);
       m_OpenGlImageOverlayBuffer[index+1] =static_cast<unsigned char>(it.Get()[1]);
diff --git a/Code/Visu/otbImageWidgetBoxForm.h b/Code/Visu/otbImageWidgetBoxForm.h
index 98724fb53a..95078b3a2b 100644
--- a/Code/Visu/otbImageWidgetBoxForm.h
+++ b/Code/Visu/otbImageWidgetBoxForm.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -37,10 +37,10 @@ class ImageWidgetBoxForm
   typedef ImageWidgetFormBase Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ImageWidgetBoxForm, ImageWidgetFormBase);
 
@@ -59,9 +59,9 @@ class ImageWidgetBoxForm
 	{
 	  double xul = static_cast<double>((static_cast<double>(m_Index[0])-static_cast<double>(originx))*openGlZoom*(1/static_cast<double>(ss_rate)));
           double xlr = static_cast<double>((static_cast<double>(m_Index[0]+m_Size[0])-static_cast<double>(originx))*openGlZoom*(1/static_cast<double>(ss_rate)));
-          
-          double yul = static_cast<double>(static_cast<double>(windowh)+(static_cast<double>(originy)-static_cast<double>(m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate))); 
-          
+
+          double yul = static_cast<double>(static_cast<double>(windowh)+(static_cast<double>(originy)-static_cast<double>(m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate)));
+
           double ylr = static_cast<double>(static_cast<double>(windowh)+(static_cast<double>(originy)-static_cast<double>(m_Size[1]+m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate)));
 
 
@@ -77,7 +77,7 @@ class ImageWidgetBoxForm
 	  glDisable(GL_BLEND);
 	}
     };
- protected: 
+ protected:
   /** Constructor. */
   ImageWidgetBoxForm()
       {
@@ -86,11 +86,11 @@ class ImageWidgetBoxForm
       };
     /** Destructor. */
     ~ImageWidgetBoxForm(){};
-    
+
  private:
     ImageWidgetBoxForm(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-    
+
     IndexType m_Index;
     SizeType m_Size;
 
diff --git a/Code/Visu/otbImageWidgetCircleForm.cxx b/Code/Visu/otbImageWidgetCircleForm.cxx
index ef82a4d545..28a0d51c53 100644
--- a/Code/Visu/otbImageWidgetCircleForm.cxx
+++ b/Code/Visu/otbImageWidgetCircleForm.cxx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -59,15 +59,15 @@ ImageWidgetCircleForm
         {
           double xi = m_Center[0]+static_cast<double>(m_Radius)*vcl_sin(angle);
           double yi = m_Center[1]+static_cast<double>(m_Radius)*vcl_cos(angle);
-          
+
           double xd = (xi-originx)*openGlZoom*(1/static_cast<double>(ss_rate));
           double yd = windowh+(originy-yi)*openGlZoom*(1/static_cast<double>(ss_rate));
           glVertex2d(xd,yd);
-        }            
+        }
       glEnd();
       glDisable(GL_BLEND);
 }
- 
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Visu/otbImageWidgetCircleForm.h b/Code/Visu/otbImageWidgetCircleForm.h
index a378367333..b659108005 100644
--- a/Code/Visu/otbImageWidgetCircleForm.h
+++ b/Code/Visu/otbImageWidgetCircleForm.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -25,7 +25,7 @@
 namespace otb
 {
 /** \class ImageWidgetCircleForm
- * \brief 
+ * \brief
  *
  */
 class ITK_EXPORT ImageWidgetCircleForm
@@ -37,16 +37,16 @@ class ITK_EXPORT ImageWidgetCircleForm
   typedef ImageWidgetFormBase           Superclass;
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ImageWidgetCircleForm, ImageWidgetFormBase);
-  
+
   /** Usefull typedef. */
   typedef itk::ContinuousIndex<double,2> ContinuousIndexType;
-  
+
   /** Accessors */
   itkSetMacro(Solid,bool);
   itkGetMacro(Solid,bool);
@@ -55,21 +55,21 @@ class ITK_EXPORT ImageWidgetCircleForm
   itkSetMacro(Center,ContinuousIndexType);
   itkGetMacro(Center,ContinuousIndexType);
 
-  
+
   /** Actually draw the polygon */
   void Draw(double openGlZoom, unsigned int originx, unsigned int originy, unsigned int windowh, unsigned int ss_rate);
-  
-  
-  protected: 
+
+
+  protected:
   /** Constructor. */
   ImageWidgetCircleForm();
   /** Destructor. */
   ~ImageWidgetCircleForm();
-  
+
   private:
   ImageWidgetCircleForm(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-  
+
   /// true if needed to draw a solid polygon
   bool m_Solid;
   /// Radius of the circle
diff --git a/Code/Visu/otbImageWidgetFormBase.h b/Code/Visu/otbImageWidgetFormBase.h
index 85ea3dc3b9..7282be5966 100644
--- a/Code/Visu/otbImageWidgetFormBase.h
+++ b/Code/Visu/otbImageWidgetFormBase.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -28,7 +28,7 @@
 namespace otb
 {
 /** \class ImageWidgetFormBase
- * \brief 
+ * \brief
  *
  */
 class ITK_EXPORT ImageWidgetFormBase
@@ -46,8 +46,8 @@ class ITK_EXPORT ImageWidgetFormBase
 
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
- 
+
+
 
   typedef itk::FixedArray<float,4> ColorType;
   typedef itk::ImageRegion<2> RegionType;
@@ -83,7 +83,7 @@ class ITK_EXPORT ImageWidgetFormBase
 
   virtual RegionType GetRegion(void){itkExceptionMacro("Method must be implemented in subclasses!");};
 
- protected: 
+ protected:
   /** Constructor. */
     ImageWidgetFormBase()
       {
@@ -103,10 +103,10 @@ class ITK_EXPORT ImageWidgetFormBase
  private:
     ImageWidgetFormBase(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-    
+
 
     bool m_Visible;
-    
+
 };
 } // end namespace otb
 #endif
diff --git a/Code/Visu/otbImageWidgetPointForm.h b/Code/Visu/otbImageWidgetPointForm.h
index 9c63f3d9dd..8d43df8db4 100644
--- a/Code/Visu/otbImageWidgetPointForm.h
+++ b/Code/Visu/otbImageWidgetPointForm.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 namespace otb
 {
 /** \class ImageWidgetPointForm
- * \brief 
+ * \brief
  *
  */
 class ImageWidgetPointForm
@@ -36,10 +36,10 @@ class ImageWidgetPointForm
   typedef ImageWidgetFormBase Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ImageWidgetPointForm,ImageWidgetFormBase);
 
@@ -50,7 +50,7 @@ class ImageWidgetPointForm
 
   itkSetMacro(Index,IndexType);
   itkGetMacro(Index,IndexType);
- 
+
   void Draw(double openGlZoom, unsigned int originx, unsigned int originy, unsigned int windowh, unsigned int ss_rate)
     {
       if(this->GetVisible())
@@ -78,7 +78,7 @@ class ImageWidgetPointForm
       return resp;
     }
 
- protected: 
+ protected:
   /** Constructor. */
     ImageWidgetPointForm()
       {
@@ -91,7 +91,7 @@ class ImageWidgetPointForm
  private:
     ImageWidgetPointForm(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-    
+
     IndexType m_Index;
 
 };
diff --git a/Code/Visu/otbImageWidgetPolygonForm.h b/Code/Visu/otbImageWidgetPolygonForm.h
index e6018d606a..e196d56bee 100644
--- a/Code/Visu/otbImageWidgetPolygonForm.h
+++ b/Code/Visu/otbImageWidgetPolygonForm.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -45,23 +45,23 @@ class ITK_EXPORT ImageWidgetPolygonForm
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
   typedef TValue                        ValueType;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ImageWidgetPolygonForm, ImageWidgetFormBase);
-  
+
   /** Usefull typedef. */
   typedef itk::Size<2>                               SizeType;
   typedef itk::Index<2>                              IndexType;
   typedef Polygon<ValueType>                         PolygonType;
-  typedef typename PolygonType::Pointer              PolygonPointerType;       
+  typedef typename PolygonType::Pointer              PolygonPointerType;
   typedef typename PolygonType::VertexType           VertexType;
   typedef typename PolygonType::VertexListType       VertexListType;
   typedef typename VertexListType::ConstIterator     VertexListConstIteratorType;
   typedef typename PolygonType::ContinuousIndexType  ContinuousIndexType;
-  
+
   /** Accessors */
   itkSetMacro(Polygon, PolygonPointerType);
   itkGetMacro(Polygon, PolygonPointerType);
@@ -69,21 +69,21 @@ class ITK_EXPORT ImageWidgetPolygonForm
   itkGetMacro(Solid,bool);
   itkSetMacro(InternalValueToAlphaChannel,bool);
   itkGetMacro(InternalValueToAlphaChannel,bool);
-  
+
   /** Actually draw the polygon */
   void Draw(double openGlZoom, unsigned int originx, unsigned int originy, unsigned int windowh, unsigned int ss_rate);
-  
-  
-  protected: 
+
+
+  protected:
   /** Constructor. */
   ImageWidgetPolygonForm();
   /** Destructor. */
   ~ImageWidgetPolygonForm();
-  
+
   private:
   ImageWidgetPolygonForm(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-  
+
   /** Internal pointer to the otb::Polygon data structure */
   PolygonPointerType m_Polygon;
   /** true if needed to draw a solid polygon */
diff --git a/Code/Visu/otbImageWidgetPolygonForm.txx b/Code/Visu/otbImageWidgetPolygonForm.txx
index 59b57443c1..bbfb6eb8bd 100644
--- a/Code/Visu/otbImageWidgetPolygonForm.txx
+++ b/Code/Visu/otbImageWidgetPolygonForm.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -46,7 +46,7 @@ ImageWidgetPolygonForm<TValue>
     {
       glEnable(GL_BLEND);
       glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
-      GluPolygonDrawingHelper::Pointer polygonDrawer = GluPolygonDrawingHelper::New(); 
+      GluPolygonDrawingHelper::Pointer polygonDrawer = GluPolygonDrawingHelper::New();
 
 
       if(m_InternalValueToAlphaChannel)
@@ -59,22 +59,22 @@ ImageWidgetPolygonForm<TValue>
       }
       polygonDrawer->SetBoundaryOnly(!m_Solid);
       VertexListConstIteratorType it =  this->GetPolygon()->GetVertexList()->Begin();
-      
+
       while(it != this->GetPolygon()->GetVertexList()->End())
-	{  
+	{
 	  double x1 = it.Value()[0];
 	  double y1 = it.Value()[1];
-	  
+
 	  x1 = static_cast<int>((x1-originx)*openGlZoom*(1/static_cast<double>(ss_rate)));
 	  y1 = static_cast<int>(windowh+(originy-y1)*openGlZoom*(1/static_cast<double>(ss_rate)));
 	  polygonDrawer->Vertex2d(x1,y1);
 	  ++it;
-	}            
+	}
       polygonDrawer->RenderPolygon();
       glDisable(GL_BLEND);
     }
 }
- 
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Visu/otbImageWidgetPolylineForm.h b/Code/Visu/otbImageWidgetPolylineForm.h
index 8948881c7a..bfbec661b3 100644
--- a/Code/Visu/otbImageWidgetPolylineForm.h
+++ b/Code/Visu/otbImageWidgetPolylineForm.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -26,7 +26,7 @@
 namespace otb
 {
 /** \class ImageWidgetPolylineForm
- * \brief 
+ * \brief
  *
  */
 template<class TValue = double>
@@ -40,23 +40,23 @@ class ITK_EXPORT ImageWidgetPolylineForm
   typedef itk::SmartPointer<Self>       Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
   typedef TValue                        ValueType;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ImageWidgetPolylineForm, ImageWidgetFormBase);
-  
+
   /** Usefull typedef. */
   typedef itk::Size<2>                               SizeType;
   typedef itk::Index<2>                              IndexType;
   typedef PolyLineParametricPathWithValue<ValueType,2> PolylineType;
-  typedef typename PolylineType::Pointer              PolylinePointerType;       
+  typedef typename PolylineType::Pointer              PolylinePointerType;
   typedef typename PolylineType::VertexType           VertexType;
   typedef typename PolylineType::VertexListType       VertexListType;
   typedef typename VertexListType::ConstIterator     VertexListConstIteratorType;
   typedef typename PolylineType::ContinuousIndexType  ContinuousIndexType;
-  
+
   /** Accessors */
   itkSetMacro(Polyline, PolylinePointerType);
   itkGetMacro(Polyline, PolylinePointerType);
@@ -64,18 +64,18 @@ class ITK_EXPORT ImageWidgetPolylineForm
   itkGetMacro(InternalValueToAlphaChannel,bool);
   /** Actually draw the polyline */
   void Draw(double openGlZoom, unsigned int originx, unsigned int originy, unsigned int windowh, unsigned int ss_rate);
-  
-  
-  protected: 
+
+
+  protected:
   /** Constructor. */
   ImageWidgetPolylineForm();
   /** Destructor. */
   ~ImageWidgetPolylineForm();
-  
+
   private:
   ImageWidgetPolylineForm(const Self&);// purposely not implemented
     void operator=(const Self&);// purposely not implemented
-  
+
   /** Internal pointer to the otb::Polyline data structure */
   PolylinePointerType m_Polyline;
   /** True if polygon internal value affects the alpha color value
diff --git a/Code/Visu/otbImageWidgetPolylineForm.txx b/Code/Visu/otbImageWidgetPolylineForm.txx
index 4576d18ca6..fc23563e86 100644
--- a/Code/Visu/otbImageWidgetPolylineForm.txx
+++ b/Code/Visu/otbImageWidgetPolylineForm.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -56,9 +56,9 @@ ImageWidgetPolylineForm<TValue>
       glBegin(GL_LINE_STRIP);
 
       VertexListConstIteratorType it =  this->GetPolyline()->GetVertexList()->Begin();
-     
+
       while(it != this->GetPolyline()->GetVertexList()->End())
-	{  
+	{
 	  double x1 = it.Value()[0];
 	  double y1 = it.Value()[1];
 
@@ -66,12 +66,12 @@ ImageWidgetPolylineForm<TValue>
 	  y1 = static_cast<int>(windowh+(originy-y1)*openGlZoom*(1/static_cast<double>(ss_rate)));
           glVertex2f(x1,y1);
 	  ++it;
-	}            
+	}
       glEnd();
       glDisable(GL_BLEND);
     }
 }
- 
+
 } // end namespace otb
 
 #endif
diff --git a/Code/Visu/otbImageWidgetRectangleForm.h b/Code/Visu/otbImageWidgetRectangleForm.h
index 4a695a8e12..f246427c4b 100644
--- a/Code/Visu/otbImageWidgetRectangleForm.h
+++ b/Code/Visu/otbImageWidgetRectangleForm.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 namespace otb
 {
 /** \class ImageWidgetRectangleForm
- * \brief 
+ * \brief
  *
  */
 class ImageWidgetRectangleForm
@@ -36,10 +36,10 @@ class ImageWidgetRectangleForm
   typedef ImageWidgetFormBase Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ImageWidgetRectangleForm,ImageWidgetFormBase);
 
@@ -62,15 +62,15 @@ class ImageWidgetRectangleForm
 	  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 	  glColor4f(m_Color[0],m_Color[1],m_Color[2],m_Color[3]);
 	  glBegin(GL_QUADS);
-          
+
           int xul = static_cast<int>((static_cast<int>(m_Index[0])-static_cast<int>(originx))*openGlZoom*(1/static_cast<double>(ss_rate)));
           int xlr = static_cast<int>((static_cast<int>(m_Index[0]+m_Size[0])-static_cast<int>(originx))*openGlZoom*(1/static_cast<double>(ss_rate)));
-          
-          int yul = static_cast<int>(static_cast<int>(windowh)+(static_cast<int>(originy)-static_cast<int>(m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate))); 
-          
-          int ylr = static_cast<int>(static_cast<int>(windowh)+(static_cast<int>(originy)-static_cast<int>(m_Size[1]+m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate))); 
-          
-	  gl_rect(xul,yul,xlr,ylr); 
+
+          int yul = static_cast<int>(static_cast<int>(windowh)+(static_cast<int>(originy)-static_cast<int>(m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate)));
+
+          int ylr = static_cast<int>(static_cast<int>(windowh)+(static_cast<int>(originy)-static_cast<int>(m_Size[1]+m_Index[1]))*openGlZoom*(1/static_cast<double>(ss_rate)));
+
+	  gl_rect(xul,yul,xlr,ylr);
 	  glEnd();
 	  glDisable(GL_BLEND);
 	}
@@ -84,7 +84,7 @@ class ImageWidgetRectangleForm
       return resp;
     }
 
- protected: 
+ protected:
   /** Constructor. */
     ImageWidgetRectangleForm()
       {
diff --git a/Code/Visu/otbImageWidgetTransferFunction.h b/Code/Visu/otbImageWidgetTransferFunction.h
index 73098f9a15..11d9aa7bd4 100644
--- a/Code/Visu/otbImageWidgetTransferFunction.h
+++ b/Code/Visu/otbImageWidgetTransferFunction.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -37,10 +37,10 @@ class ITK_EXPORT ImageWidgetTransferFunction
   typedef itk::Object                       Superclass;
   typedef itk::SmartPointer<Self>           Pointer;
   typedef itk::SmartPointer<const Self>     ConstPointer;
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageWidgetTransferFunction,Object);
-  
+
   /** Template parameters typedefs */
   typedef TPixel PixelType;
 
@@ -98,13 +98,13 @@ class ITK_EXPORT ImageWidgetAffineTransferFunction
   typedef ImageWidgetTransferFunction<TPixel> Superclass;
   typedef itk::SmartPointer<Self>              Pointer;
   typedef itk::SmartPointer<const Self>        ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageWidgetAffineTransferFunction,ImageWidgetTransferFunction);
-  
+
   /** Template parameters typedefs */
   typedef TPixel PixelType;
 
@@ -147,13 +147,13 @@ class ITK_EXPORT ImageWidgetSquareRootTransferFunction
   typedef ImageWidgetTransferFunction<TPixel>   Superclass;
   typedef itk::SmartPointer<Self>                Pointer;
   typedef itk::SmartPointer<const Self>          ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageWidgetSquareRootTransferFunction,ImageWidgetTransferFunction);
-  
+
   /** Template parameters typedefs */
   typedef TPixel PixelType;
 
@@ -198,13 +198,13 @@ class ITK_EXPORT ImageWidgetLogTransferFunction
   typedef ImageWidgetTransferFunction<TPixel> Superclass;
   typedef itk::SmartPointer<Self>              Pointer;
   typedef itk::SmartPointer<const Self>        ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageWidgetLogTransferFunction,ImageWidgetTransferFunction);
-  
+
   /** Template parameters typedefs */
   typedef TPixel PixelType;
 
@@ -248,13 +248,13 @@ class ITK_EXPORT ImageWidgetSquareTransferFunction
   typedef ImageWidgetTransferFunction<TPixel> Superclass;
   typedef itk::SmartPointer<Self>              Pointer;
   typedef itk::SmartPointer<const Self>        ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(ImageWidgetSquareTransferFunction,ImageWidgetTransferFunction);
-  
+
   /** Template parameters typedefs */
   typedef TPixel PixelType;
 
diff --git a/Code/Visu/otbVectorImageToColorAnaglyphVectorImageFilter.h b/Code/Visu/otbVectorImageToColorAnaglyphVectorImageFilter.h
index 4ff4f2c1ae..e5ef05a102 100644
--- a/Code/Visu/otbVectorImageToColorAnaglyphVectorImageFilter.h
+++ b/Code/Visu/otbVectorImageToColorAnaglyphVectorImageFilter.h
@@ -10,8 +10,8 @@ Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
 See OTBCopyright.txt for details.
 
 
-This software is distributed WITHOUT ANY WARRANTY; without even 
-the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+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.
 
 =========================================================================*/
@@ -44,9 +44,9 @@ namespace Functor
 	  {
 	    m_RedChannelIndex = 0;
 	    m_GreenChannelIndex = 1;
-	    m_BlueChannelIndex = 2;	    
+	    m_BlueChannelIndex = 2;
 	  };
-	/// Destructor 
+	/// Destructor
 	~ColorAnaglyphFunctor(){};
 
 	inline TOutputPixel operator()(const TInputPixel1& pixel1, const TInputPixel2& pixel2)
@@ -57,7 +57,7 @@ namespace Functor
 	    result[2]=static_cast<typename TOutputPixel::ValueType>(pixel2[m_BlueChannelIndex]);
 	    return result;
 	  }
-	
+
 	void SetRedChannelIndex(unsigned int index)
 	  {
 	    m_RedChannelIndex = index;
@@ -90,8 +90,8 @@ namespace Functor
       };
   }
  /** \class VectorImageToColorAnaglyphVectorImageFilter
-  *  \brief This filter implements the synthesis of a grayscale anaglyph image from 
-  *  a pair of stereoscopic images. 
+  *  \brief This filter implements the synthesis of a grayscale anaglyph image from
+  *  a pair of stereoscopic images.
   *  The output image is a VectorImage with 3 channels, where the first channel is the first
   *  channel of the second  input image, and the two last channels are the two last channel
   *  of the first input image.
@@ -105,7 +105,7 @@ template <class TInputImage1, class TInputImage2, class TOutputImage>
 class ITK_EXPORT VectorImageToColorAnaglyphVectorImageFilter
   : public itk::BinaryFunctorImageFilter
   <  TInputImage1,TInputImage2,TOutputImage,
-  Functor::ColorAnaglyphFunctor< 
+  Functor::ColorAnaglyphFunctor<
   typename TInputImage1::PixelType,
   typename TInputImage2::PixelType,
   typename TOutputImage::PixelType
@@ -117,20 +117,20 @@ class ITK_EXPORT VectorImageToColorAnaglyphVectorImageFilter
 
   typedef itk::BinaryFunctorImageFilter
   <  TInputImage1,TInputImage2,TOutputImage,
-    Functor::ColorAnaglyphFunctor< 
+    Functor::ColorAnaglyphFunctor<
     typename TInputImage1::PixelType,
     typename TInputImage2::PixelType,
     typename TOutputImage::PixelType
     >  > Superclass;
   typedef itk::SmartPointer<Self>              Pointer;
   typedef itk::SmartPointer<const Self>        ConstPointer;
-  
+
   /** Type macro */
   itkNewMacro(Self);
-  
+
   /** Creation through object factory macro */
   itkTypeMacro(VectorImageToColorAnaglyphVectorImageFilter, BinaryFunctorImageFilter);
-  
+
   virtual void GenerateOutputInformation(void)
     {
       Superclass::GenerateOutputInformation();
diff --git a/Code/Visu/otbZoomableImageWidget.h b/Code/Visu/otbZoomableImageWidget.h
index 78e634cf27..f762fb0a1d 100644
--- a/Code/Visu/otbZoomableImageWidget.h
+++ b/Code/Visu/otbZoomableImageWidget.h
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -36,10 +36,10 @@ class ZoomableImageWidget
   typedef ImageWidgetBase<TPixel> Superclass;
   typedef itk::SmartPointer<Self> Pointer;
   typedef itk::SmartPointer<const Self> ConstPointer;
-  
+
   /** Method for creation through the object factory */
   itkNewMacro(Self);
-  
+
   /** Runtime information */
   itkTypeMacro(ZoomableImageWidget,ImageWidgetBase);
 
@@ -58,8 +58,8 @@ class ZoomableImageWidget
   /** Resize the widget */
   virtual void resize(int x, int y, int w, int h);
 
-  /** 
-   * Set a new zoom factor (>1). 
+  /**
+   * Set a new zoom factor (>1).
    * \param zoomFactor The new zoom factor.
    */
   void SetZoomFactor(double zoomFactor);
diff --git a/Code/Visu/otbZoomableImageWidget.txx b/Code/Visu/otbZoomableImageWidget.txx
index 1fe517dc49..86630bfb72 100644
--- a/Code/Visu/otbZoomableImageWidget.txx
+++ b/Code/Visu/otbZoomableImageWidget.txx
@@ -10,8 +10,8 @@
   See OTBCopyright.txt for details.
 
 
-     This software is distributed WITHOUT ANY WARRANTY; without even 
-     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+     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.
 
 =========================================================================*/
@@ -24,7 +24,7 @@
 
 namespace otb
 {
-/** 
+/**
  * Constructor.
  */
 template <class TPixel>
@@ -34,18 +34,18 @@ ZoomableImageWidget<TPixel>
   m_ZoomUpperLeftCorner.Fill(0);
 }
 
-/** 
+/**
  * Destructor.
  */
 template <class TPixel>
 ZoomableImageWidget<TPixel>
 ::~ZoomableImageWidget()
 {}
-/** 
+/**
  * Initialize the widget.
  */
 template <class TPixel>
-void 
+void
 ZoomableImageWidget<TPixel>
 ::Init(int x, int y, int w, int h, const char * l)
 {
@@ -64,11 +64,11 @@ ZoomableImageWidget<TPixel>
       this->resize(x, y, w, h);
     }
 }
-/** 
+/**
  * Resize the widget.
  */
 template <class TPixel>
-void 
+void
 ZoomableImageWidget<TPixel>
 ::resize(int x, int y, int w, int h)
 {
@@ -84,11 +84,11 @@ ZoomableImageWidget<TPixel>
   this->Fl_Gl_Window::resize(x,y,w,h);
   this->redraw();
 }
-/** 
+/**
  * Test if the buffer has to be updated.
  */
 template <class TPixel>
-bool 
+bool
 ZoomableImageWidget<TPixel>
 ::UpdateOpenGlBufferedRegionRequested(void)
 {
@@ -105,23 +105,23 @@ ZoomableImageWidget<TPixel>
   return true;
 }
 
-/** 
- * Update OpenGlBuffer. 
+/**
+ * Update OpenGlBuffer.
  */
 template <class TPixel>
-void 
+void
 ZoomableImageWidget<TPixel>
 ::UpdateOpenGlBufferedRegion(void)
 {
   //otbMsgDebugMacro(<<"UpdateOpenGlBufferedRegion: "<<this->GetViewedRegion());
   this->SetBufferedRegion(this->GetViewedRegion());
 }
-/** 
- * Set a new zoom factor (>1). 
+/**
+ * Set a new zoom factor (>1).
  * \param zoomFactor The new zoom factor.
  */
 template <class TPixel>
-void 
+void
 ZoomableImageWidget<TPixel>
 ::SetZoomFactor(double zoomFactor)
 {
@@ -129,7 +129,7 @@ ZoomableImageWidget<TPixel>
     itkExceptionMacro(<<"Zoom factor must be >1 !");
 
   RegionType region = this->GetViewedRegion();
-  
+
   SizeType newSize;
   RegionType newRegion;
 
@@ -145,12 +145,12 @@ ZoomableImageWidget<TPixel>
       this->SetOpenGlIsotropicZoom(zoomFactor);
     }
 }
-/** 
- * Set a new zoom factor (>1). 
+/**
+ * Set a new zoom factor (>1).
  * \param zoomFactor The new zoom factor.
  */
 template <class TPixel>
-void 
+void
 ZoomableImageWidget<TPixel>
 ::SetZoomUpperLeftCorner(IndexType index)
 {
@@ -159,7 +159,7 @@ ZoomableImageWidget<TPixel>
 
   size = this->GetViewedRegion().GetSize();
 //  otbMsgDebugMacro(<<"SetZoomCenter: Size ->"<<size);
-  
+
 //  otbMsgDebugMacro(<<"SetZoomCenter: newIndex ->"<<index);
   newRegion.SetIndex(index);
   newRegion.SetSize(size);
-- 
GitLab